summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-06-06 21:41:09 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-09-15 16:19:48 +0100
commitf84a97d4804a09240372dc7b195f9d6162152228 (patch)
tree277ad69fe69e1a4137138b37d057e7a24e738348 /drivers/gpu/drm/i2c
parent3f3d0d00734de56a0c5996f4e4433046c745592e (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>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c5
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)
{
struct tda998x_priv *priv = data;
u8 sta, cec, lvl, flag0, flag1, flag2;
+ bool handled = false;
sta = cec_read(priv, REG_CEC_INTSTATUS);
cec = cec_read(priv, REG_CEC_RXSHPDINT);
@@ -582,10 +583,12 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data)
if ((flag2 & INT_FLAGS_2_EDID_BLK_RD) && priv->wq_edid_wait) {
priv->wq_edid_wait = 0;
wake_up(&priv->wq_edid);
+ handled = true;
} else if (cec != 0) { /* HPD change */
schedule_delayed_work(&priv->dwork, HZ/10);
+ handled = true;
}
- return IRQ_HANDLED;
+ return IRQ_RETVAL(handled);
}
static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes)