From: Eric Anholt <eric@anholt.net>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Eben Upton <eben@raspberrypi.org>,
Daniel Stone <daniel@fooishbar.org>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Subject: Re: [PATCH v4 3/4] drm/vc4: Check for the binner bo before handling OOM interrupt
Date: Wed, 03 Apr 2019 11:58:01 -0700 [thread overview]
Message-ID: <87ef6ior0m.fsf@anholt.net> (raw)
In-Reply-To: <20190403154856.9470-4-paul.kocialkowski@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
Paul Kocialkowski <paul.kocialkowski@bootlin.com> writes:
> Since the OOM interrupt directly deals with the binner bo, it doesn't
> make sense to try and handle it without a binner buffer registered.
> The interrupt will kick again in due time, so we can safely ignore it
> without a binner bo allocated.
>
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
> drivers/gpu/drm/vc4/vc4_irq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
> index ffd0a4388752..723dc86b4511 100644
> --- a/drivers/gpu/drm/vc4/vc4_irq.c
> +++ b/drivers/gpu/drm/vc4/vc4_irq.c
> @@ -64,6 +64,9 @@ vc4_overflow_mem_work(struct work_struct *work)
> struct vc4_exec_info *exec;
> unsigned long irqflags;
Since OOM handling is tricky, could we add a comment to help the next
person try to understand it:
/* The OOM IRQ is level-triggered, so we'll see one at power-on before
* any jobs are submitted. The OOM IRQ is masked when this work is
* scheduled, so we can safely return if there's no binner memory
* (because no client is currently using 3D). When a bin job is
* later submitted, its tile memory allocation will end up bringing us
* back to a non-OOM state so the OOM can be triggered again.
*/
But, actually, I don't see how the OOM IRQ will ever get re-enabled.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-04-03 18:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 15:48 [PATCH v4 0/4] drm/vc4: Binner BO management improvements Paul Kocialkowski
2019-04-03 15:48 ` [PATCH v4 1/4] drm/vc4: Reformat and export binner bo allocation helper Paul Kocialkowski
2019-04-03 15:48 ` [PATCH v4 2/4] drm/vc4: Check for V3D before binner bo alloc Paul Kocialkowski
2019-04-03 15:48 ` [PATCH v4 3/4] drm/vc4: Check for the binner bo before handling OOM interrupt Paul Kocialkowski
2019-04-03 18:58 ` Eric Anholt [this message]
2019-04-04 14:33 ` Paul Kocialkowski
2019-04-04 20:09 ` Eric Anholt
2019-04-03 15:48 ` [PATCH v4 4/4] drm/vc4: Allocate binner bo when starting to use the V3D Paul Kocialkowski
2019-04-03 18:53 ` Eric Anholt
2019-04-04 12:38 ` Paul Kocialkowski
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=87ef6ior0m.fsf@anholt.net \
--to=eric@anholt.net \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eben@raspberrypi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=thomas.petazzoni@bootlin.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;
as well as URLs for NNTP newsgroup(s).