diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-07-09 17:32:48 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:51:12 -0400 |
commit | 34ddc3e9d1781a4914c673013c0eaca3ae642641 (patch) | |
tree | e1c96ad0bcfad7d1a43adf9c49408a7c5f86cec6 /drivers | |
parent | 42192a941e427440e642623c64bda4486c527a54 (diff) |
drm/radeon: Don't take dev->struct_mutex in pm functions
We already grab 2 device-global locks (write-sema rdev->pm.mclk_lock
and rdev->ring_lock), adding another global mutex won't serialize this
code more. And since there's really nothing interesting that gets
protected in radeon by dev->struct mutex (we only have the global z
buffer owners and it's still serializing gem bo destruction in the drm
core - which is irrelevant since radeon uses ttm anyway internally)
this doesn't add protection. 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c1ba83a8dd8c..05751f3f8444 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -253,7 +253,6 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
253 | (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index)) | 253 | (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index)) |
254 | return; | 254 | return; |
255 | 255 | ||
256 | mutex_lock(&rdev->ddev->struct_mutex); | ||
257 | down_write(&rdev->pm.mclk_lock); | 256 | down_write(&rdev->pm.mclk_lock); |
258 | mutex_lock(&rdev->ring_lock); | 257 | mutex_lock(&rdev->ring_lock); |
259 | 258 | ||
@@ -268,7 +267,6 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
268 | /* needs a GPU reset dont reset here */ | 267 | /* needs a GPU reset dont reset here */ |
269 | mutex_unlock(&rdev->ring_lock); | 268 | mutex_unlock(&rdev->ring_lock); |
270 | up_write(&rdev->pm.mclk_lock); | 269 | up_write(&rdev->pm.mclk_lock); |
271 | mutex_unlock(&rdev->ddev->struct_mutex); | ||
272 | return; | 270 | return; |
273 | } | 271 | } |
274 | } | 272 | } |
@@ -304,7 +302,6 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
304 | 302 | ||
305 | mutex_unlock(&rdev->ring_lock); | 303 | mutex_unlock(&rdev->ring_lock); |
306 | up_write(&rdev->pm.mclk_lock); | 304 | up_write(&rdev->pm.mclk_lock); |
307 | mutex_unlock(&rdev->ddev->struct_mutex); | ||
308 | } | 305 | } |
309 | 306 | ||
310 | static void radeon_pm_print_states(struct radeon_device *rdev) | 307 | static void radeon_pm_print_states(struct radeon_device *rdev) |
@@ -1062,7 +1059,6 @@ force: | |||
1062 | radeon_dpm_print_power_state(rdev, rdev->pm.dpm.requested_ps); | 1059 | radeon_dpm_print_power_state(rdev, rdev->pm.dpm.requested_ps); |
1063 | } | 1060 | } |
1064 | 1061 | ||
1065 | mutex_lock(&rdev->ddev->struct_mutex); | ||
1066 | down_write(&rdev->pm.mclk_lock); | 1062 | down_write(&rdev->pm.mclk_lock); |
1067 | mutex_lock(&rdev->ring_lock); | 1063 | mutex_lock(&rdev->ring_lock); |
1068 | 1064 | ||
@@ -1113,7 +1109,6 @@ force: | |||
1113 | done: | 1109 | done: |
1114 | mutex_unlock(&rdev->ring_lock); | 1110 | mutex_unlock(&rdev->ring_lock); |
1115 | up_write(&rdev->pm.mclk_lock); | 1111 | up_write(&rdev->pm.mclk_lock); |
1116 | mutex_unlock(&rdev->ddev->struct_mutex); | ||
1117 | } | 1112 | } |
1118 | 1113 | ||
1119 | void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable) | 1114 | void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable) |