Enable PM Runtime at the end of mtk_dsi_probe() so that the
mediatek-drm mtk_ddp_comp_power_on() function is able to do
pm_runtime_resume_and_get() and, analogously, the function
mtk_ddp_comp_power_off() to pm_runtime_put() for the DSI
device.

This makes sure that the power domains for the DSI IP are
turned on and off when necessary.

Signed-off-by: AngeloGioacchino Del Regno 
<[email protected]>
---
 drivers/gpu/drm/mediatek/mtk_dsi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c 
b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 93bc507d77e2..1726f5a2683c 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -1731,6 +1731,10 @@ static int mtk_dsi_probe(struct platform_device *pdev)
        if (ret)
                return dev_err_probe(&pdev->dev, ret, "Failed to request DSI 
irq\n");
 
+       ret = devm_pm_runtime_enable(dev);
+       if (ret)
+               return ret;
+
        ret = mipi_dsi_host_register(&dsi->host);
        if (ret < 0)
                return dev_err_probe(dev, ret, "Failed to register DSI host\n");
-- 
2.54.0

Reply via email to