[PATCH 18/18] drm/amdgpu: don't grab dev->struct_mutex in pm functions

2015-08-10 Thread Thierry Reding
On Thu, Jul 09, 2015 at 11:32:50PM +0200, Daniel Vetter wrote:
> Similar to radeon, except that amdgpu doesn't even use struct_mutex to
> protect anything like the shared z buffer (sane gpu architecture,
> yay!). And the code already grabs the globa adev->ring_lock, so this
> code can't race with itself. Which makes struct_mutex completely
> redundnant. Remove it.
> 
> Cc: Alex Deucher 
> Cc: "Christian König" 
> Signed-off-by: Daniel Vetter 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Thierry Reding 
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: 



[PATCH 18/18] drm/amdgpu: don't grab dev->struct_mutex in pm functions

2015-07-09 Thread Daniel Vetter
Similar to radeon, except that amdgpu doesn't even use struct_mutex to
protect anything like the shared z buffer (sane gpu architecture,
yay!). And the code already grabs the globa adev->ring_lock, so this
code can't race with itself. Which makes struct_mutex completely
redundnant. Remove it.

Cc: Alex Deucher 
Cc: "Christian König" 
Signed-off-by: Daniel Vetter 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index ed13baa7c976..535d90254673 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -580,7 +580,6 @@ force:
amdgpu_dpm_print_power_state(adev, adev->pm.dpm.requested_ps);
}

-   mutex_lock(&adev->ddev->struct_mutex);
mutex_lock(&adev->ring_lock);

/* update whether vce is active */
@@ -628,7 +627,6 @@ force:

 done:
mutex_unlock(&adev->ring_lock);
-   mutex_unlock(&adev->ddev->struct_mutex);
 }

 void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable)
-- 
2.1.4