diff mbox series

[v3,2/3] drm/atomic: Allow userspace to use explicit sync with atomic async flips

Message ID 20240128212515.630345-3-andrealmeid@igalia.com (mailing list archive)
State New, archived
Headers show
Series drm/atomic: Allow drivers to write their own plane check for async | expand

Commit Message

André Almeida Jan. 28, 2024, 9:25 p.m. UTC
Allow userspace to use explicit synchronization with atomic async flips.
That means that the flip will wait for some hardware fence, and then
will flip as soon as possible (async) in regard of the vblank.

Signed-off-by: André Almeida <andrealmeid@igalia.com>
---
v3: new patch

 drivers/gpu/drm/drm_atomic_uapi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 6d5b9fec90c7..edae7924ad69 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1060,7 +1060,8 @@  static int drm_atomic_check_plane_changes(struct drm_property *prop,
 	 * change will be either rejected or ignored, so we can stop the check
 	 * here
 	 */
-	if (prop != config->prop_fb_id) {
+	if (prop != config->prop_fb_id &&
+	    prop != config->prop_in_fence_fd) {
 		ret = drm_atomic_plane_get_property(plane, plane_state,
 						    prop, &old_val);
 		return drm_atomic_check_prop_changes(ret, old_val, prop_value, prop);