@@ -189,6 +189,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
priority);
}
+ for (i = 0; i < p->nrelocs; i++) {
+ r = dma_resv_sync_user_fence(p->relocs[i].tv.bo->base.resv);
+ if (r)
+ return r;
+ }
+
radeon_cs_buckets_get_list(&buckets, &p->validated);
if (p->cs_flags & RADEON_CS_USE_VM)
@@ -519,6 +519,10 @@ static int radeon_crtc_page_flip_target(struct drm_crtc *crtc,
DRM_DEBUG_DRIVER("flip-ioctl() cur_rbo = %p, new_rbo = %p\n",
work->old_rbo, new_rbo);
+ r = dma_resv_sync_user_fence(new_rbo->tbo.base.resv);
+ if (unlikely(r != 0))
+ goto cleanup;
+
r = radeon_bo_reserve(new_rbo, false);
if (unlikely(r != 0)) {
DRM_ERROR("failed to reserve new rbo buffer before flip\n");
Just add the call before taking locks. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_display.c | 4 ++++ 2 files changed, 10 insertions(+)