Mesa (staging/18.2): vc4: Fix context creation when syncobjs aren't supported.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 8 09:20:59 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: ed117c27e1123630952ae4a9fbe3d81ea45165fe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed117c27e1123630952ae4a9fbe3d81ea45165fe
Author: Eric Anholt <eric at anholt.net>
Date: Mon Aug 6 15:28:56 2018 -0700
vc4: Fix context creation when syncobjs aren't supported.
Noticed when trying to run current Mesa on rpi's downstream kernel.
Fixes: b0acc3a5628c ("broadcom/vc4: Native fence fd support")
(cherry picked from commit 86095e9bb1335b082554ed2ceaaa66470b24cb28)
---
src/gallium/drivers/vc4/vc4_fence.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_fence.c b/src/gallium/drivers/vc4/vc4_fence.c
index 7071425595..fac9df34d4 100644
--- a/src/gallium/drivers/vc4/vc4_fence.c
+++ b/src/gallium/drivers/vc4/vc4_fence.c
@@ -142,8 +142,12 @@ vc4_fence_context_init(struct vc4_context *vc4)
/* Since we initialize the in_fence_fd to -1 (no wait necessary),
* we also need to initialize our in_syncobj as signaled.
*/
- return drmSyncobjCreate(vc4->fd, DRM_SYNCOBJ_CREATE_SIGNALED,
- &vc4->in_syncobj);
+ if (vc4->screen->has_syncobj) {
+ return drmSyncobjCreate(vc4->fd, DRM_SYNCOBJ_CREATE_SIGNALED,
+ &vc4->in_syncobj);
+ } else {
+ return 0;
+ }
}
void
More information about the mesa-commit
mailing list