From: Mahadevan P <mahadevan.p@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Mahadevan P <mahadevan.p@oss.qualcomm.com>
Subject: [PATCH 2/4] drm/msm/dpu: add SSPP op to program the source split order
Date: Sat, 10 Oct 2026 19:08:22 +0530 [thread overview]
Message-ID: <20261010-pipe_order-v1-2-9d8bd29fd78a@oss.qualcomm.com> (raw)
In-Reply-To: <20261010-pipe_order-v1-0-9d8bd29fd78a@oss.qualcomm.com>
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
next prev parent reply other threads:[~2026-10-10 13:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261010-pipe_order-v1-2-9d8bd29fd78a@oss.qualcomm.com \
--to=mahadevan.p@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®