<html><body><p>
<pre>
On Thu, 2025-03-20 at 09:48 +0100, Alexandre Mergnat wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> 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.

In MT8173, need this custom init so dsi could work correctly.
I'm not sure it's software problem or hardware problem.
If it's hardware problem, this custom init could not be removed.
If it's software problem, it may be fixed in current version.
But I don't know it's fixed or not.
So I need someone to test this patch in MT8173 platform.
Otherwise, I could not apply this patch.

Regards,
CK

>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
> ---
> 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
>


</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->