diff options
| author | Puranam V G Tejaswi <pvgtejas@codeaurora.org> | 2020-07-07 20:25:25 +0530 |
|---|---|---|
| committer | Puranam V G Tejaswi <pvgtejas@codeaurora.org> | 2021-03-08 11:15:06 +0530 |
| commit | 87bc4ddb071587fbc03a43327a842542d996764e (patch) | |
| tree | b3a5f8bed73a45d21b8671636c6f4c5246bec653 /drivers/gpu | |
| parent | 66b4b5d53454291e6f81baf5d0d4f03d680d492e (diff) | |
msm: kgsl: Disable all yield packets for secure contexts
Preemption of secure context is not supported in A5x. Currently we
disable preemptive context switching during execution of commands from
secure contexts by placing appropriate PREEMPT_ENABLE_GLOBAL/LOCAL
packets in ringbuffer. These packets have no effect on the behavior of
CONTEXT_SWITCH_YIELD packet. So a cooperative context switch (yield) can
still be serviced. To avoid this, disable all yield packets in case of
secure contexts.
Change-Id: Icfd73795ca4dccfc04f7a5b4497a908b15794e5a
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/msm/adreno_a5xx_preempt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/msm/adreno_a5xx_preempt.c b/drivers/gpu/msm/adreno_a5xx_preempt.c index 883a9810fbf4..d1b55c9e9023 100644 --- a/drivers/gpu/msm/adreno_a5xx_preempt.c +++ b/drivers/gpu/msm/adreno_a5xx_preempt.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2017,2021, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -407,7 +407,8 @@ unsigned int a5xx_preemption_pre_ibsubmit( /* Enable CP_CONTEXT_SWITCH_YIELD packets in the IB2s */ *cmds++ = cp_type7_packet(CP_YIELD_ENABLE, 1); - *cmds++ = 2; + *cmds++ = ((preempt_style == KGSL_CONTEXT_PREEMPT_STYLE_RINGBUFFER) + ? 0 : 2); return (unsigned int) (cmds - cmds_orig); } |
