From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Dave Airlie <airlied@redhat.com>,
Jocelyn Falempe <jfalempe@redhat.com>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
Kalyan Thota <quic_kalyant@quicinc.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH 0/6] drm: introduce atomic_needs_modeset() callbacks
Date: Fri, 24 Jan 2025 15:12:41 +0200 [thread overview]
Message-ID: <Z5ORyQ_49ZNmAxtq@intel.com> (raw)
In-Reply-To: <Z5OOo9yR7PVXXIj4@phenom.ffwll.local>
On Fri, Jan 24, 2025 at 01:59:15PM +0100, Simona Vetter wrote:
> On Fri, Jan 24, 2025 at 02:10:54PM +0200, Ville Syrjälä wrote:
> > On Fri, Jan 24, 2025 at 01:14:18PM +0200, Dmitry Baryshkov wrote:
> > > There are several drivers which attempt to upgrading the commit to the
> > > full mode set from their per-object atomic_check() callbacks without
> > > calling the drm_atomic_helper_check_modeset() or
> > > drm_atomic_helper_check() again (as requested by those functions).
> >
> > I don't really understand why any of that is supposedly necessary.
> > drm_atomic_helper_check_modeset() is really all about the
> > connector routing stuff, so if none of that is changing then there
> > is no point in calling it again. Eg. in i915 we call it just at
> > the start, and later on we flag internal modesets all over the
> > place, but none of those need drm_atomic_helper_check_modeset()
> > because nothing routing related will have changed.
>
> i915 doesn't need this because as you say, it doesn't rely on the atomic
> helper modeset tracking much at all, but it's all internal. This is for
> drivers which rely more or less entirely on
> drm_atomic_crtc_needs_modeset().
>
> Also note that it's not just about connector routing, but about adding all
> the necessary additional states with
> drm_atomic_add_affected_connectors/planes and re-running all the various
> state computation hooks for those. Again i915 hand-rolls that all.
IIRC it only runs the connectors' atomic_check(),
nothing else really. But maybe that's changed since I last
looked at it.
Anyways it feels like we're throwing everything and the
kitchen sink into a single function here. Maybe it should be
split into two or more functions with clear responsibilities?
>
> So yeah i915 doesn't need this.
> -Sima
>
> >
> > >
> > > As discussed on IRC, add separate atomic_needs_modeset() callbacks,
> > > whose only purpose is to allow the plane, connector, encoder or CRTC to
> > > specify that for whatever reasons corresponding CRTC should undergo a
> > > full modeset. The helpers will call these callbacks in a proper place,
> > > adding affected objects and calling required functions as required.
> > >
> > > The MSM patches depend on the msm-next tree and the series at [1]. The
> > > plan is to land core changes through drm-misc, then merge drm-misc-next
> > > into msm-next and merge remaining msm-specific patches through the
> > > msm-next tree.
> > >
> > > [1] https://lore.kernel.org/dri-devel/20250123-drm-dirty-modeset-v2-0-bbfd3a6cd1a4@linaro.org/
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > > Dmitry Baryshkov (6):
> > > drm/atomic-helper: add atomic_needs_modeset callbacks
> > > drm/mgag200: move format check to drm_plane_helper.atomic_needs_modeset
> > > drm/msm/dpu: stop upgrading commits by enabling allow_modeset
> > > drm/msm/dpu: move CTM check to drm_crtc_helper.atomic_needs_modeset
> > > drm/msm/dpu: use atomic_needs_modeset for CDM check
> > > drm/msm: drop msm_atomic_check wrapper
> > >
> > > drivers/gpu/drm/drm_atomic_helper.c | 59 ++++++++++++++++++
> > > drivers/gpu/drm/mgag200/mgag200_drv.h | 2 +
> > > drivers/gpu/drm/mgag200/mgag200_mode.c | 27 ++++++---
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 15 +++++
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 44 +++++++++-----
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 4 --
> > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 26 --------
> > > drivers/gpu/drm/msm/msm_atomic.c | 29 ---------
> > > drivers/gpu/drm/msm/msm_drv.h | 1 -
> > > drivers/gpu/drm/msm/msm_kms.c | 2 +-
> > > drivers/gpu/drm/msm/msm_kms.h | 7 ---
> > > include/drm/drm_modeset_helper_vtables.h | 92 +++++++++++++++++++++++++++++
> > > 12 files changed, 219 insertions(+), 89 deletions(-)
> > > ---
> > > base-commit: 0936f0e54426177b0f0263ddf806ed5e13487db6
> > > change-id: 20250123-atomic-needs-modeset-8f6a8243a3f7
> > > prerequisite-change-id: 20241222-drm-dirty-modeset-88079bd27ae6:v2
> > > prerequisite-patch-id: 0c61aabfcd13651203f476985380cbf4d3c299e6
> > > prerequisite-patch-id: c6026f08011c288fd301676e9fa6f46d0cc1dab7
> > > prerequisite-patch-id: b0cb06d5c88791d6e4755d879ced0d5050aa3cbf
> > > prerequisite-patch-id: fd72ddde9dba0df053113bc505c213961a9760da
> > >
> > > Best regards,
> > > --
> > > Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >
> > --
> > Ville Syrjälä
> > Intel
>
> --
> Simona Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-01-24 13:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 11:14 [PATCH 0/6] drm: introduce atomic_needs_modeset() callbacks Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 1/6] drm/atomic-helper: add atomic_needs_modeset callbacks Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 2/6] drm/mgag200: move format check to drm_plane_helper.atomic_needs_modeset Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 3/6] drm/msm/dpu: stop upgrading commits by enabling allow_modeset Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 4/6] drm/msm/dpu: move CTM check to drm_crtc_helper.atomic_needs_modeset Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 5/6] drm/msm/dpu: use atomic_needs_modeset for CDM check Dmitry Baryshkov
2025-01-24 11:14 ` [PATCH 6/6] drm/msm: drop msm_atomic_check wrapper Dmitry Baryshkov
2025-01-24 12:10 ` [PATCH 0/6] drm: introduce atomic_needs_modeset() callbacks Ville Syrjälä
2025-01-24 12:59 ` Simona Vetter
2025-01-24 13:12 ` Ville Syrjälä [this message]
2025-01-24 15:37 ` Simona Vetter
2025-01-24 16:14 ` Ville Syrjälä
2025-01-27 20:33 ` Simona Vetter
2025-01-24 16:16 ` 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=Z5ORyQ_49ZNmAxtq@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jfalempe@redhat.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_kalyant@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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