summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mediatek
diff options
context:
space:
mode:
authorPhong LE <ple@baylibre.com>2020-02-19 15:13:24 +0100
committerCK Hu <ck.hu@mediatek.com>2020-02-25 13:02:22 +0800
commit3d2ed431b8f39483477bc3c3a2aefbc9778ffe12 (patch)
tree3d31c1901508015bdb8f7869ffcd41079a8dbeae /drivers/gpu/drm/mediatek
parent839cbf0531428f3f9535077a461b8631359c1165 (diff)
downloadlinux-3d2ed431b8f39483477bc3c3a2aefbc9778ffe12.tar.bz2
drm/mediatek: Handle component type MTK_DISP_OVL_2L correctly
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. Fixes: b17bdd0d7a73 ("drm/mediatek: add component OVL_2L0") Signed-off-by: Phong LE <ple@baylibre.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
Diffstat (limited to 'drivers/gpu/drm/mediatek')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index 1f5a112bb034..57c88de9a329 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -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;