freedreno/drm/virtio: Don't try to mmap imported bo's
Previously it would fail, and then we'd fall back to the transfer path for things like readpix. But it would spam logcat w/ bo_mmap fail messages. Since gralloc allocated buffers for GPU usage are allocate without _USE_MAPPABLE, let's just assume we can't map imported bo's. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16477>
This commit is contained in:
@@ -280,6 +280,9 @@ bo_from_handle(struct fd_device *dev, uint32_t size, uint32_t handle)
|
||||
bo->funcs = &funcs;
|
||||
bo->handle = handle;
|
||||
|
||||
/* Don't assume we can mmap an imported bo: */
|
||||
bo->alloc_flags = FD_BO_NOMAP;
|
||||
|
||||
struct drm_virtgpu_resource_info args = {
|
||||
.bo_handle = handle,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user