Hi Dongwon Kim
On Thu, Dec 14, 2023 at 8:26 AM Dongwon Kim <[email protected]> wrote:
>
> The guest surface needs to be updated with a blob scanout after resumed
> from saved vm state if blob is enabled.
>
> Cc: Marc-André Lureau <[email protected]>
> Cc: Vivek Kasireddy <[email protected]>
> Signed-off-by: Dongwon Kim <[email protected]>
Can you resend the last version of the series?
thanks
> ---
> hw/display/virtio-gpu.c | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index b016d3bac8..34dc0ab9fc 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1417,19 +1417,27 @@ static int virtio_gpu_post_load(void *opaque, int
> version_id)
> if (!res) {
> return -EINVAL;
> }
> - scanout->ds = qemu_create_displaysurface_pixman(res->image);
> - if (!scanout->ds) {
> - return -EINVAL;
> - }
> +
> + if (res->blob_size) {
> + assert(g->dmabuf.primary[i] != NULL);
> + g->dmabuf.primary[i]->buf.fd = res->dmabuf_fd;
> + dpy_gl_scanout_dmabuf(scanout->con, &g->dmabuf.primary[i]->buf);
> + } else {
> + scanout->ds = qemu_create_displaysurface_pixman(res->image);
> + if (!scanout->ds) {
> + return -EINVAL;
> + }
> #ifdef WIN32
> - qemu_displaysurface_win32_set_handle(scanout->ds, res->handle, 0);
> + qemu_displaysurface_win32_set_handle(scanout->ds, res->handle,
> 0);
> #endif
> + dpy_gfx_replace_surface(scanout->con, scanout->ds);
> + dpy_gfx_update_full(scanout->con);
> + }
>
> - dpy_gfx_replace_surface(scanout->con, scanout->ds);
> - dpy_gfx_update_full(scanout->con);
> if (scanout->cursor.resource_id) {
> update_cursor(g, &scanout->cursor);
> }
> +
> res->scanout_bitmask |= (1 << i);
> }
>
> --
> 2.34.1
>
>
--
Marc-André Lureau