summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSIVA MULLATI <quic_smullati@quicinc.com>2023-02-23 04:17:59 -0800
committerSIVA MULLATI <quic_smullati@quicinc.com>2023-02-23 21:32:48 -0800
commitea70375181024c13d62a984b4d9fc0d2d37fa462 (patch)
tree562632741591ab6f714f38d083644d01902f6413
parentc51f11792b4aa556e64b2b2dbc4eabc63f375881 (diff)
downloadgraphics-ea70375181024c13d62a984b4d9fc0d2d37fa462.tar.gz
msm: kgsl: Allocate user_ctxt_record based on preemption feature set
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: SIVA MULLATI <quic_smullati@quicinc.com>
-rw-r--r--adreno_gen7_preempt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/adreno_gen7_preempt.c b/adreno_gen7_preempt.c
index 55509dd..56d02e5 100644
--- a/adreno_gen7_preempt.c
+++ b/adreno_gen7_preempt.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include "adreno.h"
@@ -778,7 +778,7 @@ int gen7_preemption_context_init(struct kgsl_context *context)
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
u64 flags = 0;
- if (!adreno_is_preemption_enabled(adreno_dev))
+ if (!adreno_preemption_feature_set(adreno_dev))
return 0;
if (context->flags & KGSL_CONTEXT_SECURE)