|
@@ -597,10 +597,12 @@ void gd_hw_gl_flushed(void *vcon)
|
|
VirtualConsole *vc = vcon;
|
|
VirtualConsole *vc = vcon;
|
|
QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
|
|
QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
|
|
|
|
|
|
- qemu_set_fd_handler(dmabuf->fence_fd, NULL, NULL, NULL);
|
|
|
|
- close(dmabuf->fence_fd);
|
|
|
|
- dmabuf->fence_fd = -1;
|
|
|
|
- graphic_hw_gl_block(vc->gfx.dcl.con, false);
|
|
|
|
|
|
+ if (dmabuf->fence_fd >= 0) {
|
|
|
|
+ qemu_set_fd_handler(dmabuf->fence_fd, NULL, NULL, NULL);
|
|
|
|
+ close(dmabuf->fence_fd);
|
|
|
|
+ dmabuf->fence_fd = -1;
|
|
|
|
+ graphic_hw_gl_block(vc->gfx.dcl.con, false);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/** DisplayState Callbacks (opengl version) **/
|
|
/** DisplayState Callbacks (opengl version) **/
|