From: Steven Price <steven.price@arm.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Subject: Re: [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs
Date: Mon, 1 Feb 2021 13:24:00 +0000 [thread overview]
Message-ID: <e58d88f9-aabb-872c-0d54-e601f2ade011@arm.com> (raw)
In-Reply-To: <20210201135902.6798a203@collabora.com>
On 01/02/2021 12:59, Boris Brezillon wrote:
> On Mon, 1 Feb 2021 12:13:49 +0000
> Steven Price <steven.price@arm.com> wrote:
>
>> On 01/02/2021 08:21, Boris Brezillon wrote:
>>> 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>
>>
>> Looks fine to me, but I'm interested to know if you actually saw a
>> performance improvement. Back-to-back MMU faults should (hopefully) be
>> fairly uncommon.
>
> I actually didn't check the perf improvement or the actual number of
> back-to-back MMU faults, but
> dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_1000x1000_drawcount_5000
> seemed to generate a few of those, so I thought it'd be good to
> optimize that case given how trivial it is.
Fair enough! I was just a little concerned that Panfrost was somehow
provoking enough interrupts that this was a measurable performance
improvement.
I assume you'll push these to drm-misc-next (/fixes) as appropriate.
Thanks,
Steve
>>
>> Regardless:
>>
>> Reviewed-by: Steven Price <steven.price@arm.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;
>>> };
>>>
>>
>
_______________________________________________
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 13:24 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 ` [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs Boris Brezillon
2021-02-01 12:13 ` Steven Price
2021-02-01 12:59 ` Boris Brezillon
2021-02-01 13:24 ` Steven Price [this message]
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=e58d88f9-aabb-872c-0d54-e601f2ade011@arm.com \
--to=steven.price@arm.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
/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