drm/radeon: stop using dma_resv_excl_fence
authorChristian König <christian.koenig@amd.com>
Wed, 3 Nov 2021 10:31:59 +0000 (11:31 +0100)
committerChristian König <christian.koenig@amd.com>
Sun, 3 Apr 2022 15:56:34 +0000 (17:56 +0200)
Instead use the new dma_resv_get_singleton function.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220321135856.1331-8-christian.koenig@amd.com
drivers/gpu/drm/radeon/radeon_display.c

index b9a0767..f60e826 100644 (file)
@@ -533,7 +533,12 @@ static int radeon_crtc_page_flip_target(struct drm_crtc *crtc,
                DRM_ERROR("failed to pin new rbo buffer before flip\n");
                goto cleanup;
        }
-       work->fence = dma_fence_get(dma_resv_excl_fence(new_rbo->tbo.base.resv));
+       r = dma_resv_get_singleton(new_rbo->tbo.base.resv, false, &work->fence);
+       if (r) {
+               radeon_bo_unreserve(new_rbo);
+               DRM_ERROR("failed to get new rbo buffer fences\n");
+               goto cleanup;
+       }
        radeon_bo_get_tiling_flags(new_rbo, &tiling_flags, NULL);
        radeon_bo_unreserve(new_rbo);