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:

committed by
Marge Bot

parent
7dca2000ad
commit
a7fdf81103
@@ -117,6 +117,9 @@ struct VirtGpuCreateBlob {
|
|||||||
enum VirtGpuResourceFlags flags;
|
enum VirtGpuResourceFlags flags;
|
||||||
enum VirtGpuResourceMem blobMem;
|
enum VirtGpuResourceMem blobMem;
|
||||||
uint64_t blobId;
|
uint64_t blobId;
|
||||||
|
|
||||||
|
uint8_t* blobCmd;
|
||||||
|
uint32_t blobCmdSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VirtGpuCaps {
|
struct VirtGpuCaps {
|
||||||
|
@@ -184,6 +184,8 @@ VirtGpuResourcePtr LinuxVirtGpuDevice::createBlob(const struct VirtGpuCreateBlob
|
|||||||
create.blob_mem = blobCreate.blobMem;
|
create.blob_mem = blobCreate.blobMem;
|
||||||
create.blob_flags = blobCreate.flags;
|
create.blob_flags = blobCreate.flags;
|
||||||
create.blob_id = blobCreate.blobId;
|
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);
|
ret = drmIoctl(mDeviceHandle, DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB, &create);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Reference in New Issue
Block a user