Loading
CHROMIUM: virtio-gpu api: VIRTIO_GPU_F_MEMORY
Introduce the concept of memory types and memory regions to virtio-gpu.
Initially only memory regions composed of guest pages are supported
(VIRTIO_GPU_MEMORY_TRANSFER, pretty much like current backing storage
for resources). I expect support for other memory types will be added
later on.
VIRTIO_GPU_CMD_MEMORY_CREATE:
creates a new memory region.
VIRTIO_GPU_CMD_MEMORY_UNREF:
destroys a memory region.
VIRTIO_GPU_CMD_RESOURCE_CREATE_V2 :
new command to create resources. It will (a) allow to specify the
memory type, (b) adds support planar resources and (c) returns
alignment, stride and size of the resource planes. The later
will be needed in case we support mapping host resources into the
guest some day.
VIRTIO_GPU_CMD_RESOURCE_ATTACH_MEMORY:
Use memory region as backing storage for the given resource.
The existing VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING command
can be used to detach.
Motivation: This separates storage management from resource management.
It allows memory pooling (vulkan support will most likely need this).
It makes things a bit more flexible in general, for example we can
represent gem objects as memory regions even if we don't know the format
yet (happens on dma-buf import for example).
Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 8eefa19d3e2ace7047c0082bf601c6f4f36f37fd)
Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org>
BUG=chromium:924405
TEST=compile
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1591998
Reviewed-by:
Robert Tarasov <tutankhamen@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by:
Gurchetan Singh <gurchetansingh@chromium.org>
[rebase54(groeck): Context conflicts
Note that this patch does not match the patch with the same subject
on the kernel mailing list (https://patchwork.kernel.org/patch/10893777/
).
No idea if that means that this version is more recent or older or
inofficial, or that it was modified locally.
]
Signed-off-by:
Guenter Roeck <groeck@chromium.org>
Bug: 153580313
Signed-off-by:
Lingfeng Yang <lfy@google.com>
Change-Id: I258a3a735678ddefd75b968d3f6874f394ac3e46