Hi On Tue, Sep 23, 2014 at 3:46 PM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote: > 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: David Airlie <airlied@xxxxxxxx> > Cc: Alex Deucher <alexander.deucher@xxxxxxx> > Cc: "Christian König" <christian.koenig@xxxxxxx> > Cc: David Herrmann <dh.herrmann@xxxxxxxxx> > Cc: Rashika <rashika.kheria@xxxxxxxxx> > Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx> > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> > Cc: Fabian Frederick <fabf@xxxxxxxxx> > Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx> > Cc: Ben Skeggs <bskeggs@xxxxxxxxxx> > Cc: Alexandre Courbot <acourbot@xxxxxxxxxx> > Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxx> > Cc: Christian Engelmayer <cengelma@xxxxxx> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> Yeah, I hope no-one ever used DMA-mmap or BUFS-mmap on those drivers.. otherwise, we can still revert it in special cases (or just break this legacy stuff..). Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx> Thanks David > --- > drivers/gpu/drm/ast/ast_ttm.c | 2 +- > drivers/gpu/drm/bochs/bochs_mm.c | 2 +- > drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- > drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- > drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- > drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- > 7 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c > index 5098c7dd435c..c65d432f42c4 100644 > --- a/drivers/gpu/drm/ast/ast_ttm.c > +++ b/drivers/gpu/drm/ast/ast_ttm.c > @@ -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; > diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c > index 2af30e7607d7..324f5a09a0a1 100644 > --- a/drivers/gpu/drm/bochs/bochs_mm.c > +++ b/drivers/gpu/drm/bochs/bochs_mm.c > @@ -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; > diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c > index 3e7d758330a9..d3c615f9b183 100644 > --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c > +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c > @@ -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; > diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c > index be883ef5a1d3..8ac70626df6c 100644 > --- a/drivers/gpu/drm/mgag200/mgag200_ttm.c > +++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c > @@ -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; > diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c > index e81d086577ce..753a6def61e7 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c > @@ -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); > } > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c > index abe945a04fd4..0cbc4c987164 100644 > --- a/drivers/gpu/drm/qxl/qxl_ttm.c > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c > @@ -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; > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c > index eca2ce60d440..902a3e8af79b 100644 > --- a/drivers/gpu/drm/radeon/radeon_ttm.c > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c > @@ -956,7 +956,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; > -- > 2.1.0 > _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel