drm/<ttm-based-drivers>: Don't call drm_mmap
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Sep 2014 13:46:47 +0000 (15:46 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 24 Sep 2014 01:42:51 +0000 (11:42 +1000)
Really, the legacy buffer api should be dead, especially for all these
newfangled drivers. I suspect this is copypasta from the transitioning
days, which probably originated in radeon.

Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Rashika <rashika.kheria@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ast/ast_ttm.c
drivers/gpu/drm/bochs/bochs_mm.c
drivers/gpu/drm/cirrus/cirrus_ttm.c
drivers/gpu/drm/mgag200/mgag200_ttm.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/qxl/qxl_ttm.c
drivers/gpu/drm/radeon/radeon_ttm.c

index 5098c7d..c65d432 100644 (file)
@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)
        struct ast_private *ast;
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap(filp, vma);
+               return -EINVAL;
 
        file_priv = filp->private_data;
        ast = file_priv->minor->dev->dev_private;
index 2af30e7..324f5a0 100644 (file)
@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)
        struct bochs_device *bochs;
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap(filp, vma);
+               return -EINVAL;
 
        file_priv = filp->private_data;
        bochs = file_priv->minor->dev->dev_private;
index 3e7d758..d3c615f 100644 (file)
@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)
        struct cirrus_device *cirrus;
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap(filp, vma);
+               return -EINVAL;
 
        file_priv = filp->private_data;
        cirrus = file_priv->minor->dev->dev_private;
index be883ef..8ac7062 100644 (file)
@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)
        struct mga_device *mdev;
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap(filp, vma);
+               return -EINVAL;
 
        file_priv = filp->private_data;
        mdev = file_priv->minor->dev->dev_private;
index e81d086..753a6de 100644 (file)
@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)
        struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev);
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap(filp, vma);
+               return -EINVAL;
 
        return ttm_bo_mmap(filp, vma, &drm->ttm.bdev);
 }
index abe945a..0cbc4c9 100644 (file)
@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) {
                pr_info("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n",
                        __func__, vma->vm_pgoff);
-               return drm_mmap(filp, vma);
+               return -EINVAL;
        }
 
        file_priv = filp->private_data;
index d73ea9c..738a2f2 100644 (file)
@@ -963,7 +963,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
        int r;
 
        if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) {
-               return drm_mmap(filp, vma);
+               return -EINVAL;
        }
 
        file_priv = filp->private_data;