All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 07/12] virtio-gpu: Add virtio_gpu_resource_create_blob
Date: Wed, 28 Apr 2021 11:16:43 +0200	[thread overview]
Message-ID: <20210428091643.rkqmgwptjbhyvpim@sirius.home.kraxel.org> (raw)
In-Reply-To: <20210420065347.2685768-8-vivek.kasireddy@intel.com>

  Hi,

> diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c
> index 2c0e7b2455..8bbce08550 100644
> --- a/hw/display/virtio-gpu-udmabuf.c
> +++ b/hw/display/virtio-gpu-udmabuf.c
> @@ -72,7 +72,10 @@ static void virtio_gpu_create_udmabuf(struct virtio_gpu_simple_resource *res)
>  
>  static void virtio_gpu_remap_udmabuf(struct virtio_gpu_simple_resource *res)
>  {
> -    res->remapsz = res->width * res->height * 4;
> +    if (res->blob_size) {
> +        res->remapsz = res->blob_size;
> +    }
> +
>      res->remapsz = QEMU_ALIGN_UP(res->remapsz, qemu_real_host_page_size);
>  
>      res->remapped = mmap(NULL, res->remapsz, PROT_READ,
> @@ -152,7 +155,9 @@ void virtio_gpu_init_udmabuf(struct virtio_gpu_simple_resource *res)
>          pdata = res->remapped;
>      }
>  
> -    (void) pdata;
> +    if (pdata) {
> +        res->blob = pdata;
> +    }
>  }

That is confusing.  Patch #2 introduces code which is removed here
(probably leftovers from udmabuf prototype which didn't use blob
resources).  I think it would be useful to merge patch #2 with this one.

Also we might cleanup things a bit.  Do we need separate remapsz +
blob_size fields in the first place?  Probably not ...

take care,
  Gerd

PS: Can you explicitly cc me on the next version of the patch series?
    Some patches (this one for example) are on the list only and not in
    my inbox.  Thanks.



  reply	other threads:[~2021-04-28  9:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  6:53 [PATCH v2 00/12] virtio-gpu: Add support for Blob resources feature Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 01/12] ui: Get the fd associated with udmabuf driver Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 02/12] virtio-gpu: Add udmabuf helpers Vivek Kasireddy
2021-04-21 10:57   ` Gerd Hoffmann
2021-04-20  6:53 ` [PATCH v2 03/12] virtio-gpu: Add virtio_gpu_find_check_resource Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 04/12] virtio-gpu: Refactor virtio_gpu_set_scanout Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 05/12] virtio-gpu: Refactor virtio_gpu_create_mapping_iov Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 06/12] virtio-gpu: Add initial definitions for blob resources Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 07/12] virtio-gpu: Add virtio_gpu_resource_create_blob Vivek Kasireddy
2021-04-28  9:16   ` Gerd Hoffmann [this message]
2021-04-30  6:59     ` Kasireddy, Vivek
2021-04-30 11:38       ` Gerd Hoffmann
2021-04-20  6:53 ` [PATCH v2 08/12] ui/pixman: Add qemu_pixman_to_drm_format() Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 09/12] virtio-gpu: Add helpers to create and destroy dmabuf objects Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 10/12] virtio-gpu: Factor out update scanout Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 11/12] virtio-gpu: Add virtio_gpu_set_scanout_blob Vivek Kasireddy
2021-04-20  6:53 ` [PATCH v2 12/12] virtio-gpu: Update cursor data using blob Vivek Kasireddy

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=20210428091643.rkqmgwptjbhyvpim@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vivek.kasireddy@intel.com \
    /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.