diff options
author | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-03-25 20:31:23 +0300 |
---|---|---|
committer | Matthias Brugger <matthias.bgg@gmail.com> | 2020-04-13 14:01:16 +0300 |
commit | 667c769246b01c53ad0925d603d2a2531abd3ef2 (patch) | |
tree | 3ed13ec75644fbf9f55297611b12016044802d34 /drivers/soc/mediatek/mtk-mmsys.c | |
parent | 2c758e301ed95aefde68f98584204811d55c9bb8 (diff) | |
download | linux-667c769246b01c53ad0925d603d2a2531abd3ef2.tar.xz |
soc / drm: mediatek: Fix mediatek-drm device probing
In the actual implementation the same compatible string
"mediatek,<chip>-mmsys" is used to bind the clock drivers
(drivers/soc/mediatek) as well as to the gpu driver
(drivers/gpu/drm/mediatek/mtk_drm_drv.c). This ends with the problem
that the only probed driver is the clock driver and there is no display
at all.
In any case having the same compatible string for two drivers is not
correct and should be fixed. To fix this, and maintain backward
compatibility, we can consider that the mmsys driver is the top-level
entry point for the multimedia subsystem, so is not a pure clock
controller but a system controller, and the drm driver is instantiated
by that MMSYS driver.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Acked-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Diffstat (limited to 'drivers/soc/mediatek/mtk-mmsys.c')
-rw-r--r-- | drivers/soc/mediatek/mtk-mmsys.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index 703064f45616..05e322c9c301 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -287,6 +287,7 @@ static int mtk_mmsys_probe(struct platform_device *pdev) const struct mtk_mmsys_driver_data *data; struct device *dev = &pdev->dev; struct platform_device *clks; + struct platform_device *drm; void __iomem *config_regs; struct resource *mem; int ret; @@ -309,6 +310,11 @@ static int mtk_mmsys_probe(struct platform_device *pdev) if (IS_ERR(clks)) return PTR_ERR(clks); + drm = platform_device_register_data(&pdev->dev, "mediatek-drm", + PLATFORM_DEVID_AUTO, NULL, 0); + if (IS_ERR(drm)) + return PTR_ERR(drm); + return 0; } |