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

Commit 783c16a0 authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi Committed by Akhil P Oommen
Browse files

msm: kgsl: Allocate user_ctxt_record based on preemption feature flag



Allocation of memory to user_ctxt_record is done based on adreno_device
flag. If a context is created when preemption is disabled, the memory
to user_ctxt_record is not allocated. Now if we enable preemption,
through the sysfs knob, the device flag is again set. We may try to
access user_ctxt_record in preemption_pre_ibsubmit(). So allocate memory
to user_ctxt_record based on the preemption feature flag instead
of preemption device flag.

Change-Id: I947ef5a1bfbd8bff471427fae60d7fcd507b85a2
Signed-off-by: default avatarPuranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: default avatarHarshitha Sai Neelati <hsaine@codeaurora.org>
parent 75fae4d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -783,7 +783,7 @@ void a6xx_preemption_context_destroy(struct kgsl_context *context)
	struct kgsl_device *device = context->device;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (!adreno_is_preemption_enabled(adreno_dev))
	if (!ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION))
		return;

	gpumem_free_entry(context->user_ctxt_record);
@@ -798,7 +798,7 @@ int a6xx_preemption_context_init(struct kgsl_context *context)
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	uint64_t flags = 0;

	if (!adreno_is_preemption_enabled(adreno_dev))
	if (!ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION))
		return 0;

	if (context->flags & KGSL_CONTEXT_SECURE)