aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 7e3d96e7ac04..12d2fdc52414 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -140,11 +140,17 @@ void evergreen_pm_misc(struct radeon_device *rdev)
140 struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; 140 struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
141 141
142 if (voltage->type == VOLTAGE_SW) { 142 if (voltage->type == VOLTAGE_SW) {
143 /* 0xff01 is a flag rather then an actual voltage */
144 if (voltage->voltage == 0xff01)
145 return;
143 if (voltage->voltage && (voltage->voltage != rdev->pm.current_vddc)) { 146 if (voltage->voltage && (voltage->voltage != rdev->pm.current_vddc)) {
144 radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); 147 radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC);
145 rdev->pm.current_vddc = voltage->voltage; 148 rdev->pm.current_vddc = voltage->voltage;
146 DRM_DEBUG("Setting: vddc: %d\n", voltage->voltage); 149 DRM_DEBUG("Setting: vddc: %d\n", voltage->voltage);
147 } 150 }
151 /* 0xff01 is a flag rather then an actual voltage */
152 if (voltage->vddci == 0xff01)
153 return;
148 if (voltage->vddci && (voltage->vddci != rdev->pm.current_vddci)) { 154 if (voltage->vddci && (voltage->vddci != rdev->pm.current_vddci)) {
149 radeon_atom_set_voltage(rdev, voltage->vddci, SET_VOLTAGE_TYPE_ASIC_VDDCI); 155 radeon_atom_set_voltage(rdev, voltage->vddci, SET_VOLTAGE_TYPE_ASIC_VDDCI);
150 rdev->pm.current_vddci = voltage->vddci; 156 rdev->pm.current_vddci = voltage->vddci;
@@ -2007,9 +2013,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
2007 rdev->config.evergreen.tile_config |= (3 << 0); 2013 rdev->config.evergreen.tile_config |= (3 << 0);
2008 break; 2014 break;
2009 } 2015 }
2010 /* num banks is 8 on all fusion asics */ 2016 /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */
2011 if (rdev->flags & RADEON_IS_IGP) 2017 if (rdev->flags & RADEON_IS_IGP)
2012 rdev->config.evergreen.tile_config |= 8 << 4; 2018 rdev->config.evergreen.tile_config |= 1 << 4;
2013 else 2019 else
2014 rdev->config.evergreen.tile_config |= 2020 rdev->config.evergreen.tile_config |=
2015 ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; 2021 ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4;
@@ -2695,28 +2701,25 @@ static inline u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
2695 2701
2696int evergreen_irq_process(struct radeon_device *rdev) 2702int evergreen_irq_process(struct radeon_device *rdev)
2697{ 2703{
2698 u32 wptr = evergreen_get_ih_wptr(rdev); 2704 u32 wptr;
2699 u32 rptr = rdev->ih.rptr; 2705 u32 rptr;
2700 u32 src_id, src_data; 2706 u32 src_id, src_data;
2701 u32 ring_index; 2707 u32 ring_index;
2702 unsigned long flags; 2708 unsigned long flags;
2703 bool queue_hotplug = false; 2709 bool queue_hotplug = false;
2704 2710
2705 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr); 2711 if (!rdev->ih.enabled || rdev->shutdown)
2706 if (!rdev->ih.enabled)
2707 return IRQ_NONE; 2712 return IRQ_NONE;
2708 2713
2709 spin_lock_irqsave(&rdev->ih.lock, flags); 2714 wptr = evergreen_get_ih_wptr(rdev);
2715 rptr = rdev->ih.rptr;
2716 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
2710 2717
2718 spin_lock_irqsave(&rdev->ih.lock, flags);
2711 if (rptr == wptr) { 2719 if (rptr == wptr) {
2712 spin_unlock_irqrestore(&rdev->ih.lock, flags); 2720 spin_unlock_irqrestore(&rdev->ih.lock, flags);
2713 return IRQ_NONE; 2721 return IRQ_NONE;
2714 } 2722 }
2715 if (rdev->shutdown) {
2716 spin_unlock_irqrestore(&rdev->ih.lock, flags);
2717 return IRQ_NONE;
2718 }
2719
2720restart_ih: 2723restart_ih:
2721 /* display interrupts */ 2724 /* display interrupts */
2722 evergreen_irq_ack(rdev); 2725 evergreen_irq_ack(rdev);