From: Akihiko Odaki <[email protected]>

It is necessary for blob cursor and scanout.

Fixes: e0933d91b1cd ("virtio-gpu: Add virtio_gpu_resource_create_blob")
Signed-off-by: Akihiko Odaki <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
Message-ID: <[email protected]>
(cherry picked from commit 4ae1c5c7d6f33d1e9c030ec4d24ab272609188cc)
Signed-off-by: Michael Tokarev <[email protected]>

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 598ee4026c1..c34a09e82b1 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -988,6 +988,10 @@ virtio_gpu_resource_attach_backing(VirtIOGPU *g,
         cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
         return;
     }
+
+    if (!res->image) {
+        virtio_gpu_init_udmabuf(res);
+    }
 }
 
 static void
-- 
2.47.3


Reply via email to