From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Dmitry Baryshkov <lumag@kernel.org>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: <linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>
Subject: Re: [PATCH v3 2/8] drm/msm/dpu: program master INTF value
Date: Mon, 28 Apr 2025 15:48:52 -0700 [thread overview]
Message-ID: <61310672-171e-4496-ae6a-ad31fbdb2b83@quicinc.com> (raw)
In-Reply-To: <20250307-dpu-active-ctl-v3-2-5d20655f10ca@linaro.org>
On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote:
> From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> If several interfaces are being handled through a single CTL, a main
> ('master') INTF needs to be programmed into a separate register. Write
> corresponding value into that register.
>
> Co-developed-by: Marijn Suijten <marijn.suijten@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 12 ++++++++++++
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 2 ++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> index cef3bfaa4af82ebc55fb8cf76adef3075c7d73e3..21f4d403e3c278d83d7eaa6a7dd53f471d9e296d 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> @@ -603,6 +603,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
> DPU_REG_WRITE(c, CTL_DSC_ACTIVE, dsc_active);
> DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active);
>
> + if (cfg->intf_master)
> + DPU_REG_WRITE(c, CTL_INTF_MASTER, BIT(cfg->intf_master - INTF_0));
> +
> if (cfg->cdm)
> DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cfg->cdm);
> }
> @@ -645,6 +648,7 @@ static void dpu_hw_ctl_reset_intf_cfg_v1(struct dpu_hw_ctl *ctx,
> {
> struct dpu_hw_blk_reg_map *c = &ctx->hw;
> u32 intf_active = 0;
> + u32 intf_master = 0;
> u32 wb_active = 0;
> u32 cwb_active = 0;
> u32 merge3d_active = 0;
> @@ -672,6 +676,14 @@ static void dpu_hw_ctl_reset_intf_cfg_v1(struct dpu_hw_ctl *ctx,
> intf_active = DPU_REG_READ(c, CTL_INTF_ACTIVE);
> intf_active &= ~BIT(cfg->intf - INTF_0);
> DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
> +
> + intf_master = DPU_REG_READ(c, CTL_INTF_MASTER);
> +
> + /* Unset this intf as master, if it is the current master */
> + if (intf_master == BIT(cfg->intf - INTF_0)) {
> + DPU_DEBUG_DRIVER("Unsetting INTF_%d master\n", cfg->intf - INTF_0);
> + DPU_REG_WRITE(c, CTL_INTF_MASTER, 0);
> + }
> }
>
> if (cfg->cwb) {
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> index 080a9550a0cc6530b4115165dd737857b6213d15..cea23436fc80a17a679363a47f9f287b72623a1c 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> @@ -36,6 +36,7 @@ struct dpu_hw_stage_cfg {
> /**
> * struct dpu_hw_intf_cfg :Describes how the DPU writes data to output interface
> * @intf : Interface id
> + * @intf_master: Master interface id in the dual pipe topology
> * @mode_3d: 3d mux configuration
> * @merge_3d: 3d merge block used
> * @intf_mode_sel: Interface mode, cmd / vid
> @@ -46,6 +47,7 @@ struct dpu_hw_stage_cfg {
> */
> struct dpu_hw_intf_cfg {
> enum dpu_intf intf;
> + enum dpu_intf intf_master;
> enum dpu_wb wb;
> enum dpu_3d_blend_mode mode_3d;
> enum dpu_merge_3d merge_3d;
>
next prev parent reply other threads:[~2025-04-28 22:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov
2025-03-07 6:24 ` [PATCH v3 1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register Dmitry Baryshkov
2025-04-28 19:02 ` Jessica Zhang
2025-05-06 8:47 ` Marijn Suijten
2025-03-07 6:24 ` [PATCH v3 2/8] drm/msm/dpu: program master INTF value Dmitry Baryshkov
2025-04-28 22:48 ` Jessica Zhang [this message]
2025-03-07 6:24 ` [PATCH v3 3/8] drm/msm/dpu: pass master interface to CTL configuration Dmitry Baryshkov
2025-04-29 23:48 ` Jessica Zhang
2025-03-07 6:24 ` [PATCH v3 4/8] drm/msm/dpu: use single CTL if it is the only CTL returned by RM Dmitry Baryshkov
2025-04-28 23:57 ` Jessica Zhang
2025-03-07 6:24 ` [PATCH v3 5/8] drm/msm/dpu: don't select single flush for active CTL blocks Dmitry Baryshkov
2025-04-30 0:02 ` Jessica Zhang
2025-03-07 6:24 ` [PATCH v3 6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 Dmitry Baryshkov
2025-04-30 0:35 ` Jessica Zhang
2025-03-07 6:24 ` [PATCH v3 7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on " Dmitry Baryshkov
2025-04-30 0:42 ` Jessica Zhang
2025-03-07 6:24 ` [PATCH v3 8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls Dmitry Baryshkov
2025-04-30 0:42 ` Jessica Zhang
2025-05-04 16:13 ` [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov
2025-05-19 10:58 ` Dmitry Baryshkov
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=61310672-171e-4496-ae6a-ad31fbdb2b83@quicinc.com \
--to=quic_jesszhan@quicinc.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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