dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 02/11] drm/i2c: tda998x: report whether we actually handled the IRQ
Date: Tue, 29 Sep 2015 19:32:46 +0100	[thread overview]
Message-ID: <E1Zgzhm-00042J-AM@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20150929183216.GQ21513@n2100.arm.linux.org.uk>

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>
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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)
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-09-29 18:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 18:32 [PATCH 00/11] tda998x updates Russell King - ARM Linux
2015-09-29 18:32 ` [PATCH 01/11] drm/i2c: tda998x: remove useless NULL checks Russell King
2015-09-29 18:32 ` Russell King [this message]
2015-09-29 18:32 ` [PATCH 03/11] drm/i2c: tda998x: re-implement "Fix EDID read timeout on HDMI connect" Russell King
2015-09-29 18:32 ` [PATCH 04/11] drm/i2c: tda998x: convert to u8/u16/u32 types Russell King
2015-09-29 18:33 ` [PATCH 05/11] drm/i2c: tda998x: handle all outstanding interrupts Russell King
2015-09-29 18:33 ` [PATCH 06/11] drm/i2c: tda998x: use more HDMI helpers Russell King
2015-09-29 18:33 ` [PATCH 07/11] drm/i2c: tda998x: remove DRM slave encoder support Russell King
2015-09-29 18:33 ` [PATCH 08/11] drm/i2c: tda998x: remove encoder pointer Russell King
2015-09-29 18:33 ` [PATCH 09/11] drm/i2c: tda998x: move connector into struct tda998x_priv Russell King
2015-09-29 18:33 ` [PATCH 10/11] drm/i2c: tda998x: kill struct tda998x_priv2 Russell King
2015-09-29 18:33 ` [PATCH 11/11] drm/i2c: tda998x: clean up after struct tda998x_priv2 removal Russell King
2015-10-09 13:25 ` [PATCH 00/11] tda998x updates Russell King - ARM Linux
2015-10-09 15:54   ` Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Zgzhm-00042J-AM@rmk-PC.arm.linux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox