diff options
author | Christian König <christian.koenig@amd.com> | 2019-07-31 09:41:50 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2019-08-05 09:28:43 +0200 |
commit | 0dbd555a011c2d096a7b7e40c83c5776a7df367c (patch) | |
tree | 4399a2204760664daad1c91896aa3f8217744d43 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | |
parent | 05103ea9a3159b9bb7004e9c0693948d4d6124f9 (diff) | |
download | linux-0dbd555a011c2d096a7b7e40c83c5776a7df367c.tar.bz2 |
dma-buf: add more reservation object locking wrappers
Complete the abstraction of the ww_mutex inside the reservation object.
This allows us to add more handling and debugging to the reservation
object in the future.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/320761/
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index 02cd845e77b3..344f277b54f0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -380,7 +380,7 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev, bp.flags = 0; bp.type = ttm_bo_type_sg; bp.resv = resv; - ww_mutex_lock(&resv->lock, NULL); + reservation_object_lock(resv, NULL); ret = amdgpu_bo_create(adev, &bp, &bo); if (ret) goto error; @@ -392,11 +392,11 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev, if (attach->dmabuf->ops != &amdgpu_dmabuf_ops) bo->prime_shared_count = 1; - ww_mutex_unlock(&resv->lock); + reservation_object_unlock(resv); return &bo->gem_base; error: - ww_mutex_unlock(&resv->lock); + reservation_object_unlock(resv); return ERR_PTR(ret); } |