Note that for requests for Prime FDs or flink names, we return handles to
the etanviv BO, not the scanout BO. This is at least better than previous
behavior of returning GEM handles for a request for an FD or flink name.
And add an assert that renderonly_get_handle is only used for getting the
GEM handle.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
if (!scanout)
return FALSE;
+ assert(handle->type == DRM_API_HANDLE_TYPE_KMS);
handle->handle = scanout->handle;
handle->stride = scanout->stride;
{
struct etna_resource *rsc = etna_resource(prsc);
- if (renderonly_get_handle(rsc->scanout, handle))
+ if (handle->type == DRM_API_HANDLE_TYPE_KMS &&
+ renderonly_get_handle(rsc->scanout, handle))
return TRUE;
return etna_screen_bo_get_handle(pscreen, rsc->bo, rsc->levels[0].stride,