Skip to content

virtio-gpu: Add support for Blob resources feature

Vivek Kasireddy qemu-devel 7 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest14 patches 0 repliesNew
  2. v613 patches 2 repliesSuperseded
  3. v513 patches 6 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v413 patches2 repliesSuperseded
v320 patches4 repliesSuperseded
v212 patches4 repliesSuperseded
v111 patches7 repliesSuperseded

Changes in v7 from the cover letter

- Added a file in stubs for udmabuf helpers
- Included the header qemu/memfd.h so that F_GET_SEALS gets a definition if it is not defined in standard headers

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14ui: Get the fd associated with udmabuf driverinclude/ui/console.h ui/meson.build ui/udmabuf.c+44 -00 replies
2/14headers: Add udmabuf.hinclude/standard-headers/linux/udmabuf.h scripts/update-linux-headers.sh+35 -00 replies
3/14virtio-gpu: Add udmabuf helpershw/display/meson.build hw/display/virtio-gpu-udmabuf.c include/hw/virtio/virtio-gpu.h+170 -00 replies
4/14stubs: Add stubs for udmabuf helpersmeson.build stubs/meson.build stubs/virtio-gpu-udmabuf.c+20 -10 replies
5/14virtio-gpu: Add virtio_gpu_find_check_resourcehw/display/virtio-gpu.c+47 -190 replies
6/14virtio-gpu: Refactor virtio_gpu_set_scanouthw/display/virtio-gpu.c include/hw/virtio/virtio-gpu.h+95 -640 replies
7/14virtio-gpu: Refactor virtio_gpu_create_mapping_iovhw/display/virtio-gpu-virgl.c hw/display/virtio-gpu.c include/hw/virtio/virtio-gpu.h+12 -120 replies
8/14virtio-gpu: Add initial definitions for blob resourceshw/display/virtio-gpu-base.c hw/display/virtio-gpu.c include/hw/virtio/virtio-gpu.h+20 -00 replies
9/14virtio-gpu: Add virtio_gpu_resource_create_blobhw/display/trace-events hw/display/virtio-gpu.c include/hw/virtio/virtio-gpu-bswap.h+80 -30 replies
10/14ui/pixman: Add qemu_pixman_to_drm_format()include/ui/qemu-pixman.h ui/qemu-pixman.c+25 -110 replies
11/14virtio-gpu: Add helpers to create and destroy dmabuf objectshw/display/virtio-gpu-udmabuf.c include/hw/virtio/virtio-gpu.h stubs/virtio-gpu-udmabuf.c+89 -00 replies
12/14virtio-gpu: Factor out update scanouthw/display/virtio-gpu.c+23 -120 replies
13/14virtio-gpu: Add virtio_gpu_set_scanout_blobhw/display/trace-events hw/display/virtio-gpu.c include/hw/virtio/virtio-gpu-bswap.h+103 -70 replies
14/14virtio-gpu: Update cursor data using blobhw/display/virtio-gpu.c+14 -50 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchGerd Hoffmann
1/14Based-on-patch-by
2/14Based-on-patch-by
3/14Based-on-patch-by
4/14
5/14Based-on-patch-by
6/14Based-on-patch-by
7/14
8/14Based-on-patch-by
9/14Based-on-patch-by
10/14Based-on-patch-by
11/14
12/14
13/14Based-on-patch-by
14/14Based-on-patch-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/14] virtio-gpu: Add support for Blob resources feature

Enabling this feature would eliminate data copies from the resource object in the Guest to the shadow resource in Qemu. This patch series however adds support only for Blobs of type VIRTIO_GPU_BLOB_MEM_GUEST with property VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE.

Most of the patches in this series are a rebased, refactored and bugfixed versions of Gerd Hoffmann's patches located here:
https://gitlab.freedesktop.org/virgl/qemu/-/commits/virtio-gpu-next

v2:
- Moved dpy_gl_update from set_scanout to resource_flush
- Dropped the modifier
- Rebase and other minor refactoring

v3:
- Rebased on top of Gerd's virgl device split series
- Split the udmabuf helpers patch from the previous version into two (Gerd)
- Added explicit flush feature (last 7 patches)

v4 (Gerd):
- Dropped explicit flush feature patches from the series
- Slightly refactored udmabuf helpers patch (#3) to introduce and use blob and blob_size fields
- Fixed indentation issues and made other small changes in set_scanout_blob patch (#12)

v5:
- Rebase (only #6 - Refactor virtio_gpu_create_mapping_iov)

v6:
- Fixed compilation error seen in patch #5 with !linux config
- Fixed uninitialized variable usage warning in patch #10

v7:
- Added a file in stubs for udmabuf helpers
- Included the header qemu/memfd.h so that F_GET_SEALS gets a definition if it is not defined in standard headers

Cc Gerd Hoffmann <[email protected]>

Vivek Kasireddy (14):
ui: Get the fd associated with udmabuf driver
headers: Add udmabuf.h
virtio-gpu: Add udmabuf helpers
stubs: Add stubs for udmabuf helpers
virtio-gpu: Add virtio_gpu_find_check_resource
virtio-gpu: Refactor virtio_gpu_set_scanout
virtio-gpu: Refactor virtio_gpu_create_mapping_iov
virtio-gpu: Add initial definitions for blob resources
virtio-gpu: Add virtio_gpu_resource_create_blob ui/pixman: Add qemu_pixman_to_drm_format()
virtio-gpu: Add helpers to create and destroy dmabuf objects
virtio-gpu: Factor out update scanout
virtio-gpu: Add virtio_gpu_set_scanout_blob
virtio-gpu: Update cursor data using blob

 hw/display/meson.build                   |   1 +
 hw/display/trace-events                  |   2 +
 hw/display/virtio-gpu-base.c             |   3 +
 hw/display/virtio-gpu-udmabuf.c          | 223 ++++++++++++
 hw/display/virtio-gpu-virgl.c            |   3 +-
 hw/display/virtio-gpu.c                  | 431 ++++++++++++++++++-----
 include/hw/virtio/virtio-gpu-bswap.h     |  16 +
 include/hw/virtio/virtio-gpu.h           |  39 +-
 include/standard-headers/linux/udmabuf.h |  32 ++
 include/ui/console.h                     |   3 +
 include/ui/qemu-pixman.h                 |   1 +
 meson.build                              |   2 +-
 scripts/update-linux-headers.sh          |   3 +
 stubs/meson.build                        |   1 +
 stubs/virtio-gpu-udmabuf.c               |  27 ++
 ui/meson.build                           |   1 +
 ui/qemu-pixman.c                         |  35 +-
 ui/udmabuf.c                             |  40 +++
 18 files changed, 753 insertions(+), 110 deletions(-)
 create mode 100644 hw/display/virtio-gpu-udmabuf.c
 create mode 100644 include/standard-headers/linux/udmabuf.h
 create mode 100644 stubs/virtio-gpu-udmabuf.c
 create mode 100644 ui/udmabuf.c
Signature · 1 line
2.30.2