* [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms
@ 2025-03-07 6:24 Dmitry Baryshkov
2025-03-07 6:24 ` [PATCH v3 1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register Dmitry Baryshkov
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw)
To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong
Since version 5.0 the DPU got an improved way of handling multi-output
configurations. It is now possible to program all pending changes
through a single CTL and flush everything at the same time.
Implement corresponding changes in the DPU driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v3:
- Rebased on top of msm-next
- Link to v2: https://lore.kernel.org/r/20250228-dpu-active-ctl-v2-0-9a9df2ee5193@linaro.org
Changes in v2:
- Made CTL_MERGE_3D_ACTIVE writes unconditional (Marijn)
- Added CTL_INTF_MASTER clearing in dpu_hw_ctl_reset_intf_cfg_v1
(Marijn)
- Added a patch to drop extra rm->has_legacy_ctls condition (and an
explanation why it can not be folded in an earlier patch).
- Link to v1: https://lore.kernel.org/r/20250220-dpu-active-ctl-v1-0-71ca67a564f8@linaro.org
---
Dmitry Baryshkov (8):
drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register
drm/msm/dpu: program master INTF value
drm/msm/dpu: pass master interface to CTL configuration
drm/msm/dpu: use single CTL if it is the only CTL returned by RM
drm/msm/dpu: don't select single flush for active CTL blocks
drm/msm/dpu: allocate single CTL for DPU >= 5.0
drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0
drm/msm/dpu: drop now-unused condition for has_legacy_ctls
.../drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 5 ++---
.../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 5 ++---
.../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 4 ++--
.../gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 4 ++--
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 5 ++---
.../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 5 ++---
.../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 5 ++---
.../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 5 ++---
.../drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 5 ++---
.../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 5 ++---
.../drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 5 ++---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 +++++-
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 ++
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 5 ++++-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 20 ++++++++++++++---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 2 ++
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 25 +++++++++++-----------
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++
18 files changed, 67 insertions(+), 48 deletions(-)
---
base-commit: 565351ae7e0cee80e9b5ed84452a5b13644ffc4d
change-id: 20250209-dpu-active-ctl-08cca4d8b08a
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 20+ messages in thread* [PATCH v3 1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register 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 ` 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 ` (7 subsequent siblings) 8 siblings, 2 replies; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> In case of complex pipelines (e.g. the forthcoming quad-pipe) the DPU might use more that one MERGE_3D block for a single output. Follow the pattern and extend the CTL_MERGE_3D_ACTIVE active register instead of simply writing new value there. Currently at most one MERGE_3D block is being used, so this has no impact on existing targets. 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> --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 411a7cf088eb72f856940c09b0af9e108ccade4b..cef3bfaa4af82ebc55fb8cf76adef3075c7d73e3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -563,6 +563,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, u32 wb_active = 0; u32 cwb_active = 0; u32 mode_sel = 0; + u32 merge_3d_active = 0; /* CTL_TOP[31:28] carries group_id to collate CTL paths * per VM. Explicitly disable it until VM support is @@ -578,6 +579,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, wb_active = DPU_REG_READ(c, CTL_WB_ACTIVE); cwb_active = DPU_REG_READ(c, CTL_CWB_ACTIVE); dsc_active = DPU_REG_READ(c, CTL_DSC_ACTIVE); + merge_3d_active = DPU_REG_READ(c, CTL_MERGE_3D_ACTIVE); if (cfg->intf) intf_active |= BIT(cfg->intf - INTF_0); @@ -591,15 +593,15 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, if (cfg->dsc) dsc_active |= cfg->dsc; + if (cfg->merge_3d) + merge_3d_active |= BIT(cfg->merge_3d - MERGE_3D_0); + DPU_REG_WRITE(c, CTL_TOP, mode_sel); DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active); DPU_REG_WRITE(c, CTL_WB_ACTIVE, wb_active); DPU_REG_WRITE(c, CTL_CWB_ACTIVE, cwb_active); DPU_REG_WRITE(c, CTL_DSC_ACTIVE, dsc_active); - - if (cfg->merge_3d) - DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, - BIT(cfg->merge_3d - MERGE_3D_0)); + DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active); if (cfg->cdm) DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cfg->cdm); -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register 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 1 sibling, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-28 19:02 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > In case of complex pipelines (e.g. the forthcoming quad-pipe) the DPU > might use more that one MERGE_3D block for a single output. Follow the > pattern and extend the CTL_MERGE_3D_ACTIVE active register instead of > simply writing new value there. Currently at most one MERGE_3D block is > being used, so this has no impact on existing targets. > > 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 | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > 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 411a7cf088eb72f856940c09b0af9e108ccade4b..cef3bfaa4af82ebc55fb8cf76adef3075c7d73e3 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > @@ -563,6 +563,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > u32 wb_active = 0; > u32 cwb_active = 0; > u32 mode_sel = 0; > + u32 merge_3d_active = 0; > > /* CTL_TOP[31:28] carries group_id to collate CTL paths > * per VM. Explicitly disable it until VM support is > @@ -578,6 +579,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > wb_active = DPU_REG_READ(c, CTL_WB_ACTIVE); > cwb_active = DPU_REG_READ(c, CTL_CWB_ACTIVE); > dsc_active = DPU_REG_READ(c, CTL_DSC_ACTIVE); > + merge_3d_active = DPU_REG_READ(c, CTL_MERGE_3D_ACTIVE); > > if (cfg->intf) > intf_active |= BIT(cfg->intf - INTF_0); > @@ -591,15 +593,15 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > if (cfg->dsc) > dsc_active |= cfg->dsc; > > + if (cfg->merge_3d) > + merge_3d_active |= BIT(cfg->merge_3d - MERGE_3D_0); > + > DPU_REG_WRITE(c, CTL_TOP, mode_sel); > DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active); > DPU_REG_WRITE(c, CTL_WB_ACTIVE, wb_active); > DPU_REG_WRITE(c, CTL_CWB_ACTIVE, cwb_active); > DPU_REG_WRITE(c, CTL_DSC_ACTIVE, dsc_active); > - > - if (cfg->merge_3d) > - DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, > - BIT(cfg->merge_3d - MERGE_3D_0)); > + DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active); > > if (cfg->cdm) > DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cfg->cdm); > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register 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 1 sibling, 0 replies; 20+ messages in thread From: Marijn Suijten @ 2025-05-06 8:47 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Rob Clark, Abhinav Kumar, Sean Paul, David Airlie, Simona Vetter, linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 2025-03-07 08:24:49, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > In case of complex pipelines (e.g. the forthcoming quad-pipe) the DPU > might use more that one MERGE_3D block for a single output. Follow the > pattern and extend the CTL_MERGE_3D_ACTIVE active register instead of > simply writing new value there. Currently at most one MERGE_3D block is > being used, so this has no impact on existing targets. Too late now that this patch has already been merged, but good to track for posterity: it'd be nice if the commit message mentions that dpu_hw_ctl_reset_intf_cfg_v1() already takes this approach, and only unsets the merge_3d bit provided in dpu_hw_intf_cfg, and doesn't clear the whole register to zero :) - Marijn > > 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> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > 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 411a7cf088eb72f856940c09b0af9e108ccade4b..cef3bfaa4af82ebc55fb8cf76adef3075c7d73e3 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > @@ -563,6 +563,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > u32 wb_active = 0; > u32 cwb_active = 0; > u32 mode_sel = 0; > + u32 merge_3d_active = 0; > > /* CTL_TOP[31:28] carries group_id to collate CTL paths > * per VM. Explicitly disable it until VM support is > @@ -578,6 +579,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > wb_active = DPU_REG_READ(c, CTL_WB_ACTIVE); > cwb_active = DPU_REG_READ(c, CTL_CWB_ACTIVE); > dsc_active = DPU_REG_READ(c, CTL_DSC_ACTIVE); > + merge_3d_active = DPU_REG_READ(c, CTL_MERGE_3D_ACTIVE); > > if (cfg->intf) > intf_active |= BIT(cfg->intf - INTF_0); > @@ -591,15 +593,15 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > if (cfg->dsc) > dsc_active |= cfg->dsc; > > + if (cfg->merge_3d) > + merge_3d_active |= BIT(cfg->merge_3d - MERGE_3D_0); > + > DPU_REG_WRITE(c, CTL_TOP, mode_sel); > DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active); > DPU_REG_WRITE(c, CTL_WB_ACTIVE, wb_active); > DPU_REG_WRITE(c, CTL_CWB_ACTIVE, cwb_active); > DPU_REG_WRITE(c, CTL_DSC_ACTIVE, dsc_active); > - > - if (cfg->merge_3d) > - DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, > - BIT(cfg->merge_3d - MERGE_3D_0)); > + DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active); > > if (cfg->cdm) > DPU_REG_WRITE(c, CTL_CDM_ACTIVE, cfg->cdm); > > -- > 2.39.5 > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 2/8] drm/msm/dpu: program master INTF value 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-03-07 6:24 ` Dmitry Baryshkov 2025-04-28 22:48 ` Jessica Zhang 2025-03-07 6:24 ` [PATCH v3 3/8] drm/msm/dpu: pass master interface to CTL configuration Dmitry Baryshkov ` (6 subsequent siblings) 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong 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> --- 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; -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 2/8] drm/msm/dpu: program master INTF value 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-28 22:48 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong 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; > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 3/8] drm/msm/dpu: pass master interface to CTL configuration 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-03-07 6:24 ` [PATCH v3 2/8] drm/msm/dpu: program master INTF value Dmitry Baryshkov @ 2025-03-07 6:24 ` 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 ` (5 subsequent siblings) 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Active controls require setup of the master interface. Pass the selected interface to CTL configuration. 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> --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index da9994a79ca293ec0265680c438835742102db2a..a0ba55ab3c894c200225fe48ec6214ae4135d059 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -60,6 +60,8 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg( return; intf_cfg.intf = phys_enc->hw_intf->idx; + if (phys_enc->split_role == ENC_ROLE_MASTER) + intf_cfg.intf_master = phys_enc->hw_intf->idx; intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD; intf_cfg.stream_sel = cmd_enc->stream_sel; intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index abd6600046cb3a91bf88ca240fd9b9c306b0ea2e..232055473ba55998b79dd2e8c752c129bbffbff4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -298,6 +298,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine( if (phys_enc->hw_cdm) intf_cfg.cdm = phys_enc->hw_cdm->idx; intf_cfg.intf = phys_enc->hw_intf->idx; + if (phys_enc->split_role == ENC_ROLE_MASTER) + intf_cfg.intf_master = phys_enc->hw_intf->idx; intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID; intf_cfg.stream_sel = 0; /* Don't care value for video mode */ intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 3/8] drm/msm/dpu: pass master interface to CTL configuration 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-29 23:48 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Active controls require setup of the master interface. Pass the selected > interface to CTL configuration. > > 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_encoder_phys_cmd.c | 2 ++ > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > index da9994a79ca293ec0265680c438835742102db2a..a0ba55ab3c894c200225fe48ec6214ae4135d059 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c > @@ -60,6 +60,8 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg( > return; > > intf_cfg.intf = phys_enc->hw_intf->idx; > + if (phys_enc->split_role == ENC_ROLE_MASTER) > + intf_cfg.intf_master = phys_enc->hw_intf->idx; > intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD; > intf_cfg.stream_sel = cmd_enc->stream_sel; > intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > index abd6600046cb3a91bf88ca240fd9b9c306b0ea2e..232055473ba55998b79dd2e8c752c129bbffbff4 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > @@ -298,6 +298,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine( > if (phys_enc->hw_cdm) > intf_cfg.cdm = phys_enc->hw_cdm->idx; > intf_cfg.intf = phys_enc->hw_intf->idx; > + if (phys_enc->split_role == ENC_ROLE_MASTER) > + intf_cfg.intf_master = phys_enc->hw_intf->idx; > intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID; > intf_cfg.stream_sel = 0; /* Don't care value for video mode */ > intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 4/8] drm/msm/dpu: use single CTL if it is the only CTL returned by RM 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (2 preceding siblings ...) 2025-03-07 6:24 ` [PATCH v3 3/8] drm/msm/dpu: pass master interface to CTL configuration Dmitry Baryshkov @ 2025-03-07 6:24 ` 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 ` (4 subsequent siblings) 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> On DPU >= 5.0 CTL blocks were reworked in order to support using a single CTL for all outputs. In preparation of reworking the RM code to return single CTL make sure that dpu_encoder can cope with that. 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> --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 0eed93a4d056beda6b54c0d20f027a53c84f67db..b5e8ba592d8af298a52924d34a573d4f9e05c476 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1247,7 +1247,11 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc, return; } - phys->hw_ctl = i < num_ctl ? to_dpu_hw_ctl(hw_ctl[i]) : NULL; + /* Use first (and only) CTL if active CTLs are supported */ + if (num_ctl == 1) + phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[0]); + else + phys->hw_ctl = i < num_ctl ? to_dpu_hw_ctl(hw_ctl[i]) : NULL; if (!phys->hw_ctl) { DPU_ERROR_ENC(dpu_enc, "no ctl block assigned at idx: %d\n", i); -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 4/8] drm/msm/dpu: use single CTL if it is the only CTL returned by RM 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-28 23:57 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > On DPU >= 5.0 CTL blocks were reworked in order to support using a > single CTL for all outputs. In preparation of reworking the RM code to > return single CTL make sure that dpu_encoder can cope with that. > > 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_encoder.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 0eed93a4d056beda6b54c0d20f027a53c84f67db..b5e8ba592d8af298a52924d34a573d4f9e05c476 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -1247,7 +1247,11 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc, > return; > } > > - phys->hw_ctl = i < num_ctl ? to_dpu_hw_ctl(hw_ctl[i]) : NULL; > + /* Use first (and only) CTL if active CTLs are supported */ > + if (num_ctl == 1) > + phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[0]); > + else > + phys->hw_ctl = i < num_ctl ? to_dpu_hw_ctl(hw_ctl[i]) : NULL; > if (!phys->hw_ctl) { > DPU_ERROR_ENC(dpu_enc, > "no ctl block assigned at idx: %d\n", i); > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 5/8] drm/msm/dpu: don't select single flush for active CTL blocks 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (3 preceding siblings ...) 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-03-07 6:24 ` 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 ` (3 subsequent siblings) 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> In case of ACTIVE CTLs, a single CTL is being used for flushing all INTF blocks. Don't skip programming the CTL on those targets. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 232055473ba55998b79dd2e8c752c129bbffbff4..8a618841e3ea89acfe4a42d48319a6c54a1b3495 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -374,7 +374,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg) static bool dpu_encoder_phys_vid_needs_single_flush( struct dpu_encoder_phys *phys_enc) { - return phys_enc->split_role != ENC_ROLE_SOLO; + return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) && + phys_enc->split_role != ENC_ROLE_SOLO; } static void dpu_encoder_phys_vid_atomic_mode_set( -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 5/8] drm/msm/dpu: don't select single flush for active CTL blocks 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-30 0:02 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > In case of ACTIVE CTLs, a single CTL is being used for flushing all INTF > blocks. Don't skip programming the CTL on those targets. > > 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_encoder_phys_vid.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > index 232055473ba55998b79dd2e8c752c129bbffbff4..8a618841e3ea89acfe4a42d48319a6c54a1b3495 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c > @@ -374,7 +374,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg) > static bool dpu_encoder_phys_vid_needs_single_flush( > struct dpu_encoder_phys *phys_enc) > { > - return phys_enc->split_role != ENC_ROLE_SOLO; > + return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) && > + phys_enc->split_role != ENC_ROLE_SOLO; > } > > static void dpu_encoder_phys_vid_atomic_mode_set( > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (4 preceding siblings ...) 2025-03-07 6:24 ` [PATCH v3 5/8] drm/msm/dpu: don't select single flush for active CTL blocks Dmitry Baryshkov @ 2025-03-07 6:24 ` 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 ` (2 subsequent siblings) 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Unlike previous generation, since DPU 5.0 it is possible to use just one CTL to handle all INTF and WB blocks for a single output. And one has to use single CTL to support bonded DSI config. Allocate single CTL for these DPU versions. 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> --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 28 +++++++++++++++------------- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index 3efbba425ca6e037cb9646981ebb0f0354ffea8e..c72b968d58a65960605456e752278def2a21df7b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -53,6 +53,8 @@ int dpu_rm_init(struct drm_device *dev, /* Clear, setup lists */ memset(rm, 0, sizeof(*rm)); + rm->has_legacy_ctls = (cat->mdss_ver->core_major_ver < 5); + /* Interrogate HW catalog and create tracking items for hw blocks */ for (i = 0; i < cat->mixer_count; i++) { struct dpu_hw_mixer *hw; @@ -434,20 +436,19 @@ static int _dpu_rm_reserve_ctls( int i = 0, j, num_ctls; bool needs_split_display; - /* - * For non-CWB mode, each hw_intf needs its own hw_ctl to program its - * control path. - * - * Hardcode num_ctls to 1 if CWB is enabled because in CWB, both the - * writeback and real-time encoders must be driven by the same control - * path - */ - if (top->cwb_enabled) - num_ctls = 1; - else + if (rm->has_legacy_ctls) { + /* + * TODO: check if there is a need for special handling if + * DPU < 5.0 get CWB support. + */ num_ctls = top->num_intf; - needs_split_display = _dpu_rm_needs_split_display(top); + needs_split_display = _dpu_rm_needs_split_display(top); + } else { + /* use single CTL */ + num_ctls = 1; + needs_split_display = false; + } for (j = 0; j < ARRAY_SIZE(rm->ctl_blks); j++) { const struct dpu_hw_ctl *ctl; @@ -465,7 +466,8 @@ static int _dpu_rm_reserve_ctls( DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features); - if (needs_split_display != has_split_display) + if (rm->has_legacy_ctls && + needs_split_display != has_split_display) continue; ctl_idx[i] = j; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h index a19dbdb1b6f48ad708f0d512c2460d092856f52f..aa62966056d489d9c94c61f24051a2f3e7b7ed89 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h @@ -24,6 +24,7 @@ struct dpu_global_state; * @dspp_blks: array of dspp hardware resources * @hw_sspp: array of sspp hardware resources * @cdm_blk: cdm hardware resource + * @has_legacy_ctls: DPU uses pre-ACTIVE CTL blocks. */ struct dpu_rm { struct dpu_hw_blk *pingpong_blks[PINGPONG_MAX - PINGPONG_0]; @@ -37,6 +38,7 @@ struct dpu_rm { struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0]; struct dpu_hw_sspp *hw_sspp[SSPP_MAX - SSPP_NONE]; struct dpu_hw_blk *cdm_blk; + bool has_legacy_ctls; }; struct dpu_rm_sspp_requirements { -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-30 0:35 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Unlike previous generation, since DPU 5.0 it is possible to use just one > CTL to handle all INTF and WB blocks for a single output. And one has to > use single CTL to support bonded DSI config. Allocate single CTL for > these DPU versions. > > 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_rm.c | 28 +++++++++++++++------------- > drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++ > 2 files changed, 17 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > index 3efbba425ca6e037cb9646981ebb0f0354ffea8e..c72b968d58a65960605456e752278def2a21df7b 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > @@ -53,6 +53,8 @@ int dpu_rm_init(struct drm_device *dev, > /* Clear, setup lists */ > memset(rm, 0, sizeof(*rm)); > > + rm->has_legacy_ctls = (cat->mdss_ver->core_major_ver < 5); > + > /* Interrogate HW catalog and create tracking items for hw blocks */ > for (i = 0; i < cat->mixer_count; i++) { > struct dpu_hw_mixer *hw; > @@ -434,20 +436,19 @@ static int _dpu_rm_reserve_ctls( > int i = 0, j, num_ctls; > bool needs_split_display; > > - /* > - * For non-CWB mode, each hw_intf needs its own hw_ctl to program its > - * control path. > - * > - * Hardcode num_ctls to 1 if CWB is enabled because in CWB, both the > - * writeback and real-time encoders must be driven by the same control > - * path > - */ > - if (top->cwb_enabled) > - num_ctls = 1; > - else > + if (rm->has_legacy_ctls) { > + /* > + * TODO: check if there is a need for special handling if > + * DPU < 5.0 get CWB support. > + */ Regarding this note: there will need to be special handling for CWB for DPU < 5.0 since one CTL will be driving both the WB and real-time encoders. That being said, the current driver only supports CWB for DPU 10.x+, so I'm also OK if the special handling is added whenever CWB for DPU < 5.0 is added. Thanks, Jessica Zhang > num_ctls = top->num_intf; > > - needs_split_display = _dpu_rm_needs_split_display(top); > + needs_split_display = _dpu_rm_needs_split_display(top); > + } else { > + /* use single CTL */ > + num_ctls = 1; > + needs_split_display = false; > + } > > for (j = 0; j < ARRAY_SIZE(rm->ctl_blks); j++) { > const struct dpu_hw_ctl *ctl; > @@ -465,7 +466,8 @@ static int _dpu_rm_reserve_ctls( > > DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features); > > - if (needs_split_display != has_split_display) > + if (rm->has_legacy_ctls && > + needs_split_display != has_split_display) > continue; > > ctl_idx[i] = j; > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h > index a19dbdb1b6f48ad708f0d512c2460d092856f52f..aa62966056d489d9c94c61f24051a2f3e7b7ed89 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h > @@ -24,6 +24,7 @@ struct dpu_global_state; > * @dspp_blks: array of dspp hardware resources > * @hw_sspp: array of sspp hardware resources > * @cdm_blk: cdm hardware resource > + * @has_legacy_ctls: DPU uses pre-ACTIVE CTL blocks. > */ > struct dpu_rm { > struct dpu_hw_blk *pingpong_blks[PINGPONG_MAX - PINGPONG_0]; > @@ -37,6 +38,7 @@ struct dpu_rm { > struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0]; > struct dpu_hw_sspp *hw_sspp[SSPP_MAX - SSPP_NONE]; > struct dpu_hw_blk *cdm_blk; > + bool has_legacy_ctls; > }; > > struct dpu_rm_sspp_requirements { > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (5 preceding siblings ...) 2025-03-07 6:24 ` [PATCH v3 6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 Dmitry Baryshkov @ 2025-03-07 6:24 ` 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-05-04 16:13 ` [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Since DPU 5.0 CTL blocks do not require DPU_CTL_SPLIT_DISPLAY, as single CTL is used for both interfaces. As both RM and encoder now handle active CTLs, drop that feature bit. 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> --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 5 ++--- 11 files changed, 22 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h index 85fde7243dd4d011ed1e3a5719fd6c98cf7d6e77..e7639f3d187cbe606a66af1b2fd6306cdb044972 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h @@ -27,17 +27,16 @@ static const struct dpu_mdp_cfg sm8650_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8650_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x1000, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x1000, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h index 23188290001ffb45563a9953a9f710bacb4dac89..9b7884d7695c700b39860db207171802beaa93d8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h @@ -37,17 +37,16 @@ static const struct dpu_mdp_cfg sm8150_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8150_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x1000, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x1200, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h index de8ccf589f1fe026ca0697d48f9533befda4659d..745b4e701c2d13b25a78d29b767b26b8a06dd006 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h @@ -41,12 +41,12 @@ static const struct dpu_ctl_cfg sc8180x_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x1000, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x1200, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h index b2ebf76e386718b95292e119d53e67f5d9f0743a..9b63e4a44449aeba998fc0cceb21c88acbaf8499 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h @@ -38,12 +38,12 @@ static const struct dpu_ctl_cfg sm7150_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x1000, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x1200, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h index 47e01c3c242f9a2ecb201b04be5effd7ff0d04b1..a86fdb33ebddc7f2a9914ef04899397e3271b79e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sm8250_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8250_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x1000, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x1200, .len = 0x1e0, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = BIT(DPU_CTL_ACTIVE_CFG), .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h index 795e9ebf8c11dcc7d7cae7444fc3e386ced5792d..977af601b4decefbee4b5f1f2b24f3d7fe6ed18a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sm8350_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8350_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x1e8, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x1e8, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h index fcee1c3665f88a9defca4fec38dd76d56c97297e..426a8d76c707f3fe1d95faf2183cb16e565940b3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sc8280xp_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sc8280xp_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h index 048dfb9dbb601bdbbf6a1326a7af8680f2777b5d..767b8e7866c6a32bf5fa7eb85f9039eede32742c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h @@ -36,17 +36,16 @@ static const struct dpu_mdp_cfg sm8450_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8450_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h index 4d96ce71746f2595427649d0fdb73dae0c18be60..c248b3b55c410d8e374b8b659eeddbb657bbe854 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sa8775p_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sa8775p_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x204, - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, + .features = CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h index a5b90e5e31202900c0bb5bc4a705a6b269005474..65cdf95a02c7634dcc364d5b3b7990e3d6210829 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h @@ -27,17 +27,16 @@ static const struct dpu_mdp_cfg sm8550_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sm8550_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x290, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x290, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h index 8977fa48926b40d486110424f70344c4d29abe80..beadfa0c0daef9ef352847d6fd1cf5b8763a17b8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h @@ -26,17 +26,16 @@ static const struct dpu_mdp_cfg x1e80100_mdp = { }, }; -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg x1e80100_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x290, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, { .name = "ctl_1", .id = CTL_1, .base = 0x16000, .len = 0x290, - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), + .features = CTL_SM8550_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), }, { .name = "ctl_2", .id = CTL_2, -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-30 0:42 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Since DPU 5.0 CTL blocks do not require DPU_CTL_SPLIT_DISPLAY, as single > CTL is used for both interfaces. As both RM and encoder now handle > active CTLs, drop that feature bit. > > 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/catalog/dpu_10_0_sm8650.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 4 ++-- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 4 ++-- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 5 ++--- > drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 5 ++--- > 11 files changed, 22 insertions(+), 31 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > index 85fde7243dd4d011ed1e3a5719fd6c98cf7d6e77..e7639f3d187cbe606a66af1b2fd6306cdb044972 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > @@ -27,17 +27,16 @@ static const struct dpu_mdp_cfg sm8650_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8650_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x1000, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x1000, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h > index 23188290001ffb45563a9953a9f710bacb4dac89..9b7884d7695c700b39860db207171802beaa93d8 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h > @@ -37,17 +37,16 @@ static const struct dpu_mdp_cfg sm8150_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8150_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x1000, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x1200, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h > index de8ccf589f1fe026ca0697d48f9533befda4659d..745b4e701c2d13b25a78d29b767b26b8a06dd006 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h > @@ -41,12 +41,12 @@ static const struct dpu_ctl_cfg sc8180x_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x1000, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x1200, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h > index b2ebf76e386718b95292e119d53e67f5d9f0743a..9b63e4a44449aeba998fc0cceb21c88acbaf8499 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h > @@ -38,12 +38,12 @@ static const struct dpu_ctl_cfg sm7150_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x1000, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x1200, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > index 47e01c3c242f9a2ecb201b04be5effd7ff0d04b1..a86fdb33ebddc7f2a9914ef04899397e3271b79e 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sm8250_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8250_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x1000, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x1200, .len = 0x1e0, > - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = BIT(DPU_CTL_ACTIVE_CFG), > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h > index 795e9ebf8c11dcc7d7cae7444fc3e386ced5792d..977af601b4decefbee4b5f1f2b24f3d7fe6ed18a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h > @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sm8350_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8350_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x1e8, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x1e8, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h > index fcee1c3665f88a9defca4fec38dd76d56c97297e..426a8d76c707f3fe1d95faf2183cb16e565940b3 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h > @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sc8280xp_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sc8280xp_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h > index 048dfb9dbb601bdbbf6a1326a7af8680f2777b5d..767b8e7866c6a32bf5fa7eb85f9039eede32742c 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h > @@ -36,17 +36,16 @@ static const struct dpu_mdp_cfg sm8450_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8450_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h > index 4d96ce71746f2595427649d0fdb73dae0c18be60..c248b3b55c410d8e374b8b659eeddbb657bbe854 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h > @@ -35,17 +35,16 @@ static const struct dpu_mdp_cfg sa8775p_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sa8775p_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x204, > - .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, > + .features = CTL_SC7280_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > index a5b90e5e31202900c0bb5bc4a705a6b269005474..65cdf95a02c7634dcc364d5b3b7990e3d6210829 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > @@ -27,17 +27,16 @@ static const struct dpu_mdp_cfg sm8550_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg sm8550_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x290, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x290, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h > index 8977fa48926b40d486110424f70344c4d29abe80..beadfa0c0daef9ef352847d6fd1cf5b8763a17b8 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h > @@ -26,17 +26,16 @@ static const struct dpu_mdp_cfg x1e80100_mdp = { > }, > }; > > -/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ > static const struct dpu_ctl_cfg x1e80100_ctl[] = { > { > .name = "ctl_0", .id = CTL_0, > .base = 0x15000, .len = 0x290, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), > }, { > .name = "ctl_1", .id = CTL_1, > .base = 0x16000, .len = 0x290, > - .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), > + .features = CTL_SM8550_MASK, > .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), > }, { > .name = "ctl_2", .id = CTL_2, > ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (6 preceding siblings ...) 2025-03-07 6:24 ` [PATCH v3 7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on " Dmitry Baryshkov @ 2025-03-07 6:24 ` 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 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-03-07 6:24 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Now as we have dropped the DPU_CTL_SPLIT_DISPLAY from DPU >= 5.0 configuration, drop the rm->has_legacy_ctl condition which short-cutted the check for those platforms. Suggested-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> --- Note, it is imposible to reoder commits in any other sensible way. The DPU_CTL_SPLIT_DISPLAY can not be dropped before the patch that enables single-CTL support. --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index c72b968d58a65960605456e752278def2a21df7b..2e296f79cba1437470eeb30900a650f6f4e334b6 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -466,8 +466,7 @@ static int _dpu_rm_reserve_ctls( DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features); - if (rm->has_legacy_ctls && - needs_split_display != has_split_display) + if (needs_split_display != has_split_display) continue; ctl_idx[i] = j; -- 2.39.5 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls 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 0 siblings, 0 replies; 20+ messages in thread From: Jessica Zhang @ 2025-04-30 0:42 UTC (permalink / raw) To: Dmitry Baryshkov, Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On 3/6/2025 10:24 PM, Dmitry Baryshkov wrote: > From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Now as we have dropped the DPU_CTL_SPLIT_DISPLAY from DPU >= 5.0 > configuration, drop the rm->has_legacy_ctl condition which short-cutted > the check for those platforms. > > Suggested-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> > --- > > Note, it is imposible to reoder commits in any other sensible way. The > DPU_CTL_SPLIT_DISPLAY can not be dropped before the patch that enables > single-CTL support. > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > index c72b968d58a65960605456e752278def2a21df7b..2e296f79cba1437470eeb30900a650f6f4e334b6 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c > @@ -466,8 +466,7 @@ static int _dpu_rm_reserve_ctls( > > DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features); > > - if (rm->has_legacy_ctls && > - needs_split_display != has_split_display) > + if (needs_split_display != has_split_display) > continue; > > ctl_idx[i] = j; > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms 2025-03-07 6:24 [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms Dmitry Baryshkov ` (7 preceding siblings ...) 2025-03-07 6:24 ` [PATCH v3 8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls Dmitry Baryshkov @ 2025-05-04 16:13 ` Dmitry Baryshkov 2025-05-19 10:58 ` Dmitry Baryshkov 8 siblings, 1 reply; 20+ messages in thread From: Dmitry Baryshkov @ 2025-05-04 16:13 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter, Dmitry Baryshkov Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On Fri, 07 Mar 2025 08:24:48 +0200, Dmitry Baryshkov wrote: > Since version 5.0 the DPU got an improved way of handling multi-output > configurations. It is now possible to program all pending changes > through a single CTL and flush everything at the same time. > > Implement corresponding changes in the DPU driver. > > > [...] Applied, thanks! [1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register https://gitlab.freedesktop.org/lumag/msm/-/commit/ef595c04e843 [2/8] drm/msm/dpu: program master INTF value https://gitlab.freedesktop.org/lumag/msm/-/commit/6a013b60cf44 [3/8] drm/msm/dpu: pass master interface to CTL configuration https://gitlab.freedesktop.org/lumag/msm/-/commit/696707d3d22c [4/8] drm/msm/dpu: use single CTL if it is the only CTL returned by RM https://gitlab.freedesktop.org/lumag/msm/-/commit/df99bdfcb2d5 [5/8] drm/msm/dpu: don't select single flush for active CTL blocks https://gitlab.freedesktop.org/lumag/msm/-/commit/e93eee524bb7 [6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 https://gitlab.freedesktop.org/lumag/msm/-/commit/c1824a7992da [7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0 https://gitlab.freedesktop.org/lumag/msm/-/commit/a2649952f66e [8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls https://gitlab.freedesktop.org/lumag/msm/-/commit/1fb28a8a984e Best regards, -- Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 0/8] drm/msm/dpu: improve CTL handling on DPU >= 5.0 platforms 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 0 siblings, 0 replies; 20+ messages in thread From: Dmitry Baryshkov @ 2025-05-19 10:58 UTC (permalink / raw) To: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie, Simona Vetter, Dmitry Baryshkov Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Neil Armstrong On Fri, 07 Mar 2025 08:24:48 +0200, Dmitry Baryshkov wrote: > Since version 5.0 the DPU got an improved way of handling multi-output > configurations. It is now possible to program all pending changes > through a single CTL and flush everything at the same time. > > Implement corresponding changes in the DPU driver. > > > [...] Applied, thanks! [1/8] drm/msm/dpu: don't overwrite CTL_MERGE_3D_ACTIVE register https://gitlab.freedesktop.org/lumag/msm/-/commit/ef595c04e843 [2/8] drm/msm/dpu: program master INTF value https://gitlab.freedesktop.org/lumag/msm/-/commit/6a013b60cf44 [3/8] drm/msm/dpu: pass master interface to CTL configuration https://gitlab.freedesktop.org/lumag/msm/-/commit/696707d3d22c [4/8] drm/msm/dpu: use single CTL if it is the only CTL returned by RM https://gitlab.freedesktop.org/lumag/msm/-/commit/df99bdfcb2d5 [5/8] drm/msm/dpu: don't select single flush for active CTL blocks https://gitlab.freedesktop.org/lumag/msm/-/commit/e93eee524bb7 [6/8] drm/msm/dpu: allocate single CTL for DPU >= 5.0 https://gitlab.freedesktop.org/lumag/msm/-/commit/c1824a7992da [7/8] drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0 https://gitlab.freedesktop.org/lumag/msm/-/commit/a2649952f66e [8/8] drm/msm/dpu: drop now-unused condition for has_legacy_ctls https://gitlab.freedesktop.org/lumag/msm/-/commit/1fb28a8a984e Best regards, -- Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2025-05-19 10:58 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox