drm/virtio: remove prime pin/unpin callbacks.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 27 Feb 2019 14:44:40 +0000 (15:44 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 28 Feb 2019 08:09:01 +0000 (09:09 +0100)
virtio-gpu objects never move around, so effectively they are
pinned all the time.  Therefore we don't need the (optional)
pin/unpin callbacks.  Remove them.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190227144441.6755-3-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_drv.c
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_prime.c

index b996ac1d4fcc9cb3ca1ff86cad8be0c364c80c30..40e7ce000505e474d31e85d76a58ca7738ae40aa 100644 (file)
@@ -207,8 +207,6 @@ static struct drm_driver driver = {
 #endif
        .gem_prime_export = drm_gem_prime_export,
        .gem_prime_import = drm_gem_prime_import,
-       .gem_prime_pin = virtgpu_gem_prime_pin,
-       .gem_prime_unpin = virtgpu_gem_prime_unpin,
        .gem_prime_vmap = virtgpu_gem_prime_vmap,
        .gem_prime_vunmap = virtgpu_gem_prime_vunmap,
        .gem_prime_mmap = virtgpu_gem_prime_mmap,
index 3238fdf58eb480ed9447d0639aaded9a88d28dcc..80eab6e3169c1df3893875955cc4e5afb6874e7c 100644 (file)
@@ -352,8 +352,6 @@ void virtio_gpu_object_free_sg_table(struct virtio_gpu_object *bo);
 int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
 
 /* virtgpu_prime.c */
-int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
-void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
 void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
 void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
 int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
index b4c9199349e720d65d1c2ddea5170de5ffad9abd..4352f95064402cd0b98f37eb54c62c84b67ff281 100644 (file)
  * device that might share buffers with virtgpu
  */
 
-int virtgpu_gem_prime_pin(struct drm_gem_object *obj)
-{
-       WARN_ONCE(1, "not implemented");
-       return -ENODEV;
-}
-
-void virtgpu_gem_prime_unpin(struct drm_gem_object *obj)
-{
-       WARN_ONCE(1, "not implemented");
-}
-
 void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj)
 {
        struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);