Skip to content

Commit e09a7f8

Browse files
hsinyi527Chun-Kuang Hu
authored andcommitted
drm/mediatek: Fix device passed to cmdq
drm device is now probed from mmsys. We need to use mmsys device to get gce nodes. Fix following errors: [ 0.740068] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) [ 0.748721] mediatek-drm mediatek-drm.1.auto: error -2 can't parse gce-client-reg property (0) ... [ 2.659645] mediatek-drm mediatek-drm.1.auto: failed to request channel [ 2.666270] mediatek-drm mediatek-drm.1.auto: failed to request channel Fixes: 667c769 ("soc / drm: mediatek: Fix mediatek-drm device probing") Signed-off-by: Hsin-Yi Wang <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Tested-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent b3a9e3b commit e09a7f8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/gpu/drm/mediatek/mtk_drm_crtc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,8 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
831831

832832
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
833833
mtk_crtc->cmdq_client =
834-
cmdq_mbox_create(dev, drm_crtc_index(&mtk_crtc->base),
834+
cmdq_mbox_create(mtk_crtc->mmsys_dev,
835+
drm_crtc_index(&mtk_crtc->base),
835836
2000);
836837
if (IS_ERR(mtk_crtc->cmdq_client)) {
837838
dev_dbg(dev, "mtk_crtc %d failed to create mailbox client, writing register by CPU now\n",

drivers/gpu/drm/mediatek/mtk_drm_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ static int mtk_drm_probe(struct platform_device *pdev)
514514
goto err_node;
515515
}
516516

517-
ret = mtk_ddp_comp_init(dev, node, comp, comp_id, NULL);
517+
ret = mtk_ddp_comp_init(dev->parent, node, comp,
518+
comp_id, NULL);
518519
if (ret) {
519520
of_node_put(node);
520521
goto err_node;

0 commit comments

Comments
 (0)