[PATCH 00/20] Various vhost-user-gpu & UI fixes

marcandre.lureau@redhat.com posted 20 patches 3 years, 3 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210202142625.609070-1-marcandre.lureau@redhat.com
There is a newer version of this series
contrib/vhost-user-gpu/vugpu.h          |  10 +-
include/hw/virtio/virtio-gpu.h          |   6 +-
include/ui/console.h                    |  35 +++++-
include/ui/egl-context.h                |   1 -
include/ui/egl-helpers.h                |   1 +
include/ui/gtk.h                        |   4 +
include/ui/sdl2.h                       |   1 -
chardev/char-socket.c                   |  53 +++++----
contrib/vhost-user-gpu/vhost-user-gpu.c |  77 ++++++++----
contrib/vhost-user-gpu/virgl.c          |   2 +-
hw/display/vhost-user-gpu.c             |  17 +--
hw/display/virtio-gpu-base.c            |  31 ++++-
hw/display/virtio-gpu.c                 |   9 +-
hw/display/virtio-vga.c                 |  20 ++++
hw/vfio/display.c                       |   6 +
ui/console.c                            |  61 +++++++---
ui/egl-context.c                        |   5 -
ui/egl-headless.c                       |   1 -
ui/egl-helpers.c                        |   9 ++
ui/gtk-egl.c                            |   3 +
ui/gtk-gl-area.c                        |  28 +++++
ui/gtk.c                                |  43 +++++--
ui/sdl2-gl.c                            |  10 +-
ui/sdl2.c                               |   1 -
ui/spice-display.c                      |   2 +-
tests/acceptance/virtio-gpu.py          | 150 ++++++++++++++++++++++++
26 files changed, 484 insertions(+), 102 deletions(-)
create mode 100644 tests/acceptance/virtio-gpu.py
[PATCH 00/20] Various vhost-user-gpu & UI fixes
Posted by marcandre.lureau@redhat.com 3 years, 3 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Here is a collection of fixes and improvements mostly around vhost-user-gpu. In
combination with spice, they work best with the previously sent fixes ("[PATCH
0/2] Fix (non-vga) QXL async screendump" & "[PATCH v2] spice: delay starting
until display are initialized"). I also use virgl from git, which seems to work
better. You also need mesa with the recent fix !8663 from last week if you test
this.

The last patch is a simple RFC avocado test to have the basics under some
control and avoid simple regressions.

I have further refactoring work pending to separate the DisplayChangeListener
from the GL context. This should allow to run a GL-less qemu with Spice client &
vhost-user-gpu/virgl for example.

Marc-André Lureau (20):
  vhost-user-gpu: check backend for EDID support
  vhost-user-gpu: handle vhost-user-gpu features in a callback
  vhost-user-gpu: use an extandable state enum for commands
  vhost-user-gpu: handle display-info in a callback
  ui: remove extra #ifdef CONFIG_OPENGL
  ui: remove gl_ctx_get_current
  ui: add gd_gl_area_scanout_disable
  ui: annotate DCLOps callback requirements
  ui: remove console_has_gl_dmabuf()
  vhost-user-gpu: add a configuration flag for dmabuf usage
  ui: add an optional get_flags callback to GraphicHwOps
  ui: add a DCLOps callback to check dmabuf support
  ui: check hw requirements during DCL registration
  ui: add qemu_egl_has_dmabuf helper
  ui: check gtk-egl dmabuf support
  ui: add egl dmabuf import to gtkglarea
  virtio-gpu: avoid re-entering cmdq processing
  display/ui: add a callback to indicate GL state is flushed
  chardev: check if the chardev is registered for yanking
  RFC: tests: add some virtio-gpu & vhost-user-gpu acceptance test

 contrib/vhost-user-gpu/vugpu.h          |  10 +-
 include/hw/virtio/virtio-gpu.h          |   6 +-
 include/ui/console.h                    |  35 +++++-
 include/ui/egl-context.h                |   1 -
 include/ui/egl-helpers.h                |   1 +
 include/ui/gtk.h                        |   4 +
 include/ui/sdl2.h                       |   1 -
 chardev/char-socket.c                   |  53 +++++----
 contrib/vhost-user-gpu/vhost-user-gpu.c |  77 ++++++++----
 contrib/vhost-user-gpu/virgl.c          |   2 +-
 hw/display/vhost-user-gpu.c             |  17 +--
 hw/display/virtio-gpu-base.c            |  31 ++++-
 hw/display/virtio-gpu.c                 |   9 +-
 hw/display/virtio-vga.c                 |  20 ++++
 hw/vfio/display.c                       |   6 +
 ui/console.c                            |  61 +++++++---
 ui/egl-context.c                        |   5 -
 ui/egl-headless.c                       |   1 -
 ui/egl-helpers.c                        |   9 ++
 ui/gtk-egl.c                            |   3 +
 ui/gtk-gl-area.c                        |  28 +++++
 ui/gtk.c                                |  43 +++++--
 ui/sdl2-gl.c                            |  10 +-
 ui/sdl2.c                               |   1 -
 ui/spice-display.c                      |   2 +-
 tests/acceptance/virtio-gpu.py          | 150 ++++++++++++++++++++++++
 26 files changed, 484 insertions(+), 102 deletions(-)
 create mode 100644 tests/acceptance/virtio-gpu.py

