diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-23 09:46:47 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-23 21:42:51 -0400 |
commit | 884c6dabb0eafe7227f099c9e78e514191efaf13 (patch) | |
tree | 5a3e63102ed2d88b75c7fa72b9d1782ce0805416 | |
parent | 9908fb654088e50d7d528f74898c5e5ebbd0fb68 (diff) |
drm/<ttm-based-drivers>: Don't call drm_mmap
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>
-rw-r--r-- | drivers/gpu/drm/ast/ast_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/bochs/bochs_mm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ttm.c | 2 | ||||
-rw-r--r-- | 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) | |||
427 | struct ast_private *ast; | 427 | struct ast_private *ast; |
428 | 428 | ||
429 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | 429 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) |
430 | return drm_mmap(filp, vma); | 430 | return -EINVAL; |
431 | 431 | ||
432 | file_priv = filp->private_data; | 432 | file_priv = filp->private_data; |
433 | ast = file_priv->minor->dev->dev_private; | 433 | 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) | |||
339 | struct bochs_device *bochs; | 339 | struct bochs_device *bochs; |
340 | 340 | ||
341 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | 341 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) |
342 | return drm_mmap(filp, vma); | 342 | return -EINVAL; |
343 | 343 | ||
344 | file_priv = filp->private_data; | 344 | file_priv = filp->private_data; |
345 | bochs = file_priv->minor->dev->dev_private; | 345 | 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) | |||
411 | struct cirrus_device *cirrus; | 411 | struct cirrus_device *cirrus; |
412 | 412 | ||
413 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | 413 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) |
414 | return drm_mmap(filp, vma); | 414 | return -EINVAL; |
415 | 415 | ||
416 | file_priv = filp->private_data; | 416 | file_priv = filp->private_data; |
417 | cirrus = file_priv->minor->dev->dev_private; | 417 | 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) | |||
428 | struct mga_device *mdev; | 428 | struct mga_device *mdev; |
429 | 429 | ||
430 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | 430 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) |
431 | return drm_mmap(filp, vma); | 431 | return -EINVAL; |
432 | 432 | ||
433 | file_priv = filp->private_data; | 433 | file_priv = filp->private_data; |
434 | mdev = file_priv->minor->dev->dev_private; | 434 | 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) | |||
281 | struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev); | 281 | struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev); |
282 | 282 | ||
283 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | 283 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) |
284 | return drm_mmap(filp, vma); | 284 | return -EINVAL; |
285 | 285 | ||
286 | return ttm_bo_mmap(filp, vma, &drm->ttm.bdev); | 286 | return ttm_bo_mmap(filp, vma, &drm->ttm.bdev); |
287 | } | 287 | } |
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) | |||
127 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) { | 127 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) { |
128 | pr_info("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n", | 128 | pr_info("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n", |
129 | __func__, vma->vm_pgoff); | 129 | __func__, vma->vm_pgoff); |
130 | return drm_mmap(filp, vma); | 130 | return -EINVAL; |
131 | } | 131 | } |
132 | 132 | ||
133 | file_priv = filp->private_data; | 133 | file_priv = filp->private_data; |
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index d73ea9c04227..738a2f248b36 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c | |||
@@ -963,7 +963,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma) | |||
963 | int r; | 963 | int r; |
964 | 964 | ||
965 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) { | 965 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) { |
966 | return drm_mmap(filp, vma); | 966 | return -EINVAL; |
967 | } | 967 | } |
968 | 968 | ||
969 | file_priv = filp->private_data; | 969 | file_priv = filp->private_data; |