Skip to contentSkip to conversation

drm/mediatek: component type MTK_DISP_OVL_2L is not correctly handled

PATCH Applied Phong LE 2 participants 3 messages Feb 19, 2020 – Feb 25, 2020

Subsystems (3)
lore
Share & tools
lore

Phong LE

author
#0 lore raw

PATCH 1/1 drm/mediatek: component type MTK_DISP_OVL_2L is not correctly handled

The larb device remains NULL if the type is MTK_DISP_OVL_2L. A kernel panic is raised when a crtc uses mtk_smi_larb_get or mtk_smi_larb_put.

---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +1 -0
index 1f5a112bb034..57c88de9a329 100644
@@ -471,6 +471,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
 	/* Only DMA capable components need the LARB property */
 	comp->larb_dev = NULL;
 	if (type != MTK_DISP_OVL &&
+	    type != MTK_DISP_OVL_2L &&
 	    type != MTK_DISP_RDMA &&
 	    type != MTK_DISP_WDMA)
 		return 0;
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi, Phong:

Quoted 4 lines · Phong LE

The larb device remains NULL if the type is MTK_DISP_OVL_2L. A kernel panic is raised when a crtc uses mtk_smi_larb_get or mtk_smi_larb_put.

Quoted 10 lines
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +0 -0
index 1f5a112bb034..57c88de9a329 100644

drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c int mtk_ddp_comp_init(struct device *dev, struct device_node *node, · line 477

Quoted 7 lines
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +1 -0
@@ -471,6 +471,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
 	/* Only DMA capable components need the LARB property */
 	comp->larb_dev = NULL;
 	if (type != MTK_DISP_OVL &&
+	    type != MTK_DISP_OVL_2L &&
 	    type != MTK_DISP_RDMA &&
 	    type != MTK_DISP_WDMA)
 		return 0;

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Applied
#2 lore raw

Hi, Phong:

Quoted 10 lines · CK Hu

Hi, Phong:

Quoted 4 lines · Phong LE

The larb device remains NULL if the type is MTK_DISP_OVL_2L. A kernel panic is raised when a crtc uses mtk_smi_larb_get or mtk_smi_larb_put.

Applied to mediatek-drm-fixes-5.6 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6

Regards,
CK

Quoted 18 lines
Quoted 17 lines
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +1 -0
index 1f5a112bb034..57c88de9a329 100644
@@ -471,6 +471,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
 	/* Only DMA capable components need the LARB property */
 	comp->larb_dev = NULL;
 	if (type != MTK_DISP_OVL &&
+	    type != MTK_DISP_OVL_2L &&
 	    type != MTK_DISP_RDMA &&
 	    type != MTK_DISP_WDMA)
 		return 0;