Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87bc4ddb authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi
Browse files

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: default avatarPuranam V G Tejaswi <pvgtejas@codeaurora.org>
parent 66b4b5d5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* 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);
}