mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: CK Hu <ck.hu@mediatek.com>
To: Fabien Parent <fparent@baylibre.com>, <matthias.bgg@gmail.com>,
	<jitao.shi@mediatek.com>, <krzysztof.kozlowski+dt@linaro.org>,
	<robh+dt@kernel.org>
Cc: <chunkuang.hu@kernel.org>, <p.zabel@pengutronix.de>,
	<airlied@linux.ie>, <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>,
	<linux-mediatek@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 4/7] soc: mediatek: mutex: add MT8365 support
Date: Fri, 17 Jun 2022 13:50:18 +0800	[thread overview]
Message-ID: <e63682c60d3f3c29c941c1ff5db10903466d3d34.camel@mediatek.com> (raw)
In-Reply-To: <20220530201436.902505-4-fparent@baylibre.com>

Hi, Fabien:

On Mon, 2022-05-30 at 22:14 +0200, Fabien Parent wrote:
> Add mutex support for MT8365 SoC.

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  drivers/soc/mediatek/mtk-mutex.c | 40
> ++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mutex.c
> b/drivers/soc/mediatek/mtk-mutex.c
> index 981d56967e7a..b8d5c4a62542 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -110,6 +110,20 @@
>  #define MT8195_MUTEX_MOD_DISP_DP_INTF0		21
>  #define MT8195_MUTEX_MOD_DISP_PWM0		27
>  
> +#define MT8365_MUTEX_MOD_DISP_OVL0		7
> +#define MT8365_MUTEX_MOD_DISP_OVL0_2L		8
> +#define MT8365_MUTEX_MOD_DISP_RDMA0		9
> +#define MT8365_MUTEX_MOD_DISP_RDMA1		10
> +#define MT8365_MUTEX_MOD_DISP_WDMA0		11
> +#define MT8365_MUTEX_MOD_DISP_COLOR0		12
> +#define MT8365_MUTEX_MOD_DISP_CCORR		13
> +#define MT8365_MUTEX_MOD_DISP_AAL		14
> +#define MT8365_MUTEX_MOD_DISP_GAMMA		15
> +#define MT8365_MUTEX_MOD_DISP_DITHER		16
> +#define MT8365_MUTEX_MOD_DISP_DSI0		17
> +#define MT8365_MUTEX_MOD_DISP_PWM0		20
> +#define MT8365_MUTEX_MOD_DISP_DPI0		22
> +
>  #define MT2712_MUTEX_MOD_DISP_PWM2		10
>  #define MT2712_MUTEX_MOD_DISP_OVL0		11
>  #define MT2712_MUTEX_MOD_DISP_OVL1		12
> @@ -315,6 +329,22 @@ static const unsigned int
> mt8195_mutex_mod[DDP_COMPONENT_ID_MAX] = {
>  	[DDP_COMPONENT_DP_INTF0] = MT8195_MUTEX_MOD_DISP_DP_INTF0,
>  };
>  
> +static const unsigned int mt8365_mutex_mod[DDP_COMPONENT_ID_MAX] = {
> +	[DDP_COMPONENT_AAL0] = MT8365_MUTEX_MOD_DISP_AAL,
> +	[DDP_COMPONENT_CCORR] = MT8365_MUTEX_MOD_DISP_CCORR,
> +	[DDP_COMPONENT_COLOR0] = MT8365_MUTEX_MOD_DISP_COLOR0,
> +	[DDP_COMPONENT_DITHER] = MT8365_MUTEX_MOD_DISP_DITHER,
> +	[DDP_COMPONENT_DPI0] = MT8365_MUTEX_MOD_DISP_DPI0,
> +	[DDP_COMPONENT_DSI0] = MT8365_MUTEX_MOD_DISP_DSI0,
> +	[DDP_COMPONENT_GAMMA] = MT8365_MUTEX_MOD_DISP_GAMMA,
> +	[DDP_COMPONENT_OVL0] = MT8365_MUTEX_MOD_DISP_OVL0,
> +	[DDP_COMPONENT_OVL_2L0] = MT8365_MUTEX_MOD_DISP_OVL0_2L,
> +	[DDP_COMPONENT_PWM0] = MT8365_MUTEX_MOD_DISP_PWM0,
> +	[DDP_COMPONENT_RDMA0] = MT8365_MUTEX_MOD_DISP_RDMA0,
> +	[DDP_COMPONENT_RDMA1] = MT8365_MUTEX_MOD_DISP_RDMA1,
> +	[DDP_COMPONENT_WDMA0] = MT8365_MUTEX_MOD_DISP_WDMA0,
> +};
> +
>  static const unsigned int mt2712_mutex_sof[DDP_MUTEX_SOF_MAX] = {
>  	[MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE,
>  	[MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0,
> @@ -423,6 +453,14 @@ static const struct mtk_mutex_data
> mt8195_mutex_driver_data = {
>  	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
>  };
>  
> +static const struct mtk_mutex_data mt8365_mutex_driver_data = {
> +	.mutex_mod = mt8365_mutex_mod,
> +	.mutex_sof = mt8183_mutex_sof,
> +	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> +	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> +	.no_clk = true,
> +};
> +
>  struct mtk_mutex *mtk_mutex_get(struct device *dev)
>  {
>  	struct mtk_mutex_ctx *mtx = dev_get_drvdata(dev);
> @@ -665,6 +703,8 @@ static const struct of_device_id
> mutex_driver_dt_match[] = {
>  	  .data = &mt8192_mutex_driver_data},
>  	{ .compatible = "mediatek,mt8195-disp-mutex",
>  	  .data = &mt8195_mutex_driver_data},
> +	{ .compatible = "mediatek,mt8365-disp-mutex",
> +	  .data = &mt8365_mutex_driver_data},
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, mutex_driver_dt_match);


  reply	other threads:[~2022-06-17  5:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 20:14 [PATCH 1/7] dt-bindings: display: mediatek: dpi: add power-domains property Fabien Parent
2022-05-30 20:14 ` [PATCH 2/7] dt-bindings: display: mediatek: dpi: add binding for MT8365 Fabien Parent
2022-05-31 11:53   ` Krzysztof Kozlowski
2022-06-17  5:38   ` CK Hu
2022-05-30 20:14 ` [PATCH 3/7] dt-bindings: display: mediatek: add bindings for MT8365 SoC Fabien Parent
2022-06-17  5:44   ` CK Hu
2022-06-17 10:24   ` Matthias Brugger
2022-05-30 20:14 ` [PATCH 4/7] soc: mediatek: mutex: add MT8365 support Fabien Parent
2022-06-17  5:50   ` CK Hu [this message]
2022-06-17 10:26     ` Matthias Brugger
2022-05-30 20:14 ` [PATCH 5/7] soc: mediatek: mt8365-mmsys: add DPI/HDMI display path Fabien Parent
2022-06-17  5:53   ` CK Hu
2022-06-17 10:26     ` Matthias Brugger
2022-05-30 20:14 ` [PATCH 6/7] drm/mediatek: dpi: add support for dpi clock Fabien Parent
2022-05-30 20:14 ` [PATCH 7/7] drm/mediatek: add MT8365 SoC support Fabien Parent
2022-06-17  5:58   ` CK Hu
2022-05-31 13:21 ` [PATCH 1/7] dt-bindings: display: mediatek: dpi: add power-domains property Rob Herring
2022-06-17  5:31 ` 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=e63682c60d3f3c29c941c1ff5db10903466d3d34.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=airlied@linux.ie \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fparent@baylibre.com \
    --cc=jitao.shi@mediatek.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®