Browse Source

drm/amdgpu: don't grab dev->struct_mutex in pm functions

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 <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Daniel Vetter 10 năm trước cách đây
mục cha
commit
5516ab86a8

+ 0 - 2
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

@@ -580,7 +580,6 @@ force:
 		amdgpu_dpm_print_power_state(adev, adev->pm.dpm.requested_ps);
 		amdgpu_dpm_print_power_state(adev, adev->pm.dpm.requested_ps);
 	}
 	}
 
 
-	mutex_lock(&adev->ddev->struct_mutex);
 	mutex_lock(&adev->ring_lock);
 	mutex_lock(&adev->ring_lock);
 
 
 	/* update whether vce is active */
 	/* update whether vce is active */
@@ -628,7 +627,6 @@ force:
 
 
 done:
 done:
 	mutex_unlock(&adev->ring_lock);
 	mutex_unlock(&adev->ring_lock);
-	mutex_unlock(&adev->ddev->struct_mutex);
 }
 }
 
 
 void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable)
 void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable)