From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Eben Upton <eben@raspberrypi.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Subject: [PATCH v8 2/4] drm/vc4: Check for V3D before binner bo alloc
Date: Fri, 3 May 2019 10:12:40 +0200 [thread overview]
Message-ID: <20190503081242.29039-3-paul.kocialkowski@bootlin.com> (raw)
In-Reply-To: <20190503081242.29039-1-paul.kocialkowski@bootlin.com>
Check that we have a V3D device registered before attempting to
allocate a binner buffer object.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
drivers/gpu/drm/vc4/vc4_v3d.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
index 7c490106e185..c16db4665af6 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -241,6 +241,9 @@ static int bin_bo_alloc(struct vc4_dev *vc4)
int ret = 0;
struct list_head list;
+ if (!v3d)
+ return -ENODEV;
+
/* We may need to try allocating more than once to get a BO
* that doesn't cross 256MB. Track the ones we've allocated
* that failed so far, so that we can free them when we've got
--
2.21.0
next prev parent reply other threads:[~2019-05-03 8:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 8:12 [PATCH v8 0/4] drm/vc4: Binner BO management improvements Paul Kocialkowski
2019-05-03 8:12 ` [PATCH v8 1/4] drm/vc4: Reformat and the binner bo allocation helper Paul Kocialkowski
2019-05-03 8:12 ` Paul Kocialkowski [this message]
2019-05-03 8:12 ` [PATCH v8 3/4] drm/vc4: Check for the binner bo before handling OOM interrupt Paul Kocialkowski
2019-05-03 8:12 ` [PATCH v8 4/4] drm/vc4: Allocate binner bo when starting to use the V3D Paul Kocialkowski
2019-05-09 18:39 ` Eric Anholt
2019-05-10 15:48 ` 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=20190503081242.29039-3-paul.kocialkowski@bootlin.com \
--to=paul.kocialkowski@bootlin.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eben@raspberrypi.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@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
all inboxes | Powered by JetHome®