[PATCH v2 04/21] drm/msm/adreno: Create adreno_func->submit_flush()
Akhil P Oommen
akhilpo at oss.qualcomm.com
Mon Nov 10 08:37:10 PST 2025
To dynamically decide the right flush routine, convert a6xx_flush to an
adreno_func op. This will help us to reuse a7xx_submit() along with
a8xx_flush op.
Signed-off-by: Akhil P Oommen <akhilpo at oss.qualcomm.com>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++--
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 6f7ed07670b1..b675a512e7ca 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -397,7 +397,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
trace_msm_gpu_submit_flush(submit, read_gmu_ao_counter(a6xx_gpu));
- a6xx_flush(gpu, ring);
+ adreno_gpu->funcs->submit_flush(gpu, ring);
}
static void a6xx_emit_set_pseudo_reg(struct msm_ringbuffer *ring,
@@ -597,7 +597,7 @@ static void a7xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
trace_msm_gpu_submit_flush(submit, read_gmu_ao_counter(a6xx_gpu));
- a6xx_flush(gpu, ring);
+ adreno_gpu->funcs->submit_flush(gpu, ring);
/* Check to see if we need to start preemption */
a6xx_preempt_trigger(gpu);
@@ -2563,6 +2563,7 @@ static const struct adreno_gpu_funcs funcs = {
.sysprof_setup = a6xx_gmu_sysprof_setup,
},
.get_timestamp = a6xx_gmu_get_timestamp,
+ .submit_flush = a6xx_flush,
};
static const struct adreno_gpu_funcs funcs_gmuwrapper = {
@@ -2592,6 +2593,7 @@ static const struct adreno_gpu_funcs funcs_gmuwrapper = {
.progress = a6xx_progress,
},
.get_timestamp = a6xx_get_timestamp,
+ .submit_flush = a6xx_flush,
};
static const struct adreno_gpu_funcs funcs_a7xx = {
@@ -2624,6 +2626,7 @@ static const struct adreno_gpu_funcs funcs_a7xx = {
.sysprof_setup = a6xx_gmu_sysprof_setup,
},
.get_timestamp = a6xx_gmu_get_timestamp,
+ .submit_flush = a6xx_flush,
};
struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index 390fa6720d9b..77b1c73ff894 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -74,6 +74,7 @@ enum adreno_family {
struct adreno_gpu_funcs {
struct msm_gpu_funcs base;
int (*get_timestamp)(struct msm_gpu *gpu, uint64_t *value);
+ void (*submit_flush)(struct msm_gpu *gpu, struct msm_ringbuffer *ring);
};
struct adreno_reglist {
--
2.51.0
More information about the linux-arm-kernel
mailing list