Noticed when trying to run current Mesa on rpi's downstream kernel.
Fixes: b0acc3a5628c ("broadcom/vc4: Native fence fd support")
/* 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