Skip to content

Commit bfbf3c8

Browse files
danvetairlied
authored andcommitted
drm: move drm_mmap to <drm/drm_legacy.h>
Now that we've removed the copypasted users in gem/ttm we can relegate the legacy buffer mapping support to where it belongs. Also give it the proper drm_legacy_ prefix. While at it statify drm_mmap_locked, somehow I've missed that in my previous header rework. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 197633b commit bfbf3c8

12 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎drivers/gpu/drm/drm_internal.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
3737

3838
/* drm_vm.c */
3939
int drm_vma_info(struct seq_file *m, void *data);
40-
int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma);
4140
void drm_vm_close_locked(struct drm_device *dev, struct vm_area_struct *vma);
4241

4342
/* drm_prime.c */

‎drivers/gpu/drm/drm_vm.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)
537537
* according to the mapping type and remaps the pages. Finally sets the file
538538
* pointer and calls vm_open().
539539
*/
540-
int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
540+
static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
541541
{
542542
struct drm_file *priv = filp->private_data;
543543
struct drm_device *dev = priv->minor->dev;
@@ -651,7 +651,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
651651
return 0;
652652
}
653653

654-
int drm_mmap(struct file *filp, struct vm_area_struct *vma)
654+
int drm_legacy_mmap(struct file *filp, struct vm_area_struct *vma)
655655
{
656656
struct drm_file *priv = filp->private_data;
657657
struct drm_device *dev = priv->minor->dev;
@@ -666,7 +666,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
666666

667667
return ret;
668668
}
669-
EXPORT_SYMBOL(drm_mmap);
669+
EXPORT_SYMBOL(drm_legacy_mmap);
670670

671671
void drm_legacy_vma_flush(struct drm_device *dev)
672672
{

‎drivers/gpu/drm/i810/i810_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static const struct file_operations i810_driver_fops = {
4747
.open = drm_open,
4848
.release = drm_release,
4949
.unlocked_ioctl = drm_ioctl,
50-
.mmap = drm_mmap,
50+
.mmap = drm_legacy_mmap,
5151
.poll = drm_poll,
5252
#ifdef CONFIG_COMPAT
5353
.compat_ioctl = drm_compat_ioctl,

‎drivers/gpu/drm/mga/mga_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static const struct file_operations mga_driver_fops = {
4848
.open = drm_open,
4949
.release = drm_release,
5050
.unlocked_ioctl = drm_ioctl,
51-
.mmap = drm_mmap,
51+
.mmap = drm_legacy_mmap,
5252
.poll = drm_poll,
5353
#ifdef CONFIG_COMPAT
5454
.compat_ioctl = mga_compat_ioctl,

‎drivers/gpu/drm/r128/r128_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static const struct file_operations r128_driver_fops = {
4646
.open = drm_open,
4747
.release = drm_release,
4848
.unlocked_ioctl = drm_ioctl,
49-
.mmap = drm_mmap,
49+
.mmap = drm_legacy_mmap,
5050
.poll = drm_poll,
5151
#ifdef CONFIG_COMPAT
5252
.compat_ioctl = r128_compat_ioctl,

‎drivers/gpu/drm/radeon/radeon_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static const struct file_operations radeon_driver_old_fops = {
308308
.open = drm_open,
309309
.release = drm_release,
310310
.unlocked_ioctl = drm_ioctl,
311-
.mmap = drm_mmap,
311+
.mmap = drm_legacy_mmap,
312312
.poll = drm_poll,
313313
.read = drm_read,
314314
#ifdef CONFIG_COMPAT

‎drivers/gpu/drm/savage/savage_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static const struct file_operations savage_driver_fops = {
4040
.open = drm_open,
4141
.release = drm_release,
4242
.unlocked_ioctl = drm_ioctl,
43-
.mmap = drm_mmap,
43+
.mmap = drm_legacy_mmap,
4444
.poll = drm_poll,
4545
#ifdef CONFIG_COMPAT
4646
.compat_ioctl = drm_compat_ioctl,

‎drivers/gpu/drm/sis/sis_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static const struct file_operations sis_driver_fops = {
7070
.open = drm_open,
7171
.release = drm_release,
7272
.unlocked_ioctl = drm_ioctl,
73-
.mmap = drm_mmap,
73+
.mmap = drm_legacy_mmap,
7474
.poll = drm_poll,
7575
#ifdef CONFIG_COMPAT
7676
.compat_ioctl = drm_compat_ioctl,

‎drivers/gpu/drm/tdfx/tdfx_drv.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "tdfx_drv.h"
3737

3838
#include <drm/drm_pciids.h>
39+
#include <drm/drm_legacy.h>
3940

4041
static struct pci_device_id pciidlist[] = {
4142
tdfx_PCI_IDS
@@ -46,7 +47,7 @@ static const struct file_operations tdfx_driver_fops = {
4647
.open = drm_open,
4748
.release = drm_release,
4849
.unlocked_ioctl = drm_ioctl,
49-
.mmap = drm_mmap,
50+
.mmap = drm_legacy_mmap,
5051
.poll = drm_poll,
5152
#ifdef CONFIG_COMPAT
5253
.compat_ioctl = drm_compat_ioctl,

‎drivers/gpu/drm/via/via_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const struct file_operations via_driver_fops = {
6262
.open = drm_open,
6363
.release = drm_release,
6464
.unlocked_ioctl = drm_ioctl,
65-
.mmap = drm_mmap,
65+
.mmap = drm_legacy_mmap,
6666
.poll = drm_poll,
6767
#ifdef CONFIG_COMPAT
6868
.compat_ioctl = drm_compat_ioctl,

0 commit comments

Comments
 (0)