Skip to contentSkip to conversation

drm/radeon/kms: Don't try to process irq when we are unloading

PATCH In review Jerome Glisse 2 participants 2 messages Sep 9, 2009 – Sep 10, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: Don't try to process irq when we are unloading

If module is being unloaded we should not try to handle irq especialy we should not call into drm helper or we could hard hang the computer free_irq will call the irq handler to make sure we behave properly.

---
 drivers/gpu/drm/radeon/r100.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/r100.c +3 -0
index 5708c07..36d0ba2 100644
@@ -319,6 +319,9 @@ int r100_irq_process(struct radeon_device *rdev)
 	if (!status) {
 		return IRQ_NONE;
 	}
+	if (rdev->shutdown) {
+		return IRQ_NONE;
+	}
 	while (status) {
 		/* SW interrupt */
 		if (status & RADEON_SW_INT_TEST) {
Signature · 1 line
1.6.4.1
#1 lore raw
Quoted 3 lines · Jerome Glisse

If module is being unloaded we should not try to handle irq especialy we should not call into drm helper or we could hard hang the computer free_irq will call the irq handler to make sure we behave properly.

Should you not just ack all irqs here before returning, else we'll just get called again.

Dave.

Quoted 21 lines
---
 drivers/gpu/drm/radeon/r100.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/r100.c +3 -0
index 5708c07..36d0ba2 100644
@@ -319,6 +319,9 @@ int r100_irq_process(struct radeon_device *rdev)
 	if (!status) {
 		return IRQ_NONE;
 	}
+	if (rdev->shutdown) {
+		return IRQ_NONE;
+	}
 	while (status) {
 		/* SW interrupt */
 		if (status & RADEON_SW_INT_TEST) {