From: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Abhinav Kumar <abhinav.kumar@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] drm/msm/dpu: Check mode against PINGPONG or DSC max width
Date: Thu, 15 May 2025 17:39:06 -0700 [thread overview]
Message-ID: <24e419da-71f8-4b0d-9416-0fe4c63eed0f@oss.qualcomm.com> (raw)
In-Reply-To: <f2brfgvsnwqu5rudr32fkjx6qiuut2im546mjqrk2ouego4npx@g6avls6o7kws>
On 5/14/2025 5:28 PM, Dmitry Baryshkov wrote:
> On Wed, May 14, 2025 at 04:52:31PM -0700, Jessica Zhang wrote:
>> Validate requested mode and topology based on the PINGPONG or DSC encoder
>> max width. In addition, drop MAX_HDISPLAY_SPLIT and base LM reservation
>> off of PINGPONG or DSC encoder max width
>
> Separate commit for num_lm, please.
Hi Dmitry,
Ack.
>
>>
>> As noted in the patch, while DPU 8.x+ supports a max linewidth of 8960
>> for PINGPONG_0, there is some additional logic that needs to be added to
>> the resource manager to specifically try and reserve PINGPONG_0 for
>> modes that are greater than 5k.
>>
>> Since this is out of the scope of this series, add a helper that will
>> get the overall minimum PINGPONG max linewidth for a given chipset.
>>
>> Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
>> ---
>> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 46 +++++++++++++++++++++++++++-----
>> 1 file changed, 39 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
>> index 0714936d8835..6131d071b051 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
>> @@ -723,6 +723,31 @@ void dpu_crtc_complete_commit(struct drm_crtc *crtc)
>> _dpu_crtc_complete_flip(crtc);
>> }
>>
>> +static int msm_display_get_max_pingpong_width(struct dpu_kms *dpu_kms)
>> +{
>> + const struct dpu_pingpong_cfg *pingpong;
>> + u32 max_pingpong_width = dpu_kms->catalog->pingpong[0].max_linewidth;
>> +
>> + /*
>> + * Find the smallest overall PINGPONG max_linewidth in the catalog since
>> + * max_linewidth can differ between PINGPONGs even within the same
>> + * chipset.
>> + *
>> + * Note: While, for DPU 8.x+, PINGPONG_0 can technically support up to
>> + * 8k resolutions, this requires reworking the RM to try to reserve
>> + * PINGPONG_0 for modes greater than 5k.
>> + *
>> + * Once this additional logic is implemented, we can drop this helper
>> + * and use the reserved PINGPONG's max_linewidth
>> + */
>> + for (int i = 1; i < dpu_kms->catalog->pingpong_count; i++) {
>> + pingpong = &dpu_kms->catalog->pingpong[i];
>> + max_pingpong_width = min(max_pingpong_width, pingpong->max_linewidth);
>> + }
>
> Since we are skipping PINGPONG_0, wouldn't it be enough to return
> max_linewidth of PP_1 ?
I don't think we're skipping PINGPONG_0 here since `u32
max_pingpong_width = dpu_kms->catalog->pingpong[0].max_linewidth;` at
the top of the function.
>
> I think, it would be easier to follow .max_dsc_encoder_width and store
> .max_pingpong_linewidth in dpu_caps (and later add special
> .max_pp0_linewidth).
Ack. I think my only concern for this is that max_pp0_linewidth won't be
set for all chipsets. But if you're fine with that I'll go ahead and
make this change.
Thanks,
Jessica Zhang
>
>> +
>> + return max_pingpong_width;
>> +}
>> +
>> static int _dpu_crtc_check_and_setup_lm_bounds(struct drm_crtc *crtc,
>> struct drm_crtc_state *state)
>> {
>
next prev parent reply other threads:[~2025-05-16 0:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 23:52 [PATCH 0/5] drm/msm/dpu: Drop max_mixer_width and MAX_HDISPLAY_SPLIT Jessica Zhang
2025-05-14 23:52 ` [PATCH 1/5] drm/msm/dpu: Drop maxwidth from dpu_lm_sub_blks struct Jessica Zhang
2025-05-15 0:32 ` Dmitry Baryshkov
2025-05-14 23:52 ` [PATCH 2/5] drm/msm/dpu: Add max pingpong and dsc width to HW catalog Jessica Zhang
2025-05-15 0:21 ` Dmitry Baryshkov
2025-05-15 17:13 ` Jessica Zhang
2025-05-14 23:52 ` [PATCH 3/5] drm/msm/dpu: Check mode against PINGPONG or DSC max width Jessica Zhang
2025-05-15 0:28 ` Dmitry Baryshkov
2025-05-16 0:39 ` Jessica Zhang [this message]
2025-05-16 16:19 ` Dmitry Baryshkov
2025-12-31 8:30 ` Xilin Wu
2026-01-03 17:43 ` Dmitry Baryshkov
2025-05-14 23:52 ` [PATCH 4/5] drm/msm/dpu: Filter writeback modes using writeback maxlinewidth Jessica Zhang
2025-05-15 0:17 ` Dmitry Baryshkov
2025-05-16 0:48 ` Jessica Zhang
2025-05-16 21:40 ` Dmitry Baryshkov
2025-05-14 23:52 ` [PATCH 5/5] drm/msm/dpu: Remove max_mixer_width from catalog Jessica Zhang
2025-05-15 0:32 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24e419da-71f8-4b0d-9416-0fe4c63eed0f@oss.qualcomm.com \
--to=jessica.zhang@oss.qualcomm.com \
--cc=abhinav.kumar@oss.qualcomm.com \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@oss.qualcomm.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=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®