Skip to contentSkip to conversation

drm: msm: a6x: Disable interrupts before recovery

PATCH In review Sharat Masetty 2 participants 2 messages Mar 2, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: msm: a6x: Disable interrupts before recovery

This patch disables interrupts in the GPU RBBM hang detect fault handler before going to recovery.

---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +3 -0
index dc8ec2c..4dd0f62 100644
@@ -676,6 +676,9 @@ static void a6xx_fault_detect_irq(struct msm_gpu *gpu)
 		gpu_read64(gpu, REG_A6XX_CP_IB2_BASE, REG_A6XX_CP_IB2_BASE_HI),
 		gpu_read(gpu, REG_A6XX_CP_IB2_REM_SIZE));
 
+	/* Disable interrupts before going for a recovery*/
+	gpu_write(gpu, REG_A6XX_RBBM_INT_0_MASK, 0);
+
 	/* Turn off the hangcheck timer to keep it from bothering us */
 	del_timer(&gpu->hangcheck_timer);
 
Signature · 5 lines
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 2 lines · Sharat Masetty

This patch disables interrupts in the GPU RBBM hang detect fault handler before going to recovery.

Okay, but why? What were you seeing? A little bit of extra description would make it easier to understand this change in the future.

Quoted 11 lines
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +0 -0
index dc8ec2c..4dd0f62 100644

drivers/gpu/drm/msm/adreno/a6xx_gpu.c static void a6xx_fault_detect_irq(struct msm_gpu *gpu) · line 681

Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +3 -0
@@ -676,6 +676,9 @@ static void a6xx_fault_detect_irq(struct msm_gpu *gpu)
 		gpu_read64(gpu, REG_A6XX_CP_IB2_BASE, REG_A6XX_CP_IB2_BASE_HI),
 		gpu_read(gpu, REG_A6XX_CP_IB2_REM_SIZE));
 
+	/* Disable interrupts before going for a recovery*/
+	gpu_write(gpu, REG_A6XX_RBBM_INT_0_MASK, 0);
+

And this is turning off all the interrupts, but the commit log only mentions the hang detect. In my experience, the hang detect usually only fires once until after reset, but if there are other interrupts that are bothering you then it makes sense to disable them but, again, this is good information for the commit log and or a code comment.

Jordan

Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +0 -0
 	/* Turn off the hangcheck timer to keep it from bothering us */
 	del_timer(&gpu->hangcheck_timer);
 
Signature · 1 line
1.9.1
Signature · 6 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel