[PATCH v8 3/3] drm/mediatek: dsi: remove custom init part

From: Alexandre Mergnat
Date: Thu Mar 20 2025 - 04:50:09 EST


To be aligned with the DRM framework and avoid DSI power being driven
by two different entities, remove the custom function and keep the DRM
API to initialize the DSI.

Signed-off-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 2 --
drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 --
drivers/gpu/drm/mediatek/mtk_dsi.c | 16 ----------------
3 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index edc6417639e64..d86eed0d279d3 100644
--- a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
@@ -317,8 +317,6 @@ static const struct mtk_ddp_comp_funcs ddp_dsc = {
};

static const struct mtk_ddp_comp_funcs ddp_dsi = {
- .start = mtk_dsi_ddp_start,
- .stop = mtk_dsi_ddp_stop,
.encoder_index = mtk_dsi_encoder_index,
};

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_drv.h b/drivers/gpu/drm/mediatek/mtk_disp_drv.h
index 04217a36939cd..5657854fa2f9e 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_drv.h
+++ b/drivers/gpu/drm/mediatek/mtk_disp_drv.h
@@ -47,8 +47,6 @@ void mtk_dpi_start(struct device *dev);
void mtk_dpi_stop(struct device *dev);
unsigned int mtk_dpi_encoder_index(struct device *dev);

-void mtk_dsi_ddp_start(struct device *dev);
-void mtk_dsi_ddp_stop(struct device *dev);
unsigned int mtk_dsi_encoder_index(struct device *dev);

int mtk_gamma_clk_enable(struct device *dev);
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index e61b9bc68e9a3..b813b49340420 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -787,7 +787,6 @@ static void mtk_output_dsi_enable(struct mtk_dsi *dsi)
{
if (dsi->enabled)
return;
-
mtk_dsi_lane_ready(dsi);
mtk_dsi_set_mode(dsi);
mtk_dsi_clk_hs_mode(dsi, 1);
@@ -893,20 +892,6 @@ static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = {
.mode_set = mtk_dsi_bridge_mode_set,
};

-void mtk_dsi_ddp_start(struct device *dev)
-{
- struct mtk_dsi *dsi = dev_get_drvdata(dev);
-
- mtk_dsi_poweron(dsi);
-}
-
-void mtk_dsi_ddp_stop(struct device *dev)
-{
- struct mtk_dsi *dsi = dev_get_drvdata(dev);
-
- mtk_dsi_poweroff(dsi);
-}
-
static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)
{
int ret;
@@ -1243,7 +1228,6 @@ static int mtk_dsi_probe(struct platform_device *pdev)
}

init_waitqueue_head(&dsi->irq_wait_queue);
-
platform_set_drvdata(pdev, dsi);

dsi->bridge.funcs = &mtk_dsi_bridge_funcs;

--
2.25.1