drm/prime: Align gem_prime_export with obj_funcs.export
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 14 Jun 2019 20:35:25 +0000 (22:35 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 21 Jun 2019 15:30:49 +0000 (17:30 +0200)
The idea is that gem_prime_export is deprecated in favor of
obj_funcs.export. That's much easier to do if both have matching
function signatures.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Feifei Xu <Feifei.Xu@amd.com>
Cc: Jim Qu <Jim.Qu@amd.com>
Cc: Evan Quan <evan.quan@amd.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Thomas Zimmermann <tdz@users.sourceforge.net>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Jilayne Lovejoy <opensource@jilayne.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-10-daniel.vetter@ffwll.ch
22 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h
drivers/gpu/drm/armada/armada_gem.c
drivers/gpu/drm/armada/armada_gem.h
drivers/gpu/drm/drm_prime.c
drivers/gpu/drm/i915/gvt/dmabuf.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_dmabuf.c
drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
drivers/gpu/drm/omapdrm/omap_gem.h
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_prime.c
drivers/gpu/drm/tegra/gem.c
drivers/gpu/drm/tegra/gem.h
drivers/gpu/drm/udl/udl_dmabuf.c
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vgem/vgem_fence.c
include/drm/drm_drv.h
include/drm/drm_prime.h

index 489041df1f45636da40966578799e5cecf39bcb5..4809d4a5d72a7a349b70da8b5d125a9e702725e4 100644 (file)
@@ -345,8 +345,7 @@ const struct dma_buf_ops amdgpu_dmabuf_ops = {
  * Returns:
  * Shared DMA buffer representing the GEM BO from the given device.
  */
-struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,
-                                       struct drm_gem_object *gobj,
+struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
                                        int flags)
 {
        struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);
@@ -356,9 +355,9 @@ struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,
            bo->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID)
                return ERR_PTR(-EPERM);
 
-       buf = drm_gem_prime_export(dev, gobj, flags);
+       buf = drm_gem_prime_export(gobj, flags);
        if (!IS_ERR(buf)) {
-               buf->file->f_mapping = dev->anon_inode->i_mapping;
+               buf->file->f_mapping = gobj->dev->anon_inode->i_mapping;
                buf->ops = &amdgpu_dmabuf_ops;
        }
 
index c7056cbe8685a779b08deef4362e06af0ea71a02..7f73a4f94204d782cee44be54df0c418d32db43e 100644 (file)
@@ -30,8 +30,7 @@ struct drm_gem_object *
 amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
                                 struct dma_buf_attachment *attach,
                                 struct sg_table *sg);
-struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,
-                                       struct drm_gem_object *gobj,
+struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
                                        int flags);
 struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
                                            struct dma_buf *dma_buf);
index 642d0e70d0f8ffe4634046b5327039321e08a1a4..7e7fcc3f1f7f14213027cfb7e6c275a803a7eda1 100644 (file)
@@ -485,8 +485,7 @@ static const struct dma_buf_ops armada_gem_prime_dmabuf_ops = {
 };
 
 struct dma_buf *
-armada_gem_prime_export(struct drm_device *dev, struct drm_gem_object *obj,
-       int flags)
+armada_gem_prime_export(struct drm_gem_object *obj, int flags)
 {
        DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
 
@@ -495,7 +494,7 @@ armada_gem_prime_export(struct drm_device *dev, struct drm_gem_object *obj,
        exp_info.flags = O_RDWR;
        exp_info.priv = obj;
 
-       return drm_gem_dmabuf_export(dev, &exp_info);
+       return drm_gem_dmabuf_export(obj->dev, &exp_info);
 }
 
 struct drm_gem_object *
index 1ac90792b166c20cfe580051200802b6fd140a2a..c619381eeeff0870c04e6324e9e6fbe24422aa46 100644 (file)
@@ -35,8 +35,7 @@ struct armada_gem_object *armada_gem_alloc_private_object(struct drm_device *,
        size_t);
 int armada_gem_dumb_create(struct drm_file *, struct drm_device *,
        struct drm_mode_create_dumb *);
-struct dma_buf *armada_gem_prime_export(struct drm_device *dev,
-       struct drm_gem_object *obj, int flags);
+struct dma_buf *armada_gem_prime_export(struct drm_gem_object *obj, int flags);
 struct drm_gem_object *armada_gem_prime_import(struct drm_device *,
        struct dma_buf *);
 int armada_gem_map_import(struct armada_gem_object *);
index 1f100d5a323f3a0e14c7cab4525fc21b9850c14e..30377b53f5fa15379f0950a676d750a78b3601f5 100644 (file)
@@ -384,9 +384,9 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
        if (obj->funcs && obj->funcs->export)
                dmabuf = obj->funcs->export(obj, flags);
        else if (dev->driver->gem_prime_export)
-               dmabuf = dev->driver->gem_prime_export(dev, obj, flags);
+               dmabuf = dev->driver->gem_prime_export(obj, flags);
        else
-               dmabuf = drm_gem_prime_export(dev, obj, flags);
+               dmabuf = drm_gem_prime_export(obj, flags);
        if (IS_ERR(dmabuf)) {
                /* normally the created dma-buf takes ownership of the ref,
                 * but if that fails then drop the ref
@@ -814,7 +814,6 @@ EXPORT_SYMBOL(drm_prime_pages_to_sg);
 
 /**
  * drm_gem_prime_export - helper library implementation of the export callback
- * @dev: drm_device to export from
  * @obj: GEM object to export
  * @flags: flags like DRM_CLOEXEC and DRM_RDWR
  *
@@ -822,10 +821,10 @@ EXPORT_SYMBOL(drm_prime_pages_to_sg);
  * using the PRIME helpers. It is used as the default in
  * drm_gem_prime_handle_to_fd().
  */
-struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
-                                    struct drm_gem_object *obj,
+struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,
                                     int flags)
 {
+       struct drm_device *dev = obj->dev;
        struct dma_buf_export_info exp_info = {
                .exp_name = KBUILD_MODNAME, /* white lie for debug */
                .owner = dev->driver->fops->owner,
index 41c8ebc60c63b301680e8f1881fc452567111e33..13044c027f272ba02d5c4a370d204287bd317d73 100644 (file)
@@ -491,7 +491,7 @@ int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id)
 
        obj->gvt_info = dmabuf_obj->info;
 
-       dmabuf = i915_gem_prime_export(dev, &obj->base, DRM_CLOEXEC | DRM_RDWR);
+       dmabuf = i915_gem_prime_export(&obj->base, DRM_CLOEXEC | DRM_RDWR);
        if (IS_ERR(dmabuf)) {
                gvt_vgpu_err("export dma-buf failed\n");
                ret = PTR_ERR(dmabuf);
index a2664ea1395b54927e9b85b8982fa619440d6385..ab0412b09f1c1795a7948b7d30f8b4e5c6bcc9d4 100644 (file)
@@ -3085,8 +3085,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
 struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
                                struct dma_buf *dma_buf);
 
-struct dma_buf *i915_gem_prime_export(struct drm_device *dev,
-                               struct drm_gem_object *gem_obj, int flags);
+struct dma_buf *i915_gem_prime_export(struct drm_gem_object *gem_obj, int flags);
 
 static inline struct i915_hw_ppgtt *
 i915_vm_to_ppgtt(struct i915_address_space *vm)
index 5a101a9462d85e09040ca94537b1539066d30bc7..54ecab91b3a971422084484bab09db19ee17efce 100644 (file)
@@ -224,8 +224,7 @@ static const struct dma_buf_ops i915_dmabuf_ops =  {
        .end_cpu_access = i915_gem_end_cpu_access,
 };
 
-struct dma_buf *i915_gem_prime_export(struct drm_device *dev,
-                                     struct drm_gem_object *gem_obj, int flags)
+struct dma_buf *i915_gem_prime_export(struct drm_gem_object *gem_obj, int flags)
 {
        struct drm_i915_gem_object *obj = to_intel_bo(gem_obj);
        DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
@@ -242,7 +241,7 @@ struct dma_buf *i915_gem_prime_export(struct drm_device *dev,
                        return ERR_PTR(ret);
        }
 
-       return drm_gem_dmabuf_export(dev, &exp_info);
+       return drm_gem_dmabuf_export(gem_obj->dev, &exp_info);
 }
 
 static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj)
index 2b943ee246c9a11467427a442cfe244306ec71a2..84eb978fe39f8da581d4de87d43fde638590c5a9 100644 (file)
@@ -37,7 +37,7 @@ static int igt_dmabuf_export(void *arg)
        if (IS_ERR(obj))
                return PTR_ERR(obj);
 
-       dmabuf = i915_gem_prime_export(&i915->drm, &obj->base, 0);
+       dmabuf = i915_gem_prime_export(&obj->base, 0);
        i915_gem_object_put(obj);
        if (IS_ERR(dmabuf)) {
                pr_err("i915_gem_prime_export failed with err=%d\n",
@@ -61,7 +61,7 @@ static int igt_dmabuf_import_self(void *arg)
        if (IS_ERR(obj))
                return PTR_ERR(obj);
 
-       dmabuf = i915_gem_prime_export(&i915->drm, &obj->base, 0);
+       dmabuf = i915_gem_prime_export(&obj->base, 0);
        if (IS_ERR(dmabuf)) {
                pr_err("i915_gem_prime_export failed with err=%d\n",
                       (int)PTR_ERR(dmabuf));
@@ -236,7 +236,7 @@ static int igt_dmabuf_export_vmap(void *arg)
        if (IS_ERR(obj))
                return PTR_ERR(obj);
 
-       dmabuf = i915_gem_prime_export(&i915->drm, &obj->base, 0);
+       dmabuf = i915_gem_prime_export(&obj->base, 0);
        if (IS_ERR(dmabuf)) {
                pr_err("i915_gem_prime_export failed with err=%d\n",
                       (int)PTR_ERR(dmabuf));
@@ -283,7 +283,7 @@ static int igt_dmabuf_export_kmap(void *arg)
        if (IS_ERR(obj))
                return PTR_ERR(obj);
 
-       dmabuf = i915_gem_prime_export(&i915->drm, &obj->base, 0);
+       dmabuf = i915_gem_prime_export(&obj->base, 0);
        i915_gem_object_put(obj);
        if (IS_ERR(dmabuf)) {
                err = PTR_ERR(dmabuf);
index c1c45fbde155cff8f8767dcdac721aebc3acbb2e..ee0f217cf59d132b5be615692251e2a629dd1cee 100644 (file)
@@ -76,8 +76,7 @@ u64 omap_gem_mmap_offset(struct drm_gem_object *obj);
 size_t omap_gem_mmap_size(struct drm_gem_object *obj);
 
 /* PRIME Interface */
-struct dma_buf *omap_gem_prime_export(struct drm_device *dev,
-               struct drm_gem_object *obj, int flags);
+struct dma_buf *omap_gem_prime_export(struct drm_gem_object *obj, int flags);
 struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
                struct dma_buf *buffer);
 
index 0f8b597ccd106e9c96d0514a87d2099e50ce05b5..7e7ad275e3cf208fa117d7f03d3cf6ae560e0483 100644 (file)
@@ -136,8 +136,7 @@ static const struct dma_buf_ops omap_dmabuf_ops = {
        .mmap = omap_gem_dmabuf_mmap,
 };
 
-struct dma_buf *omap_gem_prime_export(struct drm_device *dev,
-               struct drm_gem_object *obj, int flags)
+struct dma_buf *omap_gem_prime_export(struct drm_gem_object *obj, int flags)
 {
        DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
 
@@ -146,7 +145,7 @@ struct dma_buf *omap_gem_prime_export(struct drm_device *dev,
        exp_info.flags = flags;
        exp_info.priv = obj;
 
-       return drm_gem_dmabuf_export(dev, &exp_info);
+       return drm_gem_dmabuf_export(obj->dev, &exp_info);
 }
 
 /* -----------------------------------------------------------------------------
index 3b07aa6e551d734df8d1b14fcdce83c61a5261d5..4a6acaa3f8436bfa0dd7574dd80a870cc6c7c4f4 100644 (file)
@@ -130,8 +130,7 @@ int radeon_gem_object_open(struct drm_gem_object *obj,
                                struct drm_file *file_priv);
 void radeon_gem_object_close(struct drm_gem_object *obj,
                                struct drm_file *file_priv);
-struct dma_buf *radeon_gem_prime_export(struct drm_device *dev,
-                                       struct drm_gem_object *gobj,
+struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
                                        int flags);
 extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
                                      unsigned int flags, int *vpos, int *hpos,
index d3a5bea9a2c5ebfd1a132d62c2d8a2c5a1d45ee5..deaffce50a2eff5a2b23f45d4e2ec1643bea10a5 100644 (file)
@@ -124,12 +124,11 @@ struct reservation_object *radeon_gem_prime_res_obj(struct drm_gem_object *obj)
        return bo->tbo.resv;
 }
 
-struct dma_buf *radeon_gem_prime_export(struct drm_device *dev,
-                                       struct drm_gem_object *gobj,
+struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
                                        int flags)
 {
        struct radeon_bo *bo = gem_to_radeon_bo(gobj);
        if (radeon_ttm_tt_has_userptr(bo->tbo.ttm))
                return ERR_PTR(-EPERM);
-       return drm_gem_prime_export(dev, gobj, flags);
+       return drm_gem_prime_export(gobj, flags);
 }
index 4cce11fd8836f93ec76cc43a0a535a9764617a09..fd5e9c3a27890012c199c0b4e5dd9ff2b72354d4 100644 (file)
@@ -629,20 +629,19 @@ static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = {
        .vunmap = tegra_gem_prime_vunmap,
 };
 
-struct dma_buf *tegra_gem_prime_export(struct drm_device *drm,
-                                      struct drm_gem_object *gem,
+struct dma_buf *tegra_gem_prime_export(struct drm_gem_object *gem,
                                       int flags)
 {
        DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
 
        exp_info.exp_name = KBUILD_MODNAME;
-       exp_info.owner = drm->driver->fops->owner;
+       exp_info.owner = gem->dev->driver->fops->owner;
        exp_info.ops = &tegra_gem_prime_dmabuf_ops;
        exp_info.size = gem->size;
        exp_info.flags = flags;
        exp_info.priv = gem;
 
-       return drm_gem_dmabuf_export(drm, &exp_info);
+       return drm_gem_dmabuf_export(gem->dev, &exp_info);
 }
 
 struct drm_gem_object *tegra_gem_prime_import(struct drm_device *drm,
index 6bd7dd7e55b46fb1443bd9cd72bd99ce7b244b43..85ebf83c7e436a88387f8cde7c56015dbd962c86 100644 (file)
@@ -73,8 +73,7 @@ extern const struct vm_operations_struct tegra_bo_vm_ops;
 int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma);
 int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma);
 
-struct dma_buf *tegra_gem_prime_export(struct drm_device *drm,
-                                      struct drm_gem_object *gem,
+struct dma_buf *tegra_gem_prime_export(struct drm_gem_object *gem,
                                       int flags);
 struct drm_gem_object *tegra_gem_prime_import(struct drm_device *drm,
                                              struct dma_buf *buf);
index a28892146f7cffbb1144ad391f9f1820f4e0c57f..10a60e7e93d6cbf855e55dae9d68ee365b858e95 100644 (file)
@@ -170,8 +170,7 @@ static const struct dma_buf_ops udl_dmabuf_ops = {
        .release                = drm_gem_dmabuf_release,
 };
 
-struct dma_buf *udl_gem_prime_export(struct drm_device *dev,
-                                    struct drm_gem_object *obj, int flags)
+struct dma_buf *udl_gem_prime_export(struct drm_gem_object *obj, int flags)
 {
        DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
 
@@ -180,7 +179,7 @@ struct dma_buf *udl_gem_prime_export(struct drm_device *dev,
        exp_info.flags = flags;
        exp_info.priv = obj;
 
-       return drm_gem_dmabuf_export(dev, &exp_info);
+       return drm_gem_dmabuf_export(obj->dev, &exp_info);
 }
 
 static int udl_prime_create(struct drm_device *dev,
index a928801026c16806462ec810fa2fc496a7bbead8..9d0790be544f7995df63a0b49b890ba0dc9ec2fa 100644 (file)
@@ -126,8 +126,7 @@ int udl_gem_mmap(struct drm_file *file_priv, struct drm_device *dev,
 void udl_gem_free_object(struct drm_gem_object *gem_obj);
 struct udl_gem_object *udl_gem_alloc_object(struct drm_device *dev,
                                            size_t size);
-struct dma_buf *udl_gem_prime_export(struct drm_device *dev,
-                                    struct drm_gem_object *obj, int flags);
+struct dma_buf *udl_gem_prime_export(struct drm_gem_object *obj, int flags);
 struct drm_gem_object *udl_gem_prime_import(struct drm_device *dev,
                                struct dma_buf *dma_buf);
 
index 1434bb829267dd1632561d8fd09ce05e46e83ce2..b0f9eb6632a2f83f5f3365b03bedae15c51eece4 100644 (file)
@@ -658,8 +658,7 @@ static void vc4_bo_cache_time_timer(struct timer_list *t)
        schedule_work(&vc4->bo_cache.time_work);
 }
 
-struct dma_buf *
-vc4_prime_export(struct drm_device *dev, struct drm_gem_object *obj, int flags)
+struct dma_buf * vc4_prime_export(struct drm_gem_object *obj, int flags)
 {
        struct vc4_bo *bo = to_vc4_bo(obj);
        struct dma_buf *dmabuf;
@@ -681,7 +680,7 @@ vc4_prime_export(struct drm_device *dev, struct drm_gem_object *obj, int flags)
                return ERR_PTR(ret);
        }
 
-       dmabuf = drm_gem_prime_export(dev, obj, flags);
+       dmabuf = drm_gem_prime_export(obj, flags);
        if (IS_ERR(dmabuf))
                vc4_bo_dec_usecnt(bo);
 
index 9170a24ec5f523f4da768cecdac5c10430d88d94..efd1ec3430f5c36d66045fed4d2a864b08f82846 100644 (file)
@@ -708,8 +708,7 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t size,
 int vc4_dumb_create(struct drm_file *file_priv,
                    struct drm_device *dev,
                    struct drm_mode_create_dumb *args);
-struct dma_buf *vc4_prime_export(struct drm_device *dev,
-                                struct drm_gem_object *obj, int flags);
+struct dma_buf *vc4_prime_export(struct drm_gem_object *obj, int flags);
 int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
                        struct drm_file *file_priv);
 int vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data,
index eb17c0cd3727a46498bc6dc0d0c77ec70cde0cfb..72d43d5ec5ab52636666a899f11829e33db5b810 100644 (file)
@@ -108,7 +108,7 @@ static int attach_dmabuf(struct drm_device *dev,
        if (obj->dma_buf)
                return 0;
 
-       dmabuf = dev->driver->gem_prime_export(dev, obj, 0);
+       dmabuf = dev->driver->gem_prime_export(obj, 0);
        if (IS_ERR(dmabuf))
                return PTR_ERR(dmabuf);
 
index 86a10c25ad0f1c95eb33ee8bbe4039bfec172e24..b33f2cee2099c00928a4b4f28b874299799d4a3d 100644 (file)
@@ -581,8 +581,8 @@ struct drm_driver {
         * Export hook for GEM drivers. Deprecated in favour of
         * &drm_gem_object_funcs.export.
         */
-       struct dma_buf * (*gem_prime_export)(struct drm_device *dev,
-                               struct drm_gem_object *obj, int flags);
+       struct dma_buf * (*gem_prime_export)(struct drm_gem_object *obj,
+                                            int flags);
        /**
         * @gem_prime_import:
         *
index ee32b07f3eb0d98beb09fcea63b0afa2980675b6..d89311b822d508c7305fa20d5dbc37cf4678d53d 100644 (file)
@@ -91,8 +91,7 @@ int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
 int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma);
 
 struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages);
-struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
-                                    struct drm_gem_object *obj,
+struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,
                                     int flags);
 
 /* helper functions for importing */