On Tue, Mar 3, 2020 at 1:56 AM Gerd Hoffmann <[email protected]> wrote:
> 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?
>
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...
>
> hostmem will not need transfers ...
>
> cheers,
> Gerd
>
>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel