gfxstream: guest: support blobCmd + blobCmdSize

This is useful for trying to hook into gfxstream's
ColorBuffer handlers, without creating shadow guest
memory associated with RESOURCE_CREATE_3D.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Gurchetan Singh
2024-06-21 11:20:07 -07:00
committed by Marge Bot
parent 7dca2000ad
commit a7fdf81103
2 changed files with 5 additions and 0 deletions

View File

@@ -117,6 +117,9 @@ struct VirtGpuCreateBlob {
enum VirtGpuResourceFlags flags;
enum VirtGpuResourceMem blobMem;
uint64_t blobId;
uint8_t* blobCmd;
uint32_t blobCmdSize;
};
struct VirtGpuCaps {

View File

@@ -184,6 +184,8 @@ VirtGpuResourcePtr LinuxVirtGpuDevice::createBlob(const struct VirtGpuCreateBlob
create.blob_mem = blobCreate.blobMem;
create.blob_flags = blobCreate.flags;
create.blob_id = blobCreate.blobId;
create.cmd = (uint64_t)(uintptr_t)blobCreate.blobCmd;
create.cmd_size = blobCreate.blobCmdSize;
ret = drmIoctl(mDeviceHandle, DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB, &create);
if (ret < 0) {