aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-01-15 08:44:38 -0500
committerDave Airlie <airlied@linux.ie>2010-01-20 17:43:56 -0500
commit79c2bbc505751bb5130ac753251fc9a0eb37bb12 (patch)
tree1249938228d4630b9eeabf0d0619034c9666a3af /drivers/gpu/drm/radeon/r600.c
parent0c45249f419d8b86abe0e51c6627ca4b085e8c23 (diff)
drm/radeon/kms: r600/r700 don't process IRQ if not initialized
In some rare case the wptr returned from the hw wasn't 0 and leaded to trick r600_process_irq that their were irq to process. Add a check to bail out if irq hasn't been initialized this will avoid oops provoqued by the rare wptr != 0 on initialization. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r--drivers/gpu/drm/radeon/r600.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index a6a23a9f9a5c..0f9a8c6788a3 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2473,8 +2473,12 @@ int r600_irq_set(struct radeon_device *rdev)
2473 return -EINVAL; 2473 return -EINVAL;
2474 } 2474 }
2475 /* don't enable anything if the ih is disabled */ 2475 /* don't enable anything if the ih is disabled */
2476 if (!rdev->ih.enabled) 2476 if (!rdev->ih.enabled) {
2477 r600_disable_interrupts(rdev);
2478 /* force the active interrupt state to all disabled */
2479 r600_disable_interrupt_state(rdev);
2477 return 0; 2480 return 0;
2481 }
2478 2482
2479 if (ASIC_IS_DCE3(rdev)) { 2483 if (ASIC_IS_DCE3(rdev)) {
2480 hpd1 = RREG32(DC_HPD1_INT_CONTROL) & ~DC_HPDx_INT_EN; 2484 hpd1 = RREG32(DC_HPD1_INT_CONTROL) & ~DC_HPDx_INT_EN;
@@ -2692,6 +2696,8 @@ int r600_irq_process(struct radeon_device *rdev)
2692 bool queue_hotplug = false; 2696 bool queue_hotplug = false;
2693 2697
2694 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr); 2698 DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
2699 if (!rdev->ih.enabled)
2700 return IRQ_NONE;
2695 2701
2696 spin_lock_irqsave(&rdev->ih.lock, flags); 2702 spin_lock_irqsave(&rdev->ih.lock, flags);
2697 2703