All of lore.kernel.org
 help / color / mirror / Atom feed
From: wanghaibin <wanghaibin.wang@huawei.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-gpu: skip update cursor in post_load if we don't have one
Date: Thu, 13 Jul 2017 10:18:14 +0800	[thread overview]
Message-ID: <5966D866.3010700@huawei.com> (raw)
In-Reply-To: <20170710070432.856-1-kraxel@redhat.com>

On 2017/7/10 15:04, Gerd Hoffmann wrote:

> If the cursor resource id isn't set the guest didn't define a cursor.
> Skip the cursor update in post_load in that that case.
> 
> Reported-by: wanghaibin <wanghaibin.wang@huawei.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


It's work!!

Tested-by: wanghaibin <wanghaibin.wang@huawei.com>

Thanks.

> ---
>  hw/display/virtio-gpu.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index 58dc0b2737..eef11083d7 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1092,7 +1092,9 @@ static int virtio_gpu_load(QEMUFile *f, void *opaque, size_t size,
>  
>          dpy_gfx_replace_surface(scanout->con, scanout->ds);
>          dpy_gfx_update(scanout->con, 0, 0, scanout->width, scanout->height);
> -        update_cursor(g, &scanout->cursor);
> +        if (scanout->cursor.resource_id) {
> +            update_cursor(g, &scanout->cursor);
> +        }
>          res->scanout_bitmask |= (1 << i);
>      }
>  

      parent reply	other threads:[~2017-07-13  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10  7:04 [Qemu-devel] [PATCH] virtio-gpu: skip update cursor in post_load if we don't have one Gerd Hoffmann
2017-07-10  9:05 ` Marc-André Lureau
2017-07-10 11:50   ` Gerd Hoffmann
2017-07-13  2:18 ` wanghaibin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5966D866.3010700@huawei.com \
    --to=wanghaibin.wang@huawei.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.