A shareable bo should also be mappable if FD_BO_NOMAP is not set.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
if (flags & (FD_BO_SHARED | FD_BO_SCANOUT)) {
args.blob_flags = VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE |
VIRTGPU_BLOB_FLAG_USE_SHAREABLE;
- } else if (!(flags & FD_BO_NOMAP)) {
- args.blob_flags = VIRTGPU_BLOB_FLAG_USE_MAPPABLE;
}
+
+ if (!(flags & FD_BO_NOMAP)) {
+ args.blob_flags |= VIRTGPU_BLOB_FLAG_USE_MAPPABLE;
+ }
+
args.blob_id = p_atomic_inc_return(&virtio_dev->next_blob_id);
args.cmd = VOID2U64(&req);
args.cmd_size = sizeof(req);