Message ID | 20211207123411.167006-9-christian.koenig@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/24] dma-buf: add dma_resv_replace_fences | expand |
On Tue, Dec 07, 2021 at 01:33:55PM +0100, Christian König wrote: > Instead use the new dma_resv_get_singleton function. > > Signed-off-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c > index 8d1e869cc196..23c3fc2cbf10 100644 > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c > @@ -1168,8 +1168,10 @@ int vmw_resources_clean(struct vmw_buffer_object *vbo, pgoff_t start, > vmw_bo_fence_single(bo, NULL); > if (bo->moving) > dma_fence_put(bo->moving); > - bo->moving = dma_fence_get > - (dma_resv_excl_fence(bo->base.resv)); > + > + /* TODO: This is actually a memory management dependency */ > + return dma_resv_get_singleton(bo->base.resv, false, > + &bo->moving); Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > } > > return 0; > -- > 2.25.1 >
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 8d1e869cc196..23c3fc2cbf10 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -1168,8 +1168,10 @@ int vmw_resources_clean(struct vmw_buffer_object *vbo, pgoff_t start, vmw_bo_fence_single(bo, NULL); if (bo->moving) dma_fence_put(bo->moving); - bo->moving = dma_fence_get - (dma_resv_excl_fence(bo->base.resv)); + + /* TODO: This is actually a memory management dependency */ + return dma_resv_get_singleton(bo->base.resv, false, + &bo->moving); } return 0;
Instead use the new dma_resv_get_singleton function. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)