[PATCH 3/4] drm/amdgpu: Optimization of mutex usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no need to lock the bo_list mutex,
because there is no other task can access
the newly created BO list yet.

Signed-off-by: Alex Xie <AlexBin.Xie at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
index c994a04..4363f28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
@@ -60,8 +60,6 @@ static int amdgpu_bo_list_create(struct amdgpu_fpriv *fpriv,
 	(*result)->num_entries = 0;
 	(*result)->array = NULL;
 
-	mutex_lock(&(*result)->lock);
-
 	return 0;
 }
 
@@ -282,7 +280,6 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data,
 
 		r = amdgpu_bo_list_set(adev, filp, list, info,
 					      args->in.bo_number);
-		amdgpu_bo_list_put(list);
 		if (r)
 			goto error_free;
 
-- 
2.7.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux