Skip to contentSkip to conversation

update display OVL config check

PATCH In review Xiandong Wang 2 participants 3 messages Nov 18, 2025

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

cover update display OVL config check

add framebuffer width and height size check

Xiandong Wang (1):
drm/mediatek: Add check framebuffer width and height size before
config ovl

 drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.46.0
#1 lore raw

PATCH 1/1 drm/mediatek: Add check framebuffer width and height size before config ovl

During the execution of the IGT test kms_cursor_edge_walk, the screen experiences glitches and the hardware hangs. It was discovered that the framebuffer dimensions (width and height) provided by IGT to the display driver are zero, leading to abnormal parameters that cause the hardware to freeze. Therefore, it is necessary to verify the buffer dimensions before successfully passing the IGT test.

---
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +1 -1
index f1fa1f1c3ff0..bb207aee91f2 100644
@@ -611,7 +611,7 @@ void mtk_ovl_layer_config(struct device *dev, unsigned int idx,
 	unsigned int ignore_pixel_alpha = 0;
 	unsigned int con;
 
-	if (!pending->enable) {
+	if (!pending->enable || !pending->height || !pending->width) {
 		mtk_ovl_layer_off(dev, idx, cmdq_pkt);
 		return;
 	}
Signature · 1 line
2.46.0
maintainer Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH 1/1] drm/mediatek: Add check framebuffer width and height size before config ovl

Il 18/11/25 03:22, Xiandong Wang ha scritto:

Quoted 9 lines

During the execution of the IGT test kms_cursor_edge_walk, the screen experiences glitches and the hardware hangs. It was discovered that the framebuffer dimensions (width and height) provided by IGT to the display driver are zero, leading to abnormal parameters that cause the hardware to freeze. Therefore, it is necessary to verify the buffer dimensions before successfully passing the IGT test.

Needs a Fixes tag.

After which:

Cheers,
Angelo