Skip to content

Commit

Permalink
drm/mediatek: Handle component type MTK_DISP_OVL_2L correctly
Browse files Browse the repository at this point in the history
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: b17bdd0 ("drm/mediatek: add component OVL_2L0")

Signed-off-by: Phong LE <ple@baylibre.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
  • Loading branch information
Phong LE authored and CK Hu committed Feb 25, 2020
1 parent 839cbf0 commit 3d2ed43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d2ed43

Please sign in to comment.