[PATCH 07/12] drm/atomic/uapi: Document the non-obvious fence/fb_id prop behaviour
Ville Syrjala
ville.syrjala at linux.intel.com
Mon Nov 16 01:11:25 PST 2026
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
The atomic async flip checks want to compare the old vs. new
property values. For normal properties that is all perfectly
clear, but for the fence/fb_id properties the old value is
not what one might expect. Add some notes to remind the reader
what is happening.
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 | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index aad71d3e2105..cf1edcb242cc 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1225,6 +1225,11 @@ int drm_atomic_set_property(struct drm_atomic_commit *state,
if (ret)
break;
+ /*
+ * Note that for WRITEBACK_FB_ID and WRITEBACK_OUT_FENCE_PTR
+ * the old value will always be 0. So any commit that sets either
+ * property to any other value will not be considered a no-op.
+ */
if (old_val != prop_value) {
drm_dbg_atomic(prop->dev,
"[CONNECTOR:%d:%s][PROP:%d:%s] Unsupported property change during async flip\n",
@@ -1256,6 +1261,11 @@ int drm_atomic_set_property(struct drm_atomic_commit *state,
if (ret)
break;
+ /*
+ * Note that for OUT_FENCE_PTR the old value will always be 0.
+ * So any commit that sets the property to any other value
+ * will not be considered a no-op.
+ */
if (old_val != prop_value) {
drm_dbg_atomic(prop->dev,
"[CRTC:%d:%s][PROP:%d:%s] Unsupported property change during async flip\n",
@@ -1289,7 +1299,13 @@ int drm_atomic_set_property(struct drm_atomic_commit *state,
if (ret)
break;
- /* fail everything that isn't no-op or a pure flip */
+ /*
+ * Fail everything that isn't no-op or a pure flip.
+ *
+ * Note that for IN_FENCE_FD the old value will always be -1.
+ * So any commit that sets the property to any other value
+ * will not be considered a no-op.
+ */
if (old_val != prop_value &&
prop != config->prop_fb_id &&
prop != config->prop_in_fence_fd &&
--
2.56.0
More information about the Linux-rockchip
mailing list