qemu/hw/display
Peter Maydell 0fa57cbfa7 hw/display/virtio-gpu: Improve "opengl is not available" error message
If the user tries to use the virtio-gpu-gl device but the display
backend doesn't have OpenGL support enabled, we currently print a
rather uninformative error message:

$ qemu-system-aarch64 -M virt -device virtio-gpu-gl
qemu-system-aarch64: -device virtio-gpu-gl: opengl is not available

Since OpenGL is not enabled on display frontends by default, users
are quite likely to run into this. Improve the error message to
be more specific and to suggest to the user a path forward.

Note that the case of "user tried to enable OpenGL but the display
backend doesn't handle it" is caught elsewhere first, so we can
assume that isn't the problem:

$ qemu-system-aarch64 -M virt -device virtio-gpu-gl -display curses,gl=on
qemu-system-aarch64: OpenGL is not supported by the display

(Use of error_append_hint() requires us to add an ERRP_GUARD() to
the function, as noted in include/qapi/error.h.)

With this commit we now produce the hopefully more helpful error:
$ ./build/x86/qemu-system-aarch64 -M virt -device virtio-gpu-gl
qemu-system-aarch64: -device virtio-gpu-gl: The display backend does not have OpenGL support enabled
It can be enabled with '-display BACKEND,gl=on' where BACKEND is the name of the display backend to use.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2443
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20240731154136.3494621-2-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-08-06 16:22:12 +02:00
..
acpi-vga-stub.c
acpi-vga.c
artist.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
ati_2d.c
ati_dbg.c
ati_int.h
ati_regs.h
ati.c ui/console: Convert mouse visibility parameter into bool 2024-07-16 20:04:08 +02:00
bcm2835_fb.c hw/display/bcm2835_fb: fix fb_use_offsets condition 2024-07-18 13:49:29 +01:00
blizzard.c
bochs-display.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
cg3.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
cirrus_vga_internal.h
cirrus_vga_isa.c
cirrus_vga_rop2.h
cirrus_vga_rop.h
cirrus_vga.c vga: implement horizontal pel panning in graphics modes 2024-01-18 10:43:13 +01:00
dm163.c hw/display : Add device DM163 2024-04-30 16:02:43 +01:00
dpcd.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
edid-generate.c
edid-region.c
exynos4210_fimd.c hw/display/exynos4210_fimd: Pass frame buffer memory region as link 2024-02-26 18:40:09 +01:00
framebuffer.c
framebuffer.h
g364fb.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
i2c-ddc.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
jazz_led.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
Kconfig hw/display : Add device DM163 2024-04-30 16:02:43 +01:00
macfb.c hw/display/macfb: Fix missing ERRP_GUARD() in macfb_nubus_realize() 2024-03-12 11:45:33 +01:00
meson.build build: do not build virtio-vga-gl if virgl/opengl not available 2024-05-03 15:47:48 +02:00
next-fb.c
omap_dss.c
omap_lcdc.c
pl110_template.h
pl110.c hw/display/pl110: Pass frame buffer memory region as link property 2024-02-26 18:39:58 +01:00
pxa2xx_lcd.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
qxl-logger.c
qxl-render.c ui/console: Remove dpy_cursor_define_supported() 2024-07-16 20:04:08 +02:00
qxl.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
qxl.h Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
ramfb-standalone.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
ramfb-stubs.c ramfb: move stubs out of stubs/ 2024-04-18 11:17:27 +02:00
ramfb.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
sii9022.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
sm501.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
ssd0303.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
ssd0323.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
tc6393xb.c
tcx.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
trace-events hw/display : Add device DM163 2024-04-30 16:02:43 +01:00
trace.h
vga_int.h display: remove GraphicHwOps from typedefs.h 2024-05-03 15:47:48 +02:00
vga_regs.h vga: sort-of implement word and double-word access modes 2024-01-18 10:43:14 +01:00
vga-access.h
vga-helpers.h vga: optimize horizontal pel panning in 256-color modes 2024-01-18 10:43:14 +01:00
vga-isa.c
vga-mmio.c
vga-pci.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00
vga.c ui+display: rename is_buffer_shared() -> surface_is_allocated() 2024-06-19 12:42:03 +02:00
vhost-user-gpu-pci.c
vhost-user-gpu.c vhost-user-gpu: fix import of DMABUF 2024-07-01 17:16:04 -04:00
vhost-user-vga.c
virtio-dmabuf.c
virtio-gpu-base.c Fix bugs when VM shutdown with virtio-gpu unplugged 2023-12-26 04:51:07 -05:00
virtio-gpu-gl.c hw/display/virtio-gpu: Improve "opengl is not available" error message 2024-08-06 16:22:12 +02:00
virtio-gpu-pci-gl.c
virtio-gpu-pci-rutabaga.c
virtio-gpu-pci.c
virtio-gpu-rutabaga.c virtio-gpu-rutabaga.c: override resource_destroy method 2024-02-14 06:17:44 -05:00
virtio-gpu-udmabuf-stubs.c
virtio-gpu-udmabuf.c ui/console: Use qemu_dmabuf_new() and free() helpers instead 2024-05-14 17:14:12 +04:00
virtio-gpu-virgl.c virtio-gpu: Correct virgl_renderer_resource_get_info() error check 2024-02-14 06:09:33 -05:00
virtio-gpu.c ui/console: Convert mouse visibility parameter into bool 2024-07-16 20:04:08 +02:00
virtio-vga-gl.c
virtio-vga-rutabaga.c
virtio-vga.c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
virtio-vga.h
vmware_vga.c ui/console: Remove dpy_cursor_define_supported() 2024-07-16 20:04:08 +02:00
xenfb.c ui+display: rename is_buffer_shared() -> surface_is_allocated() 2024-06-19 12:42:03 +02:00
xlnx_dp.c hw/display: Constify VMState 2023-12-29 11:17:30 +11:00