struct nouveau_bo *nvbo;
        struct nv50_head_atom *asyh;
        struct nv50_wndw_ctxdma *ctxdma;
-       struct dma_resv_iter cursor;
-       struct dma_fence *fence;
        int ret;
 
        NV_ATOMIC(drm, "%s prepare: %p\n", plane->name, fb);
                        asyw->image.handle[0] = ctxdma->object.handle;
        }
 
-       dma_resv_iter_begin(&cursor, nvbo->bo.base.resv, false);
-       dma_resv_for_each_fence_unlocked(&cursor, fence) {
-               /* TODO: We only use the first writer here */
-               asyw->state.fence = dma_fence_get(fence);
-               break;
-       }
-       dma_resv_iter_end(&cursor);
+       ret = dma_resv_get_singleton(nvbo->bo.base.resv, false,
+                                    &asyw->state.fence);
+       if (ret)
+               return ret;
+
        asyw->image.offset[0] = nvbo->offset;
 
        if (wndw->func->prepare) {