]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: implement blob resources: fix stride discrepancy
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 24 Sep 2020 00:32:11 +0000 (17:32 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 29 Sep 2020 09:23:47 +0000 (11:23 +0200)
commit01a143aea99808b7c5abdd51c7aa9951647eecd3
treefee94a6e49bea5615c95380fa4207a1e98907d0f
parent4f2c673bbb28c3a08e8a1dd3bcdf391a4f0169ef
drm/virtio: implement blob resources: fix stride discrepancy

The old transfer ioctls may work on blob resources, and there is no
TRANSFER_BLOB hypercall now for simplicity.

The guest may have a image view on the blob resources such that the
stride is not equal to width * bytes_per_pixel.

For host-only blobs, we can repurpose the transfer ioctls to synchronize
caches as well.  For guest-only blobs, these operations are undefined
for now so leave them out.

Also, with seamless Wayland integration between guest/host looking
increasingly attractive, it also makes sense to keep track of
one value for stride.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-16-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_ioctl.c
drivers/gpu/drm/virtio/virtgpu_vq.c