[PATCH v17 00/18] Support virtio-gpu DRM native context and MAP_FIXED API

Dmitry Osipenko posted 18 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260216191213.2556073-1-dmitry.osipenko@collabora.com
Maintainers: Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Alex Bennée" <alex.bennee@linaro.org>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Dmitry Osipenko <dmitry.osipenko@collabora.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
docs/system/devices/virtio/virtio-gpu.rst | 121 ++++++-
hw/display/trace-events                   |   2 +-
hw/display/virtio-gpu-gl.c                |  65 +++-
hw/display/virtio-gpu-virgl.c             | 423 ++++++++++++++++++++--
hw/display/virtio-gpu.c                   |  15 +
include/hw/virtio/virtio-gpu.h            |  23 +-
include/ui/sdl2.h                         |   7 +
meson.build                               |   8 +-
ui/gtk-egl.c                              |  17 +-
ui/gtk-gl-area.c                          |   8 +-
ui/sdl2-gl.c                              |  77 +++-
ui/sdl2.c                                 |  42 +++
12 files changed, 736 insertions(+), 72 deletions(-)
[PATCH v17 00/18] Support virtio-gpu DRM native context and MAP_FIXED API
Posted by Dmitry Osipenko 1 month, 3 weeks ago
Hello,

This is follow up to DRM native context v16 [1] and MAP_FIXED API v10 [2]
virtio-gpu patches that has been reviwed previously and were waiting for a
new release of libvirglrenderer.

[1] https://lore.kernel.org/qemu-devel/20251116125641.2255794-1-dmitry.osipenko@collabora.com/
[2] https://lore.kernel.org/qemu-devel/20260118162856.223796-1-dmitry.osipenko@collabora.com/

Based-on: 20260214-region-v1-1-229f00ae1f38@rsg.ci.i.u-tokyo.ac.jp

Changelog:

v17:- Rebased patches on recent upstream, updated doc patches with new
      drm native contexts supported by libvirglrenderer.

    - Applied minor change that was requested from Akihiko Odaki
      by moving virtio_gpu_device_realize() for MAP_FIXED v10.

    - Added virtio_gpu_virgl_update_render_state() to virtio_gpu_fence_poll()
      that was missed in MAP_FIXED v10.

    - Added new patches fixing another GL context switching problem I ran
      into recently with virgl commands unexpectedly processed from CPU
      thread instead main-loop:

        ui/sdl2: Unset context after GL operations
        ui/gtk-egl: Unset context after GL operations
        virtio-gpu: Unset context after GL operations

Alex Bennée (1):
  docs/system: virtio-gpu: Document host/guest requirements

Dmitry Osipenko (16):
  ui/sdl2: Restore original context after new context creation
  ui/sdl2: Don't disable scanout when display is refreshed
  ui/gtk: Don't disable scanout when display is refreshed
  ui/sdl2: Unset context after GL operations
  ui/gtk-egl: Unset context after GL operations
  virtio-gpu: Unset context after GL operations
  virtio-gpu: Handle virgl fence creation errors
  virtio-gpu: Support asynchronous fencing
  virtio-gpu: Support DRM native context
  docs/system: virtio-gpu: Add link to Mesa VirGL doc
  docs/system: virtio-gpu: Update Venus link
  virtio-gpu: Remove superfluous memory_region_set_enabled()
  virtio-gpu: Validate hostmem mapping offset
  virtio-gpu: Replace finish_unmapping with mapping_state
  virtio-gpu: Destroy virgl resources on virtio-gpu reset
  virtio-gpu: Support mapping hostmem blobs with map_fixed

Pierre-Eric Pelloux-Prayer (1):
  ui/sdl2: Implement dpy dmabuf functions

 docs/system/devices/virtio/virtio-gpu.rst | 121 ++++++-
 hw/display/trace-events                   |   2 +-
 hw/display/virtio-gpu-gl.c                |  65 +++-
 hw/display/virtio-gpu-virgl.c             | 423 ++++++++++++++++++++--
 hw/display/virtio-gpu.c                   |  15 +
 include/hw/virtio/virtio-gpu.h            |  23 +-
 include/ui/sdl2.h                         |   7 +
 meson.build                               |   8 +-
 ui/gtk-egl.c                              |  17 +-
 ui/gtk-gl-area.c                          |   8 +-
 ui/sdl2-gl.c                              |  77 +++-
 ui/sdl2.c                                 |  42 +++
 12 files changed, 736 insertions(+), 72 deletions(-)

-- 
2.52.0