Hi,

>  struct virtio_gpu_object {
>       struct drm_gem_shmem_object base;
>       uint32_t hw_res_handle;
> -
> -     struct sg_table *pages;
>       uint32_t mapped;
> -
>       bool dumb;
>       bool created;
>  };
>  #define gem_to_virtio_gpu_obj(gobj) \
>       container_of((gobj), struct virtio_gpu_object, base.base)
>  
> +struct virtio_gpu_object_shmem {
> +     struct virtio_gpu_object base;
> +     struct sg_table *pages;
> +};

mapped can be moved too.

> @@ -600,10 +600,11 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct 
> virtio_gpu_device *vgdev,

> +     struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);

Should we pass struct virtio_gpu_object_shmem to
virtio_gpu_cmd_transfer_to_host_2d (+friends) instead?

hostmem will not need transfers ...

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to