Message ID | 20220502163722.3957-12-christian.koenig@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/15] dma-buf: rename DMA_FENCE_FLAG_USER_BITS to _DEVICE | expand |
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index e2112c10569b..d1b13657e2ae 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -517,7 +517,10 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, if (U642I64(val) == -1) return 0; - state->fence = sync_file_get_fence(val); + if (drm_core_check_feature(dev, DRIVER_USER_FENCE)) + state->fence = sync_file_get_user_fence(val); + else + state->fence = sync_file_get_fence(val); if (!state->fence) return -EINVAL;
When the DRIVER_USER_FENCE flag is set we grab the user fence from the sync file instead of the normal one. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/drm_atomic_uapi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)