Commit cc71bf52 authored by Eric Anholt's avatar Eric Anholt

vc4: Don't return a vc4 BO handle on a renderonly screen.

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.
parent cc0bc76a
......@@ -319,8 +319,10 @@ vc4_resource_get_handle(struct pipe_screen *pscreen,
return vc4_bo_flink(rsc->bo, &whandle->handle);
if (screen->ro && renderonly_get_handle(rsc->scanout, whandle))
return TRUE;
if (screen->ro) {
return renderonly_get_handle(rsc->scanout, whandle);
whandle->handle = rsc->bo->handle;
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment