diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-06-06 16:41:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-09-15 11:19:48 -0400 |
commit | f84a97d4804a09240372dc7b195f9d6162152228 (patch) | |
tree | 277ad69fe69e1a4137138b37d057e7a24e738348 | |
parent | 3f3d0d00734de56a0c5996f4e4433046c745592e (diff) |
drm/i2c: tda998x: report whether we actually handled the IRQ
Rather than always reporting that the interrupt was handled, we should
report whether we did handle the interrupt. Arrange to report IRQ_NONE
for cases where we found nothing to do.
This allows us to (eventually) recover from stuck-IRQ problems, rather
than causing the kernel to solidly lock up.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index d8e97085f866..ad3ce3479edf 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -569,6 +569,7 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data) | |||
569 | { | 569 | { |
570 | struct tda998x_priv *priv = data; | 570 | struct tda998x_priv *priv = data; |
571 | u8 sta, cec, lvl, flag0, flag1, flag2; | 571 | u8 sta, cec, lvl, flag0, flag1, flag2; |
572 | bool handled = false; | ||
572 | 573 | ||
573 | sta = cec_read(priv, REG_CEC_INTSTATUS); | 574 | sta = cec_read(priv, REG_CEC_INTSTATUS); |
574 | cec = cec_read(priv, REG_CEC_RXSHPDINT); | 575 | cec = cec_read(priv, REG_CEC_RXSHPDINT); |
@@ -582,10 +583,12 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data) | |||
582 | if ((flag2 & INT_FLAGS_2_EDID_BLK_RD) && priv->wq_edid_wait) { | 583 | if ((flag2 & INT_FLAGS_2_EDID_BLK_RD) && priv->wq_edid_wait) { |
583 | priv->wq_edid_wait = 0; | 584 | priv->wq_edid_wait = 0; |
584 | wake_up(&priv->wq_edid); | 585 | wake_up(&priv->wq_edid); |
586 | handled = true; | ||
585 | } else if (cec != 0) { /* HPD change */ | 587 | } else if (cec != 0) { /* HPD change */ |
586 | schedule_delayed_work(&priv->dwork, HZ/10); | 588 | schedule_delayed_work(&priv->dwork, HZ/10); |
589 | handled = true; | ||
587 | } | 590 | } |
588 | return IRQ_HANDLED; | 591 | return IRQ_RETVAL(handled); |
589 | } | 592 | } |
590 | 593 | ||
591 | static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes) | 594 | static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes) |