From: Jun Nie <jun.nie@linaro.org>
To: Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <lumag@kernel.org>, Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Jessica Zhang <quic_jesszhan@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jun Nie <jun.nie@linaro.org>,
Dmitry Baryshkov <lumag@kernel.org>
Subject: [PATCH v12 04/12] drm/msm/dpu: bind correct pingpong for quad pipe
Date: Mon, 07 Jul 2025 14:17:59 +0800 [thread overview]
Message-ID: <20250707-v6-16-rc2-quad-pipe-upstream-v12-4-67e3721e7d83@linaro.org> (raw)
In-Reply-To: <20250707-v6-16-rc2-quad-pipe-upstream-v12-0-67e3721e7d83@linaro.org>
There are 2 interfaces and 4 pingpong in quad pipe. Map the 2nd
interface to 3rd PP instead of the 2nd PP.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index b476d3c97ac9b6b4c5ca2963aa4a5805d57c8d7e..2d88d9129ec787df6dac70e6f4488ab77c6aeeed 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1158,7 +1158,7 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc,
struct dpu_hw_blk *hw_ctl[MAX_CHANNELS_PER_ENC];
struct dpu_hw_blk *hw_dsc[MAX_CHANNELS_PER_ENC];
struct dpu_hw_blk *hw_cwb[MAX_CHANNELS_PER_ENC];
- int num_ctl, num_pp, num_dsc;
+ int num_ctl, num_pp, num_dsc, num_pp_per_intf;
int num_cwb = 0;
bool is_cwb_encoder;
unsigned int dsc_mask = 0;
@@ -1237,10 +1237,16 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc,
dpu_enc->cur_master->hw_cdm = hw_cdm ? to_dpu_hw_cdm(hw_cdm) : NULL;
}
+ /*
+ * There may be 4 PP and 2 INTF for quad pipe case, so INTF is not
+ * mapped to PP 1:1. Let's calculate the stride with pipe/INTF
+ */
+ num_pp_per_intf = num_pp / dpu_enc->num_phys_encs;
+
for (i = 0; i < dpu_enc->num_phys_encs; i++) {
struct dpu_encoder_phys *phys = dpu_enc->phys_encs[i];
- phys->hw_pp = dpu_enc->hw_pp[i];
+ phys->hw_pp = dpu_enc->hw_pp[num_pp_per_intf * i];
if (!phys->hw_pp) {
DPU_ERROR_ENC(dpu_enc,
"no pp block assigned at idx: %d\n", i);
--
2.34.1
next prev parent reply other threads:[~2025-07-07 6:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 6:17 [PATCH v12 00/12] drm/msm/dpu: Support quad pipe with dual-interface Jun Nie
2025-07-07 6:17 ` [PATCH v12 01/12] drm/msm/dpu: polish log for resource allocation Jun Nie
2025-07-07 6:17 ` [PATCH v12 02/12] drm/msm/dpu: decide right side per last bit Jun Nie
2025-07-07 6:17 ` [PATCH v12 03/12] drm/msm/dpu: fix mixer number counter on allocation Jun Nie
2025-07-07 6:17 ` Jun Nie [this message]
2025-07-07 6:18 ` [PATCH v12 05/12] drm/msm/dpu: Add pipe as trace argument Jun Nie
2025-07-07 6:18 ` [PATCH v12 06/12] drm/msm/dpu: handle pipes as array Jun Nie
2025-07-07 6:18 ` [PATCH v12 07/12] drm/msm/dpu: split PIPES_PER_STAGE definition per plane and mixer Jun Nie
2025-07-07 6:18 ` [PATCH v12 08/12] drm/msm/dpu: Use dedicated WB number definition Jun Nie
2025-07-07 6:18 ` [PATCH v12 09/12] drm/msm/dpu: blend pipes per mixer pairs config Jun Nie
2025-07-07 6:18 ` [PATCH v12 10/12] drm/msm/dpu: support SSPP assignment for quad-pipe case Jun Nie
2025-07-19 10:09 ` Dmitry Baryshkov
2025-07-21 8:06 ` Jun Nie
2025-07-22 12:04 ` Dmitry Baryshkov
2025-07-24 1:56 ` Jun Nie
2025-07-25 13:45 ` Dmitry Baryshkov
2025-07-07 6:18 ` [PATCH v12 11/12] drm/msm/dpu: support plane splitting in " Jun Nie
2025-07-07 6:18 ` [PATCH v12 12/12] drm/msm/dpu: Enable quad-pipe for DSC and dual-DSI case Jun Nie
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=20250707-v6-16-rc2-quad-pipe-upstream-v12-4-67e3721e7d83@linaro.org \
--to=jun.nie@linaro.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).