2024-01-28 21:25:47

by André Almeida

[permalink] [raw]
Subject: [PATCH v3 2/3] drm/atomic: Allow userspace to use explicit sync with atomic async flips

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 <[email protected]>
---
v3: new patch

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

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);
--
2.43.0