diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 4ece89aa26f8..ff3abd8c8966 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -375,6 +375,8 @@ static void radeon_pm_set_clocks_locked(struct radeon_device *rdev) | |||
375 | 375 | ||
376 | static void radeon_pm_set_clocks(struct radeon_device *rdev) | 376 | static void radeon_pm_set_clocks(struct radeon_device *rdev) |
377 | { | 377 | { |
378 | int i; | ||
379 | |||
378 | radeon_get_power_state(rdev, rdev->pm.planned_action); | 380 | radeon_get_power_state(rdev, rdev->pm.planned_action); |
379 | mutex_lock(&rdev->cp.mutex); | 381 | mutex_lock(&rdev->cp.mutex); |
380 | 382 | ||
@@ -388,22 +390,18 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
388 | rdev->irq.gui_idle = false; | 390 | rdev->irq.gui_idle = false; |
389 | radeon_irq_set(rdev); | 391 | radeon_irq_set(rdev); |
390 | 392 | ||
391 | if (rdev->pm.active_crtcs & (1 << 0)) { | 393 | for (i = 0; i < rdev->num_crtc; i++) { |
392 | rdev->pm.req_vblank |= (1 << 0); | 394 | if (rdev->pm.active_crtcs & (1 << i)) { |
393 | drm_vblank_get(rdev->ddev, 0); | 395 | rdev->pm.req_vblank |= (1 << i); |
394 | } | 396 | drm_vblank_get(rdev->ddev, i); |
395 | if (rdev->pm.active_crtcs & (1 << 1)) { | 397 | } |
396 | rdev->pm.req_vblank |= (1 << 1); | ||
397 | drm_vblank_get(rdev->ddev, 1); | ||
398 | } | 398 | } |
399 | radeon_pm_set_clocks_locked(rdev); | 399 | radeon_pm_set_clocks_locked(rdev); |
400 | if (rdev->pm.req_vblank & (1 << 0)) { | 400 | for (i = 0; i < rdev->num_crtc; i++) { |
401 | rdev->pm.req_vblank &= ~(1 << 0); | 401 | if (rdev->pm.req_vblank & (1 << i)) { |
402 | drm_vblank_put(rdev->ddev, 0); | 402 | rdev->pm.req_vblank &= ~(1 << i); |
403 | } | 403 | drm_vblank_put(rdev->ddev, i); |
404 | if (rdev->pm.req_vblank & (1 << 1)) { | 404 | } |
405 | rdev->pm.req_vblank &= ~(1 << 1); | ||
406 | drm_vblank_put(rdev->ddev, 1); | ||
407 | } | 405 | } |
408 | 406 | ||
409 | mutex_unlock(&rdev->cp.mutex); | 407 | mutex_unlock(&rdev->cp.mutex); |