qemu-e2k/hw/display
Marc-André Lureau a41e2d97f9 virtio-gpu: reset gfx resources in main thread
Calling OpenGL from different threads can have bad consequences if not
carefully reviewed. It's not generally supported. In my case, I was
debugging a crash in glDeleteTextures from OPENGL32.DLL, where I asked
qemu for gl=es, and thus ANGLE implementation was expected. libepoxy did
resolution of the global pointer for glGenTexture to the GLES version
from the main thread. But it resolved glDeleteTextures to the GL
version, because it was done from a different thread without correct
context. Oops.

Let's stick to the main thread for GL calls by using a BH.

Note: I didn't use atomics for reset_finished check, assuming the BQL
will provide enough of sync, but I might be wrong.

Acked-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230726173929.690601-3-marcandre.lureau@redhat.com>
2023-08-07 15:45:45 +04:00
..
acpi-vga-stub.c acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors 2022-11-07 14:00:29 -05:00
acpi-vga.c acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors 2022-11-07 14:00:29 -05:00
artist.c artist: set memory region owners for buffers to the artist device 2022-06-26 18:40:28 +01:00
ati_2d.c display: include dependencies explicitly 2022-11-10 10:17:18 -05:00
ati_dbg.c
ati_int.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
ati_regs.h
ati.c
bcm2835_fb.c hw/display/bcm2835_fb: Fix framebuffer allocation address 2022-07-26 14:09:44 +01:00
blizzard.c hw/display: fix tab indentation 2022-11-08 10:23:32 +01:00
bochs-display.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
cg3.c
cirrus_vga_internal.h
cirrus_vga_isa.c display: include dependencies explicitly 2022-11-10 10:17:18 -05:00
cirrus_vga_rop2.h
cirrus_vga_rop.h
cirrus_vga.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
dpcd.c
edid-generate.c
edid-region.c
exynos4210_fimd.c
framebuffer.c
framebuffer.h
g364fb.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
i2c-ddc.c
jazz_led.c
Kconfig hw: Include the VMWare devices only in the x86 targets 2022-12-15 15:19:24 +01:00
macfb.c
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
next-fb.c hw/display/next-fb: Fix comment typo 2022-12-03 22:07:07 +01:00
omap_dss.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
omap_lcdc.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
pl110_template.h
pl110.c
pxa2xx_lcd.c hw/display: fix tab indentation 2022-11-08 10:23:32 +01:00
qxl-logger.c hw/display/qxl: Pass requested buffer size to qxl_phys2virt() 2022-11-29 18:15:26 -05:00
qxl-render.c ui: rename cursor_{put->unref} 2023-03-13 22:57:39 +04:00
qxl.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
qxl.h ui/spice: Require spice-server >= 0.14.0 2023-01-19 13:30:01 +01:00
ramfb-standalone.c
ramfb.c
sii9022.c hw/i2c: add asynchronous send 2022-06-30 09:21:14 +02:00
sm501.c hw/display/sm501: Remove unneeded increment from loop 2023-05-05 12:34:22 -03:00
ssd0303.c hw/i2c: add asynchronous send 2022-06-30 09:21:14 +02:00
ssd0323.c
tc6393xb.c
tcx.c
trace-events ui/spice: QXLInterface method set_mm_time() is now dead, drop 2023-01-19 13:30:01 +01:00
trace.h
vga_int.h display: include dependencies explicitly 2022-11-10 10:17:18 -05:00
vga_regs.h hw/display: fix tab indentation 2022-11-08 10:23:32 +01:00
vga-access.h
vga-helpers.h
vga-isa.c display: include dependencies explicitly 2022-11-10 10:17:18 -05:00
vga-mmio.c display: include dependencies explicitly 2022-11-10 10:17:18 -05:00
vga-pci.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
vga.c hw/display: Compile vga.c as target-independent code 2023-04-20 11:25:32 +02:00
vhost-user-gpu-pci.c
vhost-user-gpu.c hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments 2023-07-10 18:59:32 -04:00
vhost-user-vga.c
virtio-gpu-base.c virtio-gpu: free BHs, by implementing unrealize 2023-08-07 15:45:25 +04:00
virtio-gpu-gl.c
virtio-gpu-pci-gl.c
virtio-gpu-pci.c
virtio-gpu-udmabuf-stubs.c
virtio-gpu-udmabuf.c virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties 2023-07-17 15:22:28 +04:00
virtio-gpu-virgl.c virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available 2023-06-27 17:08:56 +02:00
virtio-gpu.c virtio-gpu: reset gfx resources in main thread 2023-08-07 15:45:45 +04:00
virtio-vga-gl.c
virtio-vga.c hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset 2022-12-16 15:59:07 +00:00
virtio-vga.h hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset 2022-12-16 15:59:07 +00:00
vmware_vga.c ui: rename cursor_{put->unref} 2023-03-13 22:57:39 +04:00
xenfb.c hw/xen: Use XEN_PAGE_SIZE in PV backend drivers 2023-03-07 17:04:30 +00:00
xlnx_dp.c xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command 2022-08-08 11:40:06 +02:00