drm/msm: Workaround IFPC counters bug
Subsystems (4)
RFC PATCH 1/1 drm/msm: Workaround IFPC counters bug
When keepalive vote is set to false IFPC will be re-enabled even if the perfcounter oob vote is set.
Workaround this by not setting keepalive vote when sysprof is active.
---
I have little confidence that this is the proper solution hence why this is an RFC.
Hopefully something better can be found.
--- drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/a6xx_preempt.c +2 -1
@@ -191,7 +191,8 @@ void a6xx_preempt_irq(struct msm_gpu *gpu)set_preempt_state (a6xx_gpu,PREEMPT_NONE ); -a6xx_preempt_keepalive_vote (gpu, false); +if (refcount_read (&a6xx_gpu->base.base.sysprof_active) <=0 ) +a6xx_preempt_keepalive_vote (gpu, false);trace_msm_gpu_preemption_irq (a6xx_gpu->cur_ring->id);
---
base-commit: b5bad77e1e3c7249e4c0c88f98477e1ee7669b63
change-id: 20251010-ifpc_counters_fix-8bd4470e6351
Best regards,
Signature · 1 line
Anna Maniscalco <[email protected]>
Quoted 5 lines · Anna Maniscalco
When keepalive vote is set to false IFPC will be re-enabled even if the perfcounter oob vote is set.
Workaround this by not setting keepalive vote when sysprof is active.
Quoted 7 lines
---
I have little confidence that this is the proper solution hence why this is an RFC.Hopefully something better can be found.
Signed-off-by Anna Maniscalco <[email protected]>
Your sign-off is in the non-git-logged section here as well
Konrad
Quoted 21 lines · Anna Maniscalco
When keepalive vote is set to false IFPC will be re-enabled even if the perfcounter oob vote is set.
Workaround this by not setting keepalive vote when sysprof is active.
---
I have little confidence that this is the proper solution hence why this is an RFC.Hopefully something better can be found.
Signed-off-by Anna Maniscalco <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/msm/adreno/a6xx_preempt.c +0
-0
drivers/gpu/drm/msm/adreno/a6xx_preempt.c void a6xx_preempt_irq(struct msm_gpu *gpu) · line 194
Quoted 5 lines
drivers/gpu/drm/msm/adreno/a6xx_preempt.c +1
-1@@ -191,7 +191,8 @@ void a6xx_preempt_irq(struct msm_gpu *gpu)set_preempt_state (a6xx_gpu,PREEMPT_NONE ); -a6xx_preempt_keepalive_vote (gpu, false); +if (refcount_read (&a6xx_gpu->base.base.sysprof_active) <=0 )
This returns an unsigned type, so you can just do:
if (!refcount_read(..))
Konrad
Quoted 10 lines
drivers/gpu/drm/msm/adreno/a6xx_preempt.c +1
-1+a6xx_preempt_keepalive_vote (gpu, false);trace_msm_gpu_preemption_irq (a6xx_gpu->cur_ring->id); ---base-commit:
b5bad77e1e3c7249e4c0c88f98477e1ee7669b63
change-id: 20251010-ifpc_counters_fix-8bd4470e6351Best regards,