OSDN Git Service

drm/virtio: switch from ttm to gem shmem helpers
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 29 Aug 2019 10:32:57 +0000 (12:32 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Sep 2019 04:54:11 +0000 (06:54 +0200)
commitc66df701e783bc666593e6e665f13670760883ee
treee0eab60d065967e8219dee256f59897fbaf9851f
parentad75f4f057e61869d4b4d9b091bbbea224332d47
drm/virtio: switch from ttm to gem shmem helpers

virtio-gpu basically needs a sg_table for the bo, to tell the host where
the backing pages for the object are.  So the gem shmem helpers are a
perfect fit.  Some drm_gem_object_funcs need thin wrappers to update the
host state, but otherwise the helpers handle everything just fine.

Once the fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.

v4: fix drm_gem_object_funcs name.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kraxel@redhat.com
drivers/gpu/drm/virtio/Kconfig
drivers/gpu/drm/virtio/Makefile
drivers/gpu/drm/virtio/virtgpu_drv.c
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_gem.c
drivers/gpu/drm/virtio/virtgpu_ioctl.c
drivers/gpu/drm/virtio/virtgpu_kms.c
drivers/gpu/drm/virtio/virtgpu_object.c
drivers/gpu/drm/virtio/virtgpu_prime.c
drivers/gpu/drm/virtio/virtgpu_ttm.c [deleted file]
drivers/gpu/drm/virtio/virtgpu_vq.c