* [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes
@ 2026-10-10 13:38 Mahadevan P
2026-10-10 13:38 ` [PATCH 1/4] drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0 Mahadevan P
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mahadevan P @ 2026-10-10 13:38 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Mahadevan P
Virtual planes can use two SSPPs when a plane exceeds the single-pipe
width or clock limit and parallel multirect cannot be used. The pair
can contain different SSPP types, depending on resource availability.
This series handles source split ordering for those pairs:
1. Keep the higher priority SSPP on the left before DPU 5.0.
2. Add the SRC_SPLIT_ORDER operation for DPU 5.0 through 12.x.
3. Program the order from the destination X positions, clearing the bit
for the left source and sources without a sibling.
4. Add the operation for the DPU 13.x SSPP rectangle banks.
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
---
Mahadevan P (4):
drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0
drm/msm/dpu: add SSPP op to program the source split order
drm/msm/dpu: program the source split order for split planes
drm/msm/dpu: add source split order op for DPU 13.x
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 19 ++++++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 35 +++++++++++++++++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 11 ++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c | 14 ++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 +++
5 files changed, 83 insertions(+)
---
base-commit: aac26bee2287c88af5be5a5ff96d783b19a28790
change-id: 20261009-pipe_order-87a83717ac4c
Best regards,
--
Mahadevan P <mahadevan.p@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0
2026-10-10 13:38 [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes Mahadevan P
@ 2026-10-10 13:38 ` Mahadevan P
2026-10-10 13:38 ` [PATCH 2/4] drm/msm/dpu: add SSPP op to program the source split order Mahadevan P
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mahadevan P @ 2026-10-10 13:38 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Mahadevan P
Before DPU 5.0, the layer mixer places the higher priority SSPP on
the left of a source-split pair. Priority follows the SSPP index
(VIG, RGB, DMA), while allocation prefers DMA, RGB, then VIG.
Swap the two SSPPs when the right one has the lower index. Both are
reserved with the same requirements. Same-SSPP parallel multirect
already puts RECT_0, the higher priority rectangle, on the left.
Fixes: 8c62a31607f6 ("drm/msm/dpu: allow using two SSPP blocks for a single plane")
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 1a471cdf767b..fe43ea9ae864 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1245,6 +1245,10 @@ static int dpu_plane_assign_resource_in_stage(struct dpu_sw_pipe *pipe,
r_pipe->multirect_index = DPU_SSPP_RECT_SOLO;
r_pipe->multirect_mode = DPU_SSPP_MULTIRECT_NONE;
+ if (dpu_kms->catalog->mdss_ver->core_major_ver < 5 &&
+ r_pipe->sspp->idx < pipe->sspp->idx)
+ swap(pipe->sspp, r_pipe->sspp);
+
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] drm/msm/dpu: add SSPP op to program the source split order
2026-10-10 13:38 [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes Mahadevan P
2026-10-10 13:38 ` [PATCH 1/4] drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0 Mahadevan P
@ 2026-10-10 13:38 ` Mahadevan P
2026-10-10 13:38 ` [PATCH 3/4] drm/msm/dpu: program the source split order for split planes Mahadevan P
2026-10-10 13:38 ` [PATCH 4/4] drm/msm/dpu: add source split order op for DPU 13.x Mahadevan P
3 siblings, 0 replies; 5+ messages in thread
From: Mahadevan P @ 2026-10-10 13:38 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Mahadevan P
DPU 5.0 introduced SRC_SPLIT_ORDER in bit 4 of SSPP_SRC_OP_MODE and
SSPP_SRC_OP_MODE_REC1. For source-split pairs using legacy CTL routing,
this field identifies the left source with 0 and the right source with 1.
Add a setup_src_split_order() operation for the SSPP register layout
used on DPU 5.0 through 12.x. Select SSPP_SRC_OP_MODE for SOLO or RECT0
and SSPP_SRC_OP_MODE_REC1 for RECT1, and update only the ordering bit.
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 35 +++++++++++++++++++++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 11 +++++++++
2 files changed, 46 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
index b5e50fc1916f..f6ec883f9066 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
@@ -84,6 +84,7 @@
#define MDSS_MDP_OP_IGC_EN BIT(16)
#define MDSS_MDP_OP_FLIP_UD BIT(14)
#define MDSS_MDP_OP_FLIP_LR BIT(13)
+#define MDSS_MDP_OP_SRC_SPLIT_ORDER BIT(4)
#define MDSS_MDP_OP_BWC_EN BIT(0)
#define MDSS_MDP_OP_PE_OVERRIDE BIT(31)
#define MDSS_MDP_OP_BWC_LOSSLESS (0 << 1)
@@ -260,6 +261,38 @@ static void dpu_hw_sspp_setup_format(struct dpu_sw_pipe *pipe,
ubwc_ctrl_off, ubwc_error_off);
}
+void dpu_hw_setup_src_split_order_impl(struct dpu_hw_sspp *ctx,
+ u32 op_mode_off, bool right)
+{
+ u32 opmode;
+
+ opmode = DPU_REG_READ(&ctx->hw, op_mode_off);
+ if (right)
+ opmode |= MDSS_MDP_OP_SRC_SPLIT_ORDER;
+ else
+ opmode &= ~MDSS_MDP_OP_SRC_SPLIT_ORDER;
+
+ DPU_REG_WRITE(&ctx->hw, op_mode_off, opmode);
+}
+
+static void dpu_hw_sspp_setup_src_split_order(struct dpu_sw_pipe *pipe,
+ bool right)
+{
+ struct dpu_hw_sspp *ctx = pipe->sspp;
+ u32 op_mode_off;
+
+ if (!ctx)
+ return;
+
+ if (pipe->multirect_index == DPU_SSPP_RECT_SOLO ||
+ pipe->multirect_index == DPU_SSPP_RECT_0)
+ op_mode_off = SSPP_SRC_OP_MODE;
+ else
+ op_mode_off = SSPP_SRC_OP_MODE_REC1;
+
+ dpu_hw_setup_src_split_order_impl(ctx, op_mode_off, right);
+}
+
void dpu_hw_setup_format_impl(struct dpu_sw_pipe *pipe, const struct msm_format *fmt,
u32 flags, struct dpu_hw_sspp *ctx, u32 op_mode_off,
u32 unpack_pat_off, u32 format_off, u32 ubwc_ctrl_off,
@@ -636,6 +669,8 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
c->ops.setup_sourceaddress = dpu_hw_sspp_setup_sourceaddress;
c->ops.setup_solidfill = dpu_hw_sspp_setup_solidfill;
c->ops.setup_pe = dpu_hw_sspp_setup_pe_config;
+ if (mdss_rev->core_major_ver >= 5)
+ c->ops.setup_src_split_order = dpu_hw_sspp_setup_src_split_order;
if (test_bit(DPU_SSPP_QOS, &features)) {
c->ops.setup_qos_lut = dpu_hw_sspp_setup_qos_lut;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
index 69d68cc916b2..9b9ea2e00a00 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
@@ -236,6 +236,14 @@ struct dpu_hw_sspp_ops {
void (*setup_multirect)(struct dpu_sw_pipe *pipe);
+ /**
+ * @setup_src_split_order: program the position of the pipe within
+ * a source split pair
+ * @pipe: Pointer to pipe context
+ * @right: true if the pipe fetches the right half of the pair
+ */
+ void (*setup_src_split_order)(struct dpu_sw_pipe *pipe, bool right);
+
/**
* @setup_sharpening: setup sharpening
* @ctx: Pointer to pipe context
@@ -349,6 +357,9 @@ void dpu_hw_setup_multirect_impl(struct dpu_sw_pipe *pipe,
struct dpu_hw_sspp *ctx,
u32 op_mode_off);
+void dpu_hw_setup_src_split_order_impl(struct dpu_hw_sspp *ctx,
+ u32 op_mode_off, bool right);
+
void dpu_hw_setup_format_impl(struct dpu_sw_pipe *pipe, const struct msm_format *fmt,
u32 flags, struct dpu_hw_sspp *ctx,
u32 op_mode_off, u32 unpack_pat_off, u32 format_off,
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] drm/msm/dpu: program the source split order for split planes
2026-10-10 13:38 [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes Mahadevan P
2026-10-10 13:38 ` [PATCH 1/4] drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0 Mahadevan P
2026-10-10 13:38 ` [PATCH 2/4] drm/msm/dpu: add SSPP op to program the source split order Mahadevan P
@ 2026-10-10 13:38 ` Mahadevan P
2026-10-10 13:38 ` [PATCH 4/4] drm/msm/dpu: add source split order op for DPU 13.x Mahadevan P
3 siblings, 0 replies; 5+ messages in thread
From: Mahadevan P @ 2026-10-10 13:38 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Mahadevan P
Virtual planes can use two SSPPs when a plane exceeds the single-pipe
width or clock limit and parallel multirect cannot be used.
Program SRC_SPLIT_ORDER during mixer setup from the pipes' destination
X positions. Set the bit for the right source and clear it for the
left source or a source without a sibling.
Fixes: 8c62a31607f6 ("drm/msm/dpu: allow using two SSPP blocks for a single plane")
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 77a2d1f6700d..91152d937ba3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -434,6 +434,18 @@ static void _dpu_crtc_blend_setup_pipe(struct drm_crtc *crtc,
mixer[lm_idx].lm_ctl->ops.update_pending_flush_sspp(mixer[lm_idx].lm_ctl, sspp_idx);
}
+static bool _dpu_crtc_pipe_is_right(const struct dpu_plane_state *pstate,
+ unsigned int pipe_idx)
+{
+ unsigned int other_idx = pipe_idx ^ 1;
+
+ if (!pstate->pipe[other_idx].sspp)
+ return false;
+
+ return pstate->pipe_cfg[pipe_idx].dst_rect.x1 >
+ pstate->pipe_cfg[other_idx].dst_rect.x1;
+}
+
static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer,
struct dpu_hw_stage_cfg *stage_cfg)
@@ -443,10 +455,13 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
struct drm_plane_state *state;
struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);
struct dpu_plane_state *pstate = NULL;
+ struct dpu_sw_pipe *pipe;
const struct msm_format *format;
struct dpu_hw_ctl *ctl = mixer->lm_ctl;
u32 lm_idx, stage, i, pipe_idx, head_pipe_in_stage, lms_in_pair;
bool bg_alpha_enable = false;
+ bool src_split = test_bit(DPU_MIXER_SOURCESPLIT,
+ &mixer->hw_lm->cap->features);
DECLARE_BITMAP(active_fetch, SSPP_MAX);
DECLARE_BITMAP(active_pipes, SSPP_MAX);
@@ -475,6 +490,10 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
pipe_idx = i + head_pipe_in_stage;
if (!pstate->pipe[pipe_idx].sspp)
continue;
+ pipe = &pstate->pipe[pipe_idx];
+ if (src_split && pipe->sspp->ops.setup_src_split_order)
+ pipe->sspp->ops.setup_src_split_order(pipe,
+ _dpu_crtc_pipe_is_right(pstate, pipe_idx));
lms_in_pair = min(cstate->num_mixers - (stage * PIPES_PER_STAGE),
PIPES_PER_STAGE);
set_bit(pstate->pipe[pipe_idx].sspp->idx, active_fetch);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] drm/msm/dpu: add source split order op for DPU 13.x
2026-10-10 13:38 [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes Mahadevan P
` (2 preceding siblings ...)
2026-10-10 13:38 ` [PATCH 3/4] drm/msm/dpu: program the source split order for split planes Mahadevan P
@ 2026-10-10 13:38 ` Mahadevan P
3 siblings, 0 replies; 5+ messages in thread
From: Mahadevan P @ 2026-10-10 13:38 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Mahadevan P
DPU 13.x places the SSPP op-mode register in separate REC0 and REC1
banks. Add the source split order operation for this layout, using
the shared helper to update SRC_SPLIT_ORDER in the selected bank.
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c
index f8f96ad971d7..bdf1201d8134 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c
@@ -149,6 +149,19 @@ static void dpu_hw_sspp_setup_format_v13(struct dpu_sw_pipe *pipe,
unpack_pat_off, format_off, ubwc_ctrl_off, ubwc_err_off);
}
+static void dpu_hw_sspp_setup_src_split_order_v13(struct dpu_sw_pipe *pipe,
+ bool right)
+{
+ struct dpu_hw_sspp *ctx = pipe->sspp;
+ u32 offset;
+
+ if (!ctx)
+ return;
+
+ offset = dpu_hw_sspp_calculate_rect_off(pipe->multirect_index, ctx);
+ dpu_hw_setup_src_split_order_impl(ctx, offset + SSPP_REC_SRC_OP_MODE, right);
+}
+
static void dpu_hw_sspp_setup_pe_config_v13(struct dpu_hw_sspp *ctx,
struct dpu_hw_pixel_ext *pe_ext)
{
@@ -299,6 +312,7 @@ void dpu_hw_sspp_init_v13(struct dpu_hw_sspp *c,
c->ops.setup_sourceaddress = dpu_hw_sspp_setup_sourceaddress_v13;
c->ops.setup_solidfill = dpu_hw_sspp_setup_solidfill_v13;
c->ops.setup_pe = dpu_hw_sspp_setup_pe_config_v13;
+ c->ops.setup_src_split_order = dpu_hw_sspp_setup_src_split_order_v13;
if (test_bit(DPU_SSPP_QOS, &features)) {
c->ops.setup_qos_lut = dpu_hw_sspp_setup_qos_lut_v13;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-10 13:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-10 13:38 [PATCH 0/4] drm/msm/dpu: fix pipe ordering for source-split planes Mahadevan P
2026-10-10 13:38 ` [PATCH 1/4] drm/msm/dpu: keep SSPP priority order for split planes on DPU < 5.0 Mahadevan P
2026-10-10 13:38 ` [PATCH 2/4] drm/msm/dpu: add SSPP op to program the source split order Mahadevan P
2026-10-10 13:38 ` [PATCH 3/4] drm/msm/dpu: program the source split order for split planes Mahadevan P
2026-10-10 13:38 ` [PATCH 4/4] drm/msm/dpu: add source split order op for DPU 13.x Mahadevan P
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®