From: Stefan Schake <stschake@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
linux-rpi-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Stefan Schake <stschake@gmail.com>
Subject: [PATCH 2/2] drm/vc4: Ensure interrupts are disabled
Date: Fri, 10 Nov 2017 02:05:07 +0100 [thread overview]
Message-ID: <1510275907-993-3-git-send-email-stschake@gmail.com> (raw)
In-Reply-To: <1510275907-993-1-git-send-email-stschake@gmail.com>
The overflow mem work callback vc4_overflow_mem_work reenables its
associated interrupt upon completion. To ensure all interrupts are disabled
when we return from vc4_irq_uninstall, we need to disable it again if
cancel_work_sync indicated pending work.
Signed-off-by: Stefan Schake <stschake@gmail.com>
---
drivers/gpu/drm/vc4/vc4_irq.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index 61b2e53..7d780149d 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -231,7 +231,14 @@
/* Finish any interrupt handler still in flight. */
disable_irq(dev->irq);
- cancel_work_sync(&vc4->overflow_mem_work);
+ if (cancel_work_sync(&vc4->overflow_mem_work)) {
+ /*
+ * Work was still pending. The overflow mem work's
+ * callback reenables the OUTOMEM interrupt upon
+ * completion, so ensure it is disabled here.
+ */
+ V3D_WRITE(V3D_INTDIS, V3D_INT_OUTOMEM);
+ }
}
/** Reinitializes interrupt registers when a GPU reset is performed. */
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-11-10 1:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 1:05 [PATCH 0/2] drm/vc4: Correctly uninstall interrupts Stefan Schake
2017-11-10 1:05 ` [PATCH 1/2] drm/vc4: Account for interrupts in flight Stefan Schake
2017-11-14 0:59 ` Eric Anholt
2017-11-10 1:05 ` Stefan Schake [this message]
2017-11-14 0:18 ` [PATCH 2/2] drm/vc4: Ensure interrupts are disabled Eric Anholt
2017-11-14 11:43 ` Stefan Schake
2017-11-14 19:44 ` Eric Anholt
2017-11-14 23:18 ` Stefan Schake
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=1510275907-993-3-git-send-email-stschake@gmail.com \
--to=stschake@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.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