drm/virtio: Improve DMA API usage for shmem BOs
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Thu, 30 Jun 2022 20:07:24 +0000 (23:07 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Jul 2022 12:40:58 +0000 (14:40 +0200)
commitb5c9ed70d1a94c59dad7b1ecfc928863c0fe6ac0
tree3580ad1ab99f933b8ff0ea7c9f3227d5f20aff1c
parente7fef092330321ff311e8c06338ce1b4b608ba05
drm/virtio: Improve DMA API usage for shmem BOs

DRM API requires the DRM's driver to be backed with the device that can
be used for generic DMA operations. The VirtIO-GPU device can't perform
DMA operations if it uses PCI transport because PCI device driver creates
a virtual VirtIO-GPU device that isn't associated with the PCI. Use PCI's
GPU device for the DRM's device instead of the VirtIO-GPU device and drop
DMA-related hacks from the VirtIO-GPU driver.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220630200726.1884320-8-dmitry.osipenko@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.c
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_kms.c
drivers/gpu/drm/virtio/virtgpu_object.c
drivers/gpu/drm/virtio/virtgpu_vq.c