[PATCH 03/12] drm/atomic: Add FIXMEs around the incorrect use of the .atomic_bypass_check() for async flips
Ville Syrjala
ville.syrjala at linux.intel.com
Mon Nov 16 01:11:21 PST 2026
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
The "bypass update" stuff has nothing to do with async vs.
sync updates as far as the hardware is concerned (as in
tearing vs. not). What it does is bypass the normal commit
machinery and just let the driver directly perform the
update (as it sees fit) and swap the plane state without
involving the whole crtc commit machinery.
The actual hardware update it does could be an async flip
(as in tearing) or a mailbox flip, depending on how the
driver decides to do it.
The use of bypass updates vs. not is a driver decision, and
the high level atomic code should not be making incorrect
assumptions about it. Toss in some FIXMEs in the hopes
that people will relocate this stuff to a more appropriate
place.
Cc: amd-gfx at lists.freedesktop.org
Cc: André Almeida <andrealmeid at igalia.com>
Cc: Boris Brezillon <bbrezillon at kernel.org>
Cc: Christopher Snowhill <chris at kode54.net>
Cc: Dave Stevenson <dave.stevenson at raspberrypi.com>
Cc: Dharma Balasubiramani <dharma.b at microchip.com>
Cc: Dmitry Baryshkov <lumag at kernel.org>
Cc: freedreno at lists.freedesktop.org
Cc: Gustavo Padovan <gustavo.padovan at collabora.com>
Cc: Huacai Chen <chenhuacai at kernel.org>
Cc: Icenowy Zheng <zhengxingda at iscas.ac.cn>
Cc: intel-gfx at lists.freedesktop.org
Cc: intel-xe at lists.freedesktop.org
Cc: Jianmin Lv <lvjianmin at loongson.cn>
Cc: linux-arm-msm at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-tegra at vger.kernel.org
Cc: Liviu Dudau <liviu.dudau at arm.com>
Cc: Maíra Canal <mcanal at igalia.com>
Cc: Manikandan Muralidharan <manikandan.m at microchip.com>
Cc: Maxime Ripard <mripard at kernel.org>
Cc: Mingcong Bai <jeffbai at aosc.io>
Cc: nouveau at lists.freedesktop.org
Cc: Qianhai Wu <wuqianhai at loongson.cn>
Cc: Raspberry Pi Kernel Maintenance <kernel-list at raspberrypi.com>
Cc: Simon Ser <contact at emersion.fr>
Cc: wayland-devel at lists.freedesktop.org
Cc: Xaver Hugl <xaver.hugl at kde.org>
Cc: Xi Ruoyao <xry111 at xry111.site>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 6 ++++++
include/drm/drm_modeset_helper_vtables.h | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 04fcaa72c46f..eb002799497c 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1290,6 +1290,12 @@ int drm_atomic_set_property(struct drm_atomic_commit *state,
break;
}
+ /*
+ * FIXME this is in the wrong place. Whether to do a
+ * bypass commit for async flips would is a driver
+ * decision. Drivers that want this need to just do
+ * these checks themselves somewhere.
+ */
if (ret && plane->type != DRM_PLANE_TYPE_PRIMARY) {
/* ask the driver if this non-primary plane is supported */
if (plane_funcs && plane_funcs->atomic_bypass_check)
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index cc511068f53a..d28d8ffc66b4 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -1430,10 +1430,10 @@ struct drm_plane_helper_funcs {
* given update can be committed bypassing the atomic commit machinery.
* That is, if it can jump ahead of the state currently queued for update.
*
- * This function is also used by drm_atomic_set_property() to determine
+ * This function is also abused by drm_atomic_set_property() to determine
* if the plane can be flipped in async. The flip flag is used to
* distinguish if the function is used for just the plane state or for a
- * flip.
+ * flip. FIXME this is wrong, and needs to be moved into the drivers.
*
* RETURNS:
*
--
2.56.0
More information about the Linux-rockchip
mailing list