All of lore.kernel.org
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"Alexandre Mergnat" <amergnat@baylibre.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"quic_jesszhan@quicinc.com" <quic_jesszhan@quicinc.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"will@kernel.org" <will@kernel.org>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 3/3] drm/mediatek: dsi: remove custom init part
Date: Fri, 21 Mar 2025 00:59:46 +0000	[thread overview]
Message-ID: <c0f31248f8ea936147445d92f7e39d93f5d47c35.camel@mediatek.com> (raw)
In-Reply-To: <20231023-display-support-v8-3-c2dd7b0fb2bd@baylibre.com>

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
> 


WARNING: multiple messages have this Message-ID (diff)
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"Alexandre Mergnat" <amergnat@baylibre.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"quic_jesszhan@quicinc.com" <quic_jesszhan@quicinc.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"will@kernel.org" <will@kernel.org>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 3/3] drm/mediatek: dsi: remove custom init part
Date: Fri, 21 Mar 2025 00:59:46 +0000	[thread overview]
Message-ID: <c0f31248f8ea936147445d92f7e39d93f5d47c35.camel@mediatek.com> (raw)
In-Reply-To: <20231023-display-support-v8-3-c2dd7b0fb2bd@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 3514 bytes --]

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
> 


[-- Attachment #2: Type: text/html, Size: 6808 bytes --]

  reply	other threads:[~2025-03-21  1:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  8:48 [PATCH v8 0/3] Add display support for the MT8365-EVK board Alexandre Mergnat
2025-03-20  8:48 ` [PATCH v8 1/3] arm64: defconfig: enable display support for mt8365-evk Alexandre Mergnat
2025-05-16 12:47   ` Alexandre Mergnat
2025-03-20  8:48 ` [PATCH v8 2/3] drm/panel: startek-kd070fhfid015: add another init step Alexandre Mergnat
2025-03-20 12:37   ` AngeloGioacchino Del Regno
2025-03-21  9:19     ` Alexandre Mergnat
2025-04-15 14:13       ` Alexandre Mergnat
2025-04-15 14:46         ` AngeloGioacchino Del Regno
2025-05-16 12:51           ` Alexandre Mergnat
2025-03-20  8:48 ` [PATCH v8 3/3] drm/mediatek: dsi: remove custom init part Alexandre Mergnat
2025-03-21  0:59   ` CK Hu (胡俊光) [this message]
2025-03-21  0:59     ` CK Hu (胡俊光)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0f31248f8ea936147445d92f7e39d93f5d47c35.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=catalin.marinas@arm.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_jesszhan@quicinc.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.