aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-06-17 23:59:51 -0400
committerDave Airlie <airlied@redhat.com>2011-06-19 22:01:43 -0400
commit682f1a54a03513fd6bcede56845f1ba21f48c182 (patch)
tree03e3dce23297f943e48dbaedee5d7c4d35bbb6d3 /drivers/gpu/drm/radeon/evergreen.c
parent74d074eecbb4778e5f5ee7d59399da971682c532 (diff)
drm/radeon: avoid warnings from r600/eg irq handlers on powered off card.
Since we were calling the wptr function before checking if the IH was even enabled, or the GPU wasn't shutdown, we'd get spam in the logs when the GPU readback 0xffffffff. This reorders things so we return early in the no IH and GPU shutdown cases. Reported-and-tested-by: ManDay on #radeon Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 7e3d96e7ac04..7162b7bacac0 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2695,28 +2695,25 @@ static inline u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
2695 2695
2696int evergreen_irq_process(struct radeon_device *rdev) 2696int evergreen_irq_process(struct radeon_device *rdev)
2697{ 2697{
2698 u32 wptr = evergreen_get_ih_wptr(rdev); 2698 u32 wptr;
2699 u32 rptr = rdev->ih.rptr; 2699 u32 rptr;
2700 u32 src_id, src_data; 2700 u32 src_id, src_data;
2701 u32 ring_index; 2701 u32 ring_index;
2702 unsigned long flags; 2702 unsigned long flags;
2703 bool queue_hotplug = false; 2703 bool queue_hotplug = false;
2704 2704
2705 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr); 2705 if (!rdev->ih.enabled || rdev->shutdown)
2706 if (!rdev->ih.enabled)
2707 return IRQ_NONE; 2706 return IRQ_NONE;
2708 2707
2709 spin_lock_irqsave(&rdev->ih.lock, flags); 2708 wptr = evergreen_get_ih_wptr(rdev);
2709 rptr = rdev->ih.rptr;
2710 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
2710 2711
2712 spin_lock_irqsave(&rdev->ih.lock, flags);
2711 if (rptr == wptr) { 2713 if (rptr == wptr) {
2712 spin_unlock_irqrestore(&rdev->ih.lock, flags); 2714 spin_unlock_irqrestore(&rdev->ih.lock, flags);
2713 return IRQ_NONE; 2715 return IRQ_NONE;
2714 } 2716 }
2715 if (rdev->shutdown) {
2716 spin_unlock_irqrestore(&rdev->ih.lock, flags);
2717 return IRQ_NONE;
2718 }
2719
2720restart_ih: 2717restart_ih:
2721 /* display interrupts */ 2718 /* display interrupts */
2722 evergreen_irq_ack(rdev); 2719 evergreen_irq_ack(rdev);