The handles exported need to be on the KMS device's fd, anything else is
failure. Also, this code is assuming that the scanout resource has been
created already, so assert it.
return vc4_bo_flink(rsc->bo, &whandle->handle);
case WINSYS_HANDLE_TYPE_KMS:
- if (screen->ro && renderonly_get_handle(rsc->scanout, whandle))
- return TRUE;
+ if (screen->ro) {
+ assert(rsc->scanout);
+ return renderonly_get_handle(rsc->scanout, whandle);
+ }
whandle->handle = rsc->bo->handle;
return TRUE;
case WINSYS_HANDLE_TYPE_FD: