[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf
From: |
marcandre . lureau |
Subject: |
[PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf |
Date: |
Tue, 27 Jun 2023 15:02:08 +0200 |
From: Dongwon Kim <dongwon.kim@intel.com>
Respond with VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY if it fails to create
an udmabuf for the blob resource.
v2: consolidated return statments and removed an unnecessary style change
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230627003453.5321-1-dongwon.kim@intel.com>
---
hw/display/virtio-gpu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 506cda944d..1f8a5b16c6 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -651,8 +651,10 @@ static void virtio_gpu_do_set_scanout(VirtIOGPU *g,
if (console_has_gl(scanout->con)) {
if (!virtio_gpu_update_dmabuf(g, scanout_id, res, fb, r)) {
virtio_gpu_update_scanout(g, scanout_id, res, r);
- return;
+ } else {
+ *error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
}
+ return;
}
data = res->blob;
--
2.41.0
- [PULL 12/33] ui/gtk: making dmabuf NULL when it's released., (continued)
- [PULL 12/33] ui/gtk: making dmabuf NULL when it's released., marcandre . lureau, 2023/06/27
- [PULL 09/33] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1, marcandre . lureau, 2023/06/27
- [PULL 18/33] qtest: add qtest_pid(), marcandre . lureau, 2023/06/27
- [PULL 16/33] scripts: add a XML preprocessor script, marcandre . lureau, 2023/06/27
- [PULL 14/33] ui/egl: fix make_context_current() callback return value, marcandre . lureau, 2023/06/27
- [PULL 13/33] ui/egl: export qemu_egl_get_error_string(), marcandre . lureau, 2023/06/27
- [PULL 19/33] tests: make dbus-display-test work on win32, marcandre . lureau, 2023/06/27
- [PULL 23/33] ui/dbus: use shared memory when possible on win32, marcandre . lureau, 2023/06/27
- [PULL 24/33] ui: add egl-headless support on win32, marcandre . lureau, 2023/06/27
- [PULL 22/33] virtio-gpu/win32: allocate shareable 2d resources/images, marcandre . lureau, 2023/06/27
- [PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf,
marcandre . lureau <=
- [PULL 10/33] ui/gtk: set the area of the scanout texture correctly, marcandre . lureau, 2023/06/27
- [PULL 17/33] ui/dbus: win32 support, marcandre . lureau, 2023/06/27
- [PULL 20/33] ui/dbus: introduce "Interfaces" properties, marcandre . lureau, 2023/06/27
- [PULL 26/33] ui: add egl_fb_read_rect(), marcandre . lureau, 2023/06/27
- [PULL 28/33] ui/dbus: add some GL traces, marcandre . lureau, 2023/06/27
- [PULL 21/33] console/win32: allocate shareable display surface, marcandre . lureau, 2023/06/27