Skip to content

Commit

Permalink
drm/vc4: Check for V3D before binner bo alloc
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-3-paul.kocialkowski@bootlin.com
  • Loading branch information
Paul Kocialkowski committed May 23, 2019
1 parent 66fafd3 commit 65f50f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vc4/vc4_v3d.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 65f50f9

Please sign in to comment.