diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index d74d4d71437f..f79d2ccb6755 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -590,6 +590,9 @@ void r600_pm_misc(struct radeon_device *rdev) | |||
590 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | 590 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; |
591 | 591 | ||
592 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 592 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
593 | /* 0xff01 is a flag rather then an actual voltage */ | ||
594 | if (voltage->voltage == 0xff01) | ||
595 | return; | ||
593 | if (voltage->voltage != rdev->pm.current_vddc) { | 596 | if (voltage->voltage != rdev->pm.current_vddc) { |
594 | radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); | 597 | radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); |
595 | rdev->pm.current_vddc = voltage->voltage; | 598 | rdev->pm.current_vddc = voltage->voltage; |
@@ -3294,27 +3297,26 @@ static inline u32 r600_get_ih_wptr(struct radeon_device *rdev) | |||
3294 | 3297 | ||
3295 | int r600_irq_process(struct radeon_device *rdev) | 3298 | int r600_irq_process(struct radeon_device *rdev) |
3296 | { | 3299 | { |
3297 | u32 wptr = r600_get_ih_wptr(rdev); | 3300 | u32 wptr; |
3298 | u32 rptr = rdev->ih.rptr; | 3301 | u32 rptr; |
3299 | u32 src_id, src_data; | 3302 | u32 src_id, src_data; |
3300 | u32 ring_index; | 3303 | u32 ring_index; |
3301 | unsigned long flags; | 3304 | unsigned long flags; |
3302 | bool queue_hotplug = false; | 3305 | bool queue_hotplug = false; |
3303 | 3306 | ||
3304 | DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr); | 3307 | if (!rdev->ih.enabled || rdev->shutdown) |
3305 | if (!rdev->ih.enabled) | ||
3306 | return IRQ_NONE; | 3308 | return IRQ_NONE; |
3307 | 3309 | ||
3310 | wptr = r600_get_ih_wptr(rdev); | ||
3311 | rptr = rdev->ih.rptr; | ||
3312 | DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr); | ||
3313 | |||
3308 | spin_lock_irqsave(&rdev->ih.lock, flags); | 3314 | spin_lock_irqsave(&rdev->ih.lock, flags); |
3309 | 3315 | ||
3310 | if (rptr == wptr) { | 3316 | if (rptr == wptr) { |
3311 | spin_unlock_irqrestore(&rdev->ih.lock, flags); | 3317 | spin_unlock_irqrestore(&rdev->ih.lock, flags); |
3312 | return IRQ_NONE; | 3318 | return IRQ_NONE; |
3313 | } | 3319 | } |
3314 | if (rdev->shutdown) { | ||
3315 | spin_unlock_irqrestore(&rdev->ih.lock, flags); | ||
3316 | return IRQ_NONE; | ||
3317 | } | ||
3318 | 3320 | ||
3319 | restart_ih: | 3321 | restart_ih: |
3320 | /* display interrupts */ | 3322 | /* display interrupts */ |
@@ -3444,7 +3446,7 @@ restart_ih: | |||
3444 | radeon_fence_process(rdev); | 3446 | radeon_fence_process(rdev); |
3445 | break; | 3447 | break; |
3446 | case 233: /* GUI IDLE */ | 3448 | case 233: /* GUI IDLE */ |
3447 | DRM_DEBUG("IH: CP EOP\n"); | 3449 | DRM_DEBUG("IH: GUI idle\n"); |
3448 | rdev->pm.gui_idle = true; | 3450 | rdev->pm.gui_idle = true; |
3449 | wake_up(&rdev->irq.idle_queue); | 3451 | wake_up(&rdev->irq.idle_queue); |
3450 | break; | 3452 | break; |