From: Boris Brezillon <boris.brezillon@collabora.com>
To: Rob Herring <robh+dt@kernel.org>,
Tomeu Vizoso <tomeu@tomeuvizoso.net>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
Steven Price <steven.price@arm.com>,
Robin Murphy <robin.murphy@arm.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs
Date: Mon, 1 Feb 2021 09:21:16 +0100 [thread overview]
Message-ID: <20210201082116.267208-4-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20210201082116.267208-1-boris.brezillon@collabora.com>
Doing a hw-irq -> threaded-irq round-trip is counter-productive, stay
in the threaded irq handler as long as we can.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/gpu/drm/panfrost/panfrost_mmu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index 21e552d1ac71..65bc20628c4e 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -580,6 +580,8 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
u32 status = mmu_read(pfdev, MMU_INT_RAWSTAT);
int i, ret;
+again:
+
for (i = 0; status; i++) {
u32 mask = BIT(i) | BIT(i + 16);
u64 addr;
@@ -628,6 +630,11 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
status &= ~mask;
}
+ /* If we received new MMU interrupts, process them before returning. */
+ status = mmu_read(pfdev, MMU_INT_RAWSTAT);
+ if (status)
+ goto again;
+
mmu_write(pfdev, MMU_INT_MASK, ~0);
return IRQ_HANDLED;
};
--
2.26.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-02-01 8:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 8:21 [PATCH 0/3] drm/panfrost: MMU fixes Boris Brezillon
2021-02-01 8:21 ` [PATCH 1/3] drm/panfrost: Clear MMU irqs before handling the fault Boris Brezillon
2021-02-01 12:13 ` Steven Price
2021-02-01 8:21 ` [PATCH 2/3] drm/panfrost: Don't try to map pages that are already mapped Boris Brezillon
2021-02-01 12:13 ` Steven Price
2021-02-01 8:21 ` Boris Brezillon [this message]
2021-02-01 12:13 ` [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs Steven Price
2021-02-01 12:59 ` Boris Brezillon
2021-02-01 13:24 ` Steven Price
2021-02-01 13:47 ` Boris Brezillon
2021-02-03 14:45 ` Rob Herring
2021-02-03 15:43 ` Steven Price
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=20210201082116.267208-4-boris.brezillon@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=tomeu@tomeuvizoso.net \
/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;
as well as URLs for NNTP newsgroup(s).