From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt 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 Message-ID: <87ef6ior0m.fsf@anholt.net> References: <20190403154856.9470-1-paul.kocialkowski@bootlin.com> <20190403154856.9470-4-paul.kocialkowski@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: In-Reply-To: <20190403154856.9470-4-paul.kocialkowski@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: David Airlie , Daniel Vetter , Thomas Petazzoni , Maxime Ripard , Eben Upton , Daniel Stone , Paul Kocialkowski List-Id: dri-devel@lists.freedesktop.org --=-=-= Content-Type: text/plain Paul Kocialkowski 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 > --- > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlylAjkACgkQtdYpNtH8 nug79xAAmqpPcXhAJ+UODSXAWaH1qtbied6T0kvUBd1i7KViGR6irn47VA564+Bc 6e5V5jdrPlg2SymscflE5aNbSZ4AlgOZhIj1m+btznZRBEPYunoLddY1kKtsOXwh T63s6By2Hm9SQCrtxsvP6AJfOFTTuX7+/zocaYwkBbEYMHXPcWzDXZEZ4bIoWQqj gUnBMxu5wxpbIsUTJ+M7Y6Bsy1ox/T0pZy+bBOcSDUki+LTGbdyT/wKuiBtLxd2E 6v6BJu3SOEdx/AxuMZ2EzNMhp+WTKv4/0IryC94N6VGe73YnS6KCWzN/0p+Bne6W NoNy+boYrlRPtezFWvT3b+trYcPp0OAZ4WKFxHxTEoSFaUnmHbjccvQOJD/ZgCzK kuieOerorpEyEy+KZsw25bFQumYiOmBTqUR3PPUXKbE2gmjF7MQ0p0uqCAFlJmxn wo7mm2F9xN6Vhe2WlKCXyS8m4jAmqGgKKsA3fldZcjrOr/3e5p8z85qtbGe7JvRj 0pe0wIINia4T+tEj9wXjWmk52Sgk99owOuOqvt/FVjcOYNDC2lejMjsVsHD1/VEo WJ2OsbblXnBAyagQ2gn7iB6+2LDyTNKppYewHnM0L0cvIXjnWQoc7JAGHU7DfuAb hbRAvZiS461CGEKBUcJ1F3TU/Z2jkezOYiIN4x9ZSL+akyaaLqY= =6Wqr -----END PGP SIGNATURE----- --=-=-=--