diff options
author | Eric Anholt <[email protected]> | 2017-05-10 16:06:11 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-06-15 11:41:22 -0700 |
commit | 7a171913052bacfee4c68f6fbd2b5d67e001dbae (patch) | |
tree | 07276f5f6322b02a330c22fb65b13c27f528955f /src/gallium/drivers/etnaviv/etnaviv_resource.c | |
parent | d5a9608076504c1279506d014313cbc2cffa0415 (diff) |
etnaviv: Only use renderonly_get_handle for GEM handles.
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 <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_resource.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 9aa1aa617a5..1c098445b17 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -401,7 +401,8 @@ etna_resource_get_handle(struct pipe_screen *pscreen, { 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, |