From: Marijn Suijten <marijn.suijten@somainline.org>
To: Teguh Sobirin <teguh@sobir.in>
Cc: 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>, David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/msm/dpu: Set vsync source irrespective of mdp top support
Date: Wed, 24 Dec 2025 11:10:35 +0100 [thread overview]
Message-ID: <aUu5vZdr9RJ-VML8@SoMainline.org> (raw)
In-Reply-To: <TYUPR06MB6099C539BD2C937F8630FF8EDDD5A@TYUPR06MB6099.apcprd06.prod.outlook.com>
On 2025-11-21 14:02:08, Teguh Sobirin wrote:
> Since DPU 5.x the vsync source TE setup is split between MDP TOP and
> INTF blocks. Currently all code to setup vsync_source is only exectued
typo: executed.
> if MDP TOP implements the setup_vsync_source() callback. However on
> DPU >= 8.x this callback is not implemented, making DPU driver skip all
> vsync setup. Move the INTF part out of this condition, letting DPU
> driver to setup TE vsync selection on all new DPU devices.
>
> Signed-off-by: Teguh Sobirin <teguh@sobir.in>
> ---
> Changes in v2:
> - Corrected commit message suggested by Dmitry Baryshkov.
> - Link to v1: https://lore.kernel.org/linux-arm-msm/TYUPR06MB6099CBBE5090DB12A2C187E3DDFDA@TYUPR06MB6099.apcprd06.prod.outlook.com/
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 22 +++++++++------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index d1cfe81a3373..f468d054f5bd 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -774,24 +774,20 @@ static void _dpu_encoder_update_vsync_source(struct dpu_encoder_virt *dpu_enc,
> return;
> }
>
> + /* Set vsync source irrespective of mdp top support */
Unnecessary comment, it's clear from the code flow that vsync_cfg.vsync_source
is passed down into both functions.
Perhaps we should pass disp_info->vsync_source directly into
hw_intf->ops.vsync_sel() and only initialize vsync_cfg when hw_mdptop has the
function, to make this clear.
> + vsync_cfg.vsync_source = disp_info->vsync_source;
> +
> if (hw_mdptop->ops.setup_vsync_source) {
> for (i = 0; i < dpu_enc->num_phys_encs; i++)
> vsync_cfg.ppnumber[i] = dpu_enc->hw_pp[i]->idx;
> + }
>
> - vsync_cfg.pp_count = dpu_enc->num_phys_encs;
This change is not mentioned in the commit description. While true that
pp_count is only used by dpu_hw_setup_vsync_sel(), that is still a valid
function to be called on DPU < 5; it denotes the amount of ppnumber[i] array
entries are used above.
> - vsync_cfg.frame_rate = drm_mode_vrefresh(&dpu_enc->base.crtc->state->adjusted_mode);
Same, also not mentioned in the commit description. frame_rate
is used by dpu_hw_setup_wd_timer() on DPU < 8.
> -
> - vsync_cfg.vsync_source = disp_info->vsync_source;
> -
> - hw_mdptop->ops.setup_vsync_source(hw_mdptop, &vsync_cfg);
But all of the above comments don't matter if the call to setup_vsync_source()
is removed entirely - it didn't move anywhere else. This is not described in
the commit message.
- Marijn
> -
> - for (i = 0; i < dpu_enc->num_phys_encs; i++) {
> - phys_enc = dpu_enc->phys_encs[i];
> + for (i = 0; i < dpu_enc->num_phys_encs; i++) {
> + phys_enc = dpu_enc->phys_encs[i];
>
> - if (phys_enc->has_intf_te && phys_enc->hw_intf->ops.vsync_sel)
> - phys_enc->hw_intf->ops.vsync_sel(phys_enc->hw_intf,
> - vsync_cfg.vsync_source);
> - }
> + if (phys_enc->has_intf_te && phys_enc->hw_intf->ops.vsync_sel)
> + phys_enc->hw_intf->ops.vsync_sel(phys_enc->hw_intf,
> + vsync_cfg.vsync_source);
> }
> }
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-12-24 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 6:02 [PATCH v2] drm/msm/dpu: Set vsync source irrespective of mdp top support Teguh Sobirin
2025-11-21 12:16 ` Dmitry Baryshkov
2025-12-24 10:00 ` Marijn Suijten
2025-12-24 12:43 ` Dmitry Baryshkov
2025-12-24 9:27 ` Dmitry Baryshkov
2025-12-24 10:10 ` Marijn Suijten [this message]
2025-12-24 13:03 ` Dmitry Baryshkov
2025-12-24 13:30 ` Teguh Sobirin
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=aUu5vZdr9RJ-VML8@SoMainline.org \
--to=marijn.suijten@somainline.org \
--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=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=teguh@sobir.in \
/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