Re: [PATCH] Fix gl draw command called without scanout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/13/2016 10:58 AM, Frediano Ziglio wrote:
This happens during VM shutdown.

I'd also mention qemu-kvm should be fixed, and
add the line of assert fails so it shows up in
searches.

For all three patches:
Acked-by: Uri Lublin <uril@xxxxxxxxxx>


Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/red-qxl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/server/red-qxl.c b/server/red-qxl.c
index b84ae69..2a4fa52 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -905,7 +905,11 @@ void spice_qxl_gl_draw_async(QXLInstance *qxl,

     spice_return_if_fail(qxl != NULL);
     qxl_state = qxl->st;
-    spice_return_if_fail(qxl_state->scanout.drm_dma_buf_fd != -1);
+    if (qxl_state->scanout.drm_dma_buf_fd == -1) {
+        spice_warning("called spice_qxl_gl_draw_async without a buffer");
+        red_qxl_async_complete(qxl, async_command_alloc(qxl_state, message, cookie));
+        return;
+    }
     spice_return_if_fail(qxl_state->gl_draw_async == NULL);

     qxl_state->gl_draw_async = async_command_alloc(qxl_state, message, cookie);


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]