diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-08 12:37:35 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:47:19 -0500 |
commit | a376b0cedbb39d1504941821e424ef834325a717 (patch) | |
tree | 0e79ba172ec4f446704f64b4588ce65f90016a6c /drivers/gpu/drm/ttm | |
parent | 45bfd9690a6af05453f7b00ca82ba458d9573c9b (diff) | |
download | kernel_replicant_linux-a376b0cedbb39d1504941821e424ef834325a717.tar.gz kernel_replicant_linux-a376b0cedbb39d1504941821e424ef834325a717.tar.bz2 kernel_replicant_linux-a376b0cedbb39d1504941821e424ef834325a717.zip |
drm/ttm: move unlocking out of ttm_bo_cleanup_memtype_use
Needed for the next patch and makes the code quite a bit easier to
understand.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c088703777e2..9905cf41cba6 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -390,8 +390,6 @@ static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo) ttm_tt_destroy(bo->ttm); bo->ttm = NULL; ttm_bo_mem_put(bo, &bo->mem); - - ww_mutex_unlock (&bo->resv->lock); } static int ttm_bo_individualize_resv(struct ttm_buffer_object *bo) @@ -457,6 +455,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) reservation_object_unlock(&bo->ttm_resv); ttm_bo_cleanup_memtype_use(bo); + reservation_object_unlock(bo->resv); return; } @@ -559,6 +558,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo, spin_unlock(&glob->lru_lock); ttm_bo_cleanup_memtype_use(bo); + reservation_object_unlock(bo->resv); return 0; } |