From: Erwin Springer via B4 Relay <devnull+aot.lerwin.gmail.com@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Erwin Springer <aot.lerwin@gmail.com>
Subject: [PATCH] drm/i915/display: Ignore disabled planes in async flip checks
Date: Sun, 15 Nov 2026 15:17:23 +0100 [thread overview]
Message-ID: <20261115-i915-async-planes-v1-1-d13498d0b6be@gmail.com> (raw)
From: Erwin Springer <aot.lerwin@gmail.com>
Atomic async flips may carry properties that don't change, so compositors
tend to send their whole plane state with every commit. KWin for example
adds all planes of the pipe, including the ones that are disabled and stay
disabled (CRTC_ID=0, FB_ID=0).
intel_async_flip_check_uapi() fails the commit as soon as the state
contains any plane of the pipe that can't do async flips:
[drm:intel_atomic_check [i915]] [PLANE:66:plane 2A] async flip not supported
[drm:drm_atomic_check_only.cold] atomic driver check for ... failed: -22
So with such a compositor tearing never works on a pipe with sprite or
cursor planes, even though only the FB of the primary plane changes. KWin
silently falls back to vsynced flips, about 60 rejected commits per second.
A plane without a framebuffer before and after the commit takes no part in
the flip. Skip it in both async flip checks.
Tested on Raptor Lake-U (Iris Xe) with the patch applied to the i915 of
Linux 7.3.4, unmodified KWin 6.8.2 and a fullscreen client that requests
tearing through wp_tearing_control_v1. Before, none of about 350 frames per
run was presented without vsync. With the patch 3334 of 3340 frames tear
and the message above is gone. What is still rejected is the first flip
after the modifier or format changed, once per run, as intended.
Signed-off-by: Erwin Springer <aot.lerwin@gmail.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f4d9148ef..58f45dd68 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6281,6 +6281,14 @@ static int intel_async_flip_check_uapi(struct intel_atomic_state *state,
if (plane->pipe != crtc->pipe)
continue;
+ /*
+ * Userspace may add planes it doesn't change to the commit.
+ * A plane that is disabled and stays disabled takes no part
+ * in the async flip.
+ */
+ if (!old_plane_state->uapi.fb && !new_plane_state->uapi.fb)
+ continue;
+
/*
* TODO: Async flip is only supported through the page flip IOCTL
* as of now. So support currently added for primary plane only.
@@ -6346,6 +6354,10 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
if (plane->pipe != crtc->pipe)
continue;
+ /* Disabled planes that stay disabled take no part in the flip. */
+ if (!old_plane_state->hw.fb && !new_plane_state->hw.fb)
+ continue;
+
/*
* Only async flip capable planes should be in the state
* if we're really about to ask the hardware to perform
---
base-commit: 419bb0e4cadd214a0847010c02ade95e5fc511f7
change-id: 20261115-i915-async-planes-d532ca94cf3c
Best regards,
--
Erwin Springer <aot.lerwin@gmail.com>
reply other threads:[~2026-11-15 14:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261115-i915-async-planes-v1-1-d13498d0b6be@gmail.com \
--to=devnull+aot.lerwin.gmail.com@kernel.org \
--cc=airlied@gmail.com \
--cc=aot.lerwin@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
/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®