-- 
2.29.0



Re: [PATCH 00/20] Various vhost-user-gpu & UI fixes
Posted by no-reply@patchew.org 3 years, 3 months ago
Patchew URL: https://patchew.org/QEMU/20210202142625.609070-1-marcandre.lureau@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210202142625.609070-1-marcandre.lureau@redhat.com
Subject: [PATCH 00/20] Various vhost-user-gpu & UI fixes

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20210128224141.638790-1-richard.henderson@linaro.org -> patchew/20210128224141.638790-1-richard.henderson@linaro.org
 - [tag update]      patchew/20210202135522.127380-1-dgilbert@redhat.com -> patchew/20210202135522.127380-1-dgilbert@redhat.com
 * [new tag]         patchew/20210202142625.609070-1-marcandre.lureau@redhat.com -> patchew/20210202142625.609070-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
22d6630 RFC: tests: add some virtio-gpu & vhost-user-gpu acceptance test
e3c9583 chardev: check if the chardev is registered for yanking
b1fb728 display/ui: add a callback to indicate GL state is flushed
8e9a9d9 virtio-gpu: avoid re-entering cmdq processing
6495eb7 ui: add egl dmabuf import to gtkglarea
9fe1210 ui: check gtk-egl dmabuf support
165cebf ui: add qemu_egl_has_dmabuf helper
6339b5b ui: check hw requirements during DCL registration
483c6af ui: add a DCLOps callback to check dmabuf support
43e7283 ui: add an optional get_flags callback to GraphicHwOps
24a96b4 vhost-user-gpu: add a configuration flag for dmabuf usage
851661e ui: remove console_has_gl_dmabuf()
6f62883 ui: annotate DCLOps callback requirements
0843e91 ui: add gd_gl_area_scanout_disable
ea06ae9 ui: remove gl_ctx_get_current
82f8fd2 ui: remove extra #ifdef CONFIG_OPENGL
3eeb59f vhost-user-gpu: handle display-info in a callback
ca98f97 vhost-user-gpu: use an extandable state enum for commands
f3f5b71 vhost-user-gpu: handle vhost-user-gpu features in a callback
679108c vhost-user-gpu: check backend for EDID support

=== OUTPUT BEGIN ===
1/20 Checking commit 679108c6db9d (vhost-user-gpu: check backend for EDID support)
2/20 Checking commit f3f5b712d643 (vhost-user-gpu: handle vhost-user-gpu features in a callback)
3/20 Checking commit ca98f9798940 (vhost-user-gpu: use an extandable state enum for commands)
4/20 Checking commit 3eeb59f5eda8 (vhost-user-gpu: handle display-info in a callback)
WARNING: line over 80 characters
#34: FILE: contrib/vhost-user-gpu/vhost-user-gpu.c:274:
+    if (!vg_recv_msg(vg, VHOST_USER_GPU_GET_DISPLAY_INFO, sizeof(dpy_info), &dpy_info)) {

total: 0 errors, 1 warnings, 47 lines checked

Patch 4/20 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/20 Checking commit 82f8fd22e61a (ui: remove extra #ifdef CONFIG_OPENGL)
6/20 Checking commit ea06ae968a65 (ui: remove gl_ctx_get_current)
7/20 Checking commit 0843e91e2077 (ui: add gd_gl_area_scanout_disable)
8/20 Checking commit 6f6288374e98 (ui: annotate DCLOps callback requirements)
9/20 Checking commit 851661e80efb (ui: remove console_has_gl_dmabuf())
10/20 Checking commit 24a96b4c5616 (vhost-user-gpu: add a configuration flag for dmabuf usage)
11/20 Checking commit 43e7283e2d2e (ui: add an optional get_flags callback to GraphicHwOps)
ERROR: braces {} are necessary for all arms of this statement
#33: FILE: hw/display/virtio-gpu-base.c:123:
+    if (virtio_gpu_virgl_enabled(g->conf))
[...]

ERROR: braces {} are necessary for all arms of this statement
#36: FILE: hw/display/virtio-gpu-base.c:126:
+    if (virtio_gpu_dmabuf_enabled(g->conf))
[...]

total: 2 errors, 0 warnings, 68 lines checked

Patch 11/20 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

12/20 Checking commit 483c6affb8c5 (ui: add a DCLOps callback to check dmabuf support)
13/20 Checking commit 6339b5bcfe3b (ui: check hw requirements during DCL registration)
ERROR: line over 90 characters
#21: FILE: ui/console.c:1479:
+static bool dpy_compatible_with(QemuConsole *con, DisplayChangeListener *dcl, Error **errp)

WARNING: line over 80 characters
#34: FILE: ui/console.c:1492:
+    if (flags & GRAPHIC_FLAGS_DMABUF && !displaychangelistener_has_dmabuf(dcl)) {

total: 1 errors, 1 warnings, 45 lines checked

Patch 13/20 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/20 Checking commit 165cebfa7beb (ui: add qemu_egl_has_dmabuf helper)
WARNING: line over 80 characters
#36: FILE: ui/egl-helpers.c:447:
+        !epoxy_has_egl_extension(qemu_egl_display, "EGL_EXT_image_dma_buf_import")) {

total: 0 errors, 1 warnings, 21 lines checked

Patch 14/20 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/20 Checking commit 9fe1210ac000 (ui: check gtk-egl dmabuf support)
16/20 Checking commit 6495eb768a5f (ui: add egl dmabuf import to gtkglarea)
17/20 Checking commit 8e9a9d99a7cc (virtio-gpu: avoid re-entering cmdq processing)
18/20 Checking commit b1fb7283b8da (display/ui: add a callback to indicate GL state is flushed)
19/20 Checking commit e3c958379468 (chardev: check if the chardev is registered for yanking)
20/20 Checking commit 22d663059dd3 (RFC: tests: add some virtio-gpu & vhost-user-gpu acceptance test)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#21: 
new file mode 100644

WARNING: line over 80 characters
#78: FILE: tests/acceptance/virtio-gpu.py:53:
+            self, success_message, failure_message="Kernel panic - not syncing", vm=vm

WARNING: line over 80 characters
#112: FILE: tests/acceptance/virtio-gpu.py:87:
+        exec_command_and_wait_for_pattern(self, "/usr/sbin/modprobe virtio_gpu", "")

WARNING: line over 80 characters
#135: FILE: tests/acceptance/virtio-gpu.py:110:
+        qemu_sock, vug_sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)

WARNING: line over 80 characters
#139: FILE: tests/acceptance/virtio-gpu.py:114:
+        self._vug_log_path = os.path.join(self.vm._test_dir, "vhost-user-gpu.log")

WARNING: line over 80 characters
#170: FILE: tests/acceptance/virtio-gpu.py:145:
+        exec_command_and_wait_for_pattern(self, "/usr/sbin/modprobe virtio_gpu", "")

total: 0 errors, 6 warnings, 150 lines checked

Patch 20/20 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210202142625.609070-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com