<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 3, 2020 at 1:56 AM Gerd Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Hi,<br>
<br>
> struct virtio_gpu_object {<br>
> struct drm_gem_shmem_object base;<br>
> uint32_t hw_res_handle;<br>
> -<br>
> - struct sg_table *pages;<br>
> uint32_t mapped;<br>
> -<br>
> bool dumb;<br>
> bool created;<br>
> };<br>
> #define gem_to_virtio_gpu_obj(gobj) \<br>
> container_of((gobj), struct virtio_gpu_object, base.base)<br>
> <br>
> +struct virtio_gpu_object_shmem {<br>
> + struct virtio_gpu_object base;<br>
> + struct sg_table *pages;<br>
> +};<br>
<br>
mapped can be moved too.<br>
<br>
> @@ -600,10 +600,11 @@ void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev,<br>
<br>
> + struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);<br>
<br>
Should we pass struct virtio_gpu_object_shmem to<br>
virtio_gpu_cmd_transfer_to_host_2d (+friends) instead?<br></blockquote><div><br></div><div>It ends up being a little more complicated, due to casting to virtio_gpu_object and then virtio_gpu_object_shmem in virtio_gpu_transfer_to_host_ioctl, so I omitted it v2...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
hostmem will not need transfers ...<br>
<br>
cheers,<br>
Gerd<br>
<br>
</blockquote></div></div>