Dongwon Kim 64f1359bd0 ui/gtk: prevent ui lock up when dpy_gl_update called again before current draw event occurs
A warning, "qemu: warning: console: no gl-unblock within" followed by
guest scanout lockup can happen if dpy_gl_update is called in a row
and the second call is made before gd_draw_event scheduled by the first
call is taking place. This is because draw call returns without decrementing
gl_block ref count if the dmabuf was already submitted as shown below.

(gd_gl_area_draw/gd_egl_draw)

        if (dmabuf) {
            if (!dmabuf->draw_submitted) {
                return;
            } else {
                dmabuf->draw_submitted = false;
            }
        }

So it should not schedule any redundant draw event in case draw_submitted is
already set in gd_egl_fluch/gd_gl_area_scanout_flush.

Cc: Gerd Hoffmann <kraxel@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: <20221021192315.9110-1-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-11-23 12:27:55 +01:00
..
2021-12-21 10:50:22 +04:00
2021-12-21 10:50:22 +04:00
2022-09-29 18:23:51 +02:00
2022-05-03 15:52:37 +04:00
2022-06-28 11:06:02 +02:00
2022-03-14 15:16:16 +04:00
2022-11-08 10:23:06 +01:00
2022-11-08 10:23:06 +01:00
2022-11-08 10:23:06 +01:00
2022-04-27 07:50:28 +02:00