Skip to contentSkip to conversation

drm/msm/dpu: make "vblank timeout" more useful

PATCH Superseded Dmitry Baryshkov 2 participants 2 messages Jan 5, 2024 – Jan 25, 2024

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dpu: make "vblank timeout" more useful

We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. Include the actual CTL_FLUSH value into the timeout message. This allows us to identify the DPU block that gets stuck.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +1 -1
index d0f56c5c4cce..fb34067ab6af 100644
@@ -489,7 +489,7 @@ static int dpu_encoder_phys_vid_wait_for_commit_done(
 		(hw_ctl->ops.get_flush_register(hw_ctl) == 0),
 		msecs_to_jiffies(50));
 	if (ret <= 0) {
-		DPU_ERROR("vblank timeout\n");
+		DPU_ERROR("vblank timeout: %x\n", hw_ctl->ops.get_flush_register(hw_ctl));
 		return -ETIMEDOUT;
 	}
 

---
base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
change-id: 20240106-fd-dpu-debug-timeout-e917f0bc8063

Best regards,

Signature · 1 line
Dmitry Baryshkov <[email protected]>
#1 lore raw
Quoted 15 lines · Dmitry Baryshkov

We have several reports of vblank timeout messages. However after some debugging it was found that there might be different causes to that. Include the actual CTL_FLUSH value into the timeout message. This allows us to identify the DPU block that gets stuck.

---
  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +0 -0
index d0f56c5c4cce..fb34067ab6af 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c static int dpu_encoder_phys_vid_wait_for_commit_done( · line 494

Quoted 7 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +1 -1
@@ -489,7 +489,7 @@ static int dpu_encoder_phys_vid_wait_for_commit_done(
  		(hw_ctl->ops.get_flush_register(hw_ctl) == 0),
  		msecs_to_jiffies(50));
  	if (ret <= 0) {
-		DPU_ERROR("vblank timeout\n");
+		DPU_ERROR("vblank timeout: %x\n", hw_ctl->ops.get_flush_register(hw_ctl));
  		return -ETIMEDOUT;
  	}

Nothing wrong with this change.

But I dont know how much information this is giving to really find out what is causing the vblank timeout. Sure, we know which flush bit is actually stuck but we dont know why its stuck.

We should add a logic here to get the snapshot on the first vblank timeout that way we avoid excessive capture as well similar to the other fatal locations of calling snapshot.

Quoted 7 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +0 -1
---

base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
change-id: 20240106-fd-dpu-debug-timeout-e917f0bc8063

Best regards,