* [PATCH] drm/qxl: return IRQ_NONE if it was not our irq
@ 2014-05-12 8:35 Jason Wang
2014-05-20 8:22 ` Amos Kong
2014-07-16 2:52 ` Jason Wang
0 siblings, 2 replies; 3+ messages in thread
From: Jason Wang @ 2014-05-12 8:35 UTC (permalink / raw)
To: airlied, dri-devel, linux-kernel; +Cc: Jason Wang, Gerd Hoffmann, stable
Return IRQ_NONE if it was not our irq. This is necessary for the case
when qxl is sharing irq line with a device A in a crash kernel. If qxl
is initialized before A and A's irq was raised during this gap,
returning IRQ_HANDLED in this case will cause this irq to be raised
again after EOI since kernel think it was handled but in fact it was
not.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/gpu/drm/qxl/qxl_irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c
index 28f84b4..3485bdc 100644
--- a/drivers/gpu/drm/qxl/qxl_irq.c
+++ b/drivers/gpu/drm/qxl/qxl_irq.c
@@ -33,6 +33,9 @@ irqreturn_t qxl_irq_handler(int irq, void *arg)
pending = xchg(&qdev->ram_header->int_pending, 0);
+ if (!pending)
+ return IRQ_NONE;
+
atomic_inc(&qdev->irq_received);
if (pending & QXL_INTERRUPT_DISPLAY) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/qxl: return IRQ_NONE if it was not our irq
2014-05-12 8:35 [PATCH] drm/qxl: return IRQ_NONE if it was not our irq Jason Wang
@ 2014-05-20 8:22 ` Amos Kong
2014-07-16 2:52 ` Jason Wang
1 sibling, 0 replies; 3+ messages in thread
From: Amos Kong @ 2014-05-20 8:22 UTC (permalink / raw)
To: Jason Wang; +Cc: airlied, dri-devel, linux-kernel, Gerd Hoffmann, stable
On Mon, May 12, 2014 at 04:35:39PM +0800, Jason Wang wrote:
> Return IRQ_NONE if it was not our irq. This is necessary for the case
> when qxl is sharing irq line with a device A in a crash kernel. If qxl
> is initialized before A and A's irq was raised during this gap,
> returning IRQ_HANDLED in this case will cause this irq to be raised
> again after EOI since kernel think it was handled but in fact it was
> not.
>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> drivers/gpu/drm/qxl/qxl_irq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c
> index 28f84b4..3485bdc 100644
> --- a/drivers/gpu/drm/qxl/qxl_irq.c
> +++ b/drivers/gpu/drm/qxl/qxl_irq.c
> @@ -33,6 +33,9 @@ irqreturn_t qxl_irq_handler(int irq, void *arg)
>
> pending = xchg(&qdev->ram_header->int_pending, 0);
>
> + if (!pending)
> + return IRQ_NONE;
> +
Looks correct.
Revewed-by: Amos Kong <akong@redhat.com>
> atomic_inc(&qdev->irq_received);
>
> if (pending & QXL_INTERRUPT_DISPLAY) {
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Amos.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/qxl: return IRQ_NONE if it was not our irq
2014-05-12 8:35 [PATCH] drm/qxl: return IRQ_NONE if it was not our irq Jason Wang
2014-05-20 8:22 ` Amos Kong
@ 2014-07-16 2:52 ` Jason Wang
1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2014-07-16 2:52 UTC (permalink / raw)
To: airlied, dri-devel, linux-kernel; +Cc: Gerd Hoffmann, stable
On 05/12/2014 04:35 PM, Jason Wang wrote:
> Return IRQ_NONE if it was not our irq. This is necessary for the case
> when qxl is sharing irq line with a device A in a crash kernel. If qxl
> is initialized before A and A's irq was raised during this gap,
> returning IRQ_HANDLED in this case will cause this irq to be raised
> again after EOI since kernel think it was handled but in fact it was
> not.
>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> drivers/gpu/drm/qxl/qxl_irq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c
> index 28f84b4..3485bdc 100644
> --- a/drivers/gpu/drm/qxl/qxl_irq.c
> +++ b/drivers/gpu/drm/qxl/qxl_irq.c
> @@ -33,6 +33,9 @@ irqreturn_t qxl_irq_handler(int irq, void *arg)
>
> pending = xchg(&qdev->ram_header->int_pending, 0);
>
> + if (!pending)
> + return IRQ_NONE;
> +
> atomic_inc(&qdev->irq_received);
>
> if (pending & QXL_INTERRUPT_DISPLAY) {
Ping.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-16 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 8:35 [PATCH] drm/qxl: return IRQ_NONE if it was not our irq Jason Wang
2014-05-20 8:22 ` Amos Kong
2014-07-16 2:52 ` Jason Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).