msm: kgsl: Enable A6XX preemption through sysfs
This patch enables the a6xx preemption buffers setup by default.
However, the preemption execution is only enabled by:
echo 1 > /sys/class/kgsl/kgsl-3d0/preemption
Change-Id: I32c513fd5213f949ab6bc99fafbe71dc6a6f332b
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h
index 45ea99a..36bd656 100644
--- a/drivers/gpu/msm/adreno.h
+++ b/drivers/gpu/msm/adreno.h
@@ -528,6 +528,7 @@
ADRENO_DEVICE_ISDB_ENABLED = 12,
ADRENO_DEVICE_CACHE_FLUSH_TS_SUSPENDED = 13,
ADRENO_DEVICE_HARD_RESET = 14,
+ ADRENO_DEVICE_PREEMPTION_EXECUTION = 15,
};
/**
@@ -1550,11 +1551,23 @@
smp_wmb();
}
-static inline bool adreno_is_preemption_enabled(
+static inline bool adreno_is_preemption_execution_enabled(
+ struct adreno_device *adreno_dev)
+{
+ return test_bit(ADRENO_DEVICE_PREEMPTION_EXECUTION, &adreno_dev->priv);
+}
+
+static inline bool adreno_is_preemption_setup_enabled(
struct adreno_device *adreno_dev)
{
return test_bit(ADRENO_DEVICE_PREEMPTION, &adreno_dev->priv);
}
+
+static inline bool adreno_is_preemption_enabled(
+ struct adreno_device *adreno_dev)
+{
+ return 0;
+}
/**
* adreno_ctx_get_rb() - Return the ringbuffer that a context should
* use based on priority
@@ -1578,7 +1591,7 @@
* ringbuffer
*/
- if (!adreno_is_preemption_enabled(adreno_dev))
+ if (!adreno_is_preemption_execution_enabled(adreno_dev))
return &(adreno_dev->ringbuffers[0]);
/*