From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Arun R Murthy <arun.r.murthy@intel.com>
Cc: 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>,
jani.nikula@intel.com, ville.syrjala@intel.com,
uma.shankar@intel.com, xaver.hugl@kde.org,
andrealmeid@igalia.com, naveen1.kumar@intel.com,
Dmitry Baryshkov <lumag@kernel.org>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH RFC v2 0/2] Async Flip in Atomic ioctl corrections
Date: Fri, 10 Oct 2025 16:32:27 +0300 [thread overview]
Message-ID: <aOkK6wzKaLQbOvuV@intel.com> (raw)
In-Reply-To: <20251010-async-v2-0-50c6b7a9b654@intel.com>
On Fri, Oct 10, 2025 at 02:15:57PM +0530, Arun R Murthy wrote:
> struct drm_crtc_state {
> /**
> * @async_flip:
> *
> * This is set when DRM_MODE_PAGE_FLIP_ASYNC is set in the legacy
> * PAGE_FLIP IOCTL. It's not wired up for the atomic IOCTL
> itself yet.
> */
> bool async_flip;
>
> In the existing code the flag async_flip was intended for the legacy
> PAGE_FLIP IOCTL. But the same is being used for atomic IOCTL.
> As per the hardware feature is concerned, async flip is a plane feature
> and is to be treated per plane basis and not per pipe basis.
You can't treat is as a purely per plane thing. The real problem that
neesd solving is that commit completion happens on a per-crtc basis,
and userspace is dumb enough to try to shove both sync and async stuff
into the same commit. That simply cannot work (unless we downgrade
all such async commits into sync commits).
The sort of compromise that people seem to have agreed on is that we
can allow objects and properties in the async commit that would normally
require a sync commit, but only if their value isn't changing. And
then someone is supposed to filter those out so they don't end up
requiring a real sync commit on the hardware.
I think the only sane way forward is to make the drm core do said
filtering, so that in the end the driver will only see the things
in the commit that are actually supposed to take part in the async
commit. I think in practice it would just involve removing all the
planes with zero property changes from the atomic state before
handing it over to the driver. But so far no one has volunteered
to write that code.
There is of course still the remaining problem of what happens when
there are multiple async flips for different planes in the same commit.
The hardware will complete those at different times, so the driver will
still need to make sure it doesn't signal full commit completion until
all the async flips have finished. Maybe we could eventually add
something to the common commit machinery to help with this, but I
guess we should first implement it in a few drivers.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-10-10 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 8:45 [PATCH RFC v2 0/2] Async Flip in Atomic ioctl corrections Arun R Murthy
2025-10-10 8:45 ` [PATCH RFC v2 1/2] drm/atomic/plane: Add plane property for async flip Arun R Murthy
2025-10-10 8:45 ` [PATCH RFC v2 2/2] drm/atomic: Use async_flip plane property for asynchronous flips Arun R Murthy
2025-10-10 13:32 ` Ville Syrjälä [this message]
2025-10-13 4:19 ` [PATCH RFC v2 0/2] Async Flip in Atomic ioctl corrections Murthy, Arun R
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=aOkK6wzKaLQbOvuV@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=arun.r.murthy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=naveen1.kumar@intel.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@intel.com \
--cc=xaver.hugl@kde.org \
/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).