Reviewed-by: xinhui pan <xinhui.pan@xxxxxxx> > 2020年3月31日 22:25,Christian König <ckoenig.leichtzumerken@xxxxxxxxx> 写道: > > The exclusive fence is only optional. > > Signed-off-by: Christian König <christian.koenig@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > index a0be80513e96..77d988a0033f 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > @@ -191,8 +191,10 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj, > goto out_unlock; > > fence = dma_resv_get_excl(bo->tbo.base.resv); > - amdgpu_bo_fence(bo, fence, true); > - fence = NULL; > + if (fence) { > + amdgpu_bo_fence(bo, fence, true); > + fence = NULL; > + } > > r = amdgpu_vm_clear_freed(adev, vm, &fence); > if (r || !fence) > -- > 2.17.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cxinhui.pan%40amd.com%7Cd59da038993e43160f6608d7d57f6535%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637212615519082332&sdata=kLCEV01aoJ6%2BrWD7yRBN1NB3b%2FJRyYA0TpV%2FGoATB0c%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx