]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/radeon: fix logic inversion in radeon_sync_resv
authorChristian König <christian.koenig@amd.com>
Mon, 11 Apr 2022 13:49:09 +0000 (15:49 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 13 Apr 2022 08:25:25 +0000 (10:25 +0200)
Shared is the opposite of write/exclusive.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 0597ca7b43e4 ("drm/radeon: use new iterator in radeon_sync_resv")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1970
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220412093626.608767-1-christian.koenig@amd.com
drivers/gpu/drm/radeon/radeon_sync.c

index b991ba1bcd51308d84afff666d4f56d2d4d91941..f63efd8d5e524b42eb65745e25b310cfee2c7209 100644 (file)
@@ -96,7 +96,7 @@ int radeon_sync_resv(struct radeon_device *rdev,
        struct dma_fence *f;
        int r = 0;
 
-       dma_resv_for_each_fence(&cursor, resv, shared, f) {
+       dma_resv_for_each_fence(&cursor, resv, !shared, f) {
                fence = to_radeon_fence(f);
                if (fence && fence->rdev == rdev)
                        radeon_sync_fence(sync, fence);