Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2 Rename drm_mmap_* -> drm_legacy_mmap_*...



details:   https://anonhg.NetBSD.org/src/rev/d2d19e8a8233
branches:  trunk
changeset: 835186:d2d19e8a8233
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:51:06 2018 +0000

description:
Rename drm_mmap_* -> drm_legacy_mmap_* like upstream.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c |   6 +-
 sys/external/bsd/drm2/dist/drm/via/via_drv.c         |   6 +-
 sys/external/bsd/drm2/dist/include/drm/drm_legacy.h  |   6 +-
 sys/external/bsd/drm2/drm/drm_cdevsw.c               |  12 +++---
 sys/external/bsd/drm2/drm/drm_gem_vm.c               |   6 +-
 sys/external/bsd/drm2/drm/drm_vm.c                   |  33 ++++++++++---------
 6 files changed, 36 insertions(+), 33 deletions(-)

diffs (256 lines):

diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c      Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c      Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_ttm.c,v 1.6 2018/08/27 07:37:38 riastradh Exp $        */
+/*     $NetBSD: nouveau_ttm.c,v 1.7 2018/08/27 07:51:06 riastradh Exp $        */
 
 /*
  * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_ttm.c,v 1.6 2018/08/27 07:37:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_ttm.c,v 1.7 2018/08/27 07:51:06 riastradh Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>    /* pmap_pv_track/untrack */
@@ -283,7 +283,7 @@
        KASSERT(0 == (offset & (PAGE_SIZE - 1)));
 
        if (__predict_false((offset >> PAGE_SHIFT) < DRM_FILE_PAGE_OFFSET))
-               return drm_mmap_object(dev, offset, size, prot, uobjp,
+               return drm_legacy_mmap_object(dev, offset, size, prot, uobjp,
                    uoffsetp, file);
        else
                return ttm_bo_mmap_object(&drm->ttm.bdev, offset, size, prot,
diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/dist/drm/via/via_drv.c
--- a/sys/external/bsd/drm2/dist/drm/via/via_drv.c      Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/via/via_drv.c      Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: via_drv.c,v 1.5 2018/08/27 07:03:26 riastradh Exp $    */
+/*     $NetBSD: via_drv.c,v 1.6 2018/08/27 07:51:06 riastradh Exp $    */
 
 /*
  * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_drv.c,v 1.5 2018/08/27 07:03:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_drv.c,v 1.6 2018/08/27 07:51:06 riastradh Exp $");
 
 #include <linux/module.h>
 
@@ -105,7 +105,7 @@
 #ifndef __NetBSD__
        .fops = &via_driver_fops,
 #else
-       .mmap_object = drm_mmap_object,
+       .mmap_object = drm_legacy_mmap_object,
 #endif
        .name = DRIVER_NAME,
        .desc = DRIVER_DESC,
diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/dist/include/drm/drm_legacy.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_legacy.h       Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_legacy.h       Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_legacy.h,v 1.6 2018/08/27 07:46:07 riastradh Exp $ */
+/*     $NetBSD: drm_legacy.h,v 1.7 2018/08/27 07:51:06 riastradh Exp $ */
 
 #ifndef __DRM_DRM_LEGACY_H__
 #define __DRM_DRM_LEGACY_H__
@@ -218,9 +218,9 @@
 int drm_legacy_rmmap_locked(struct drm_device *d, struct drm_local_map *map);
 struct drm_local_map *drm_legacy_getsarea(struct drm_device *dev);
 #ifdef __NetBSD__
-int drm_mmap_object(struct drm_device *, off_t, size_t, int,
+int drm_legacy_mmap_object(struct drm_device *, off_t, size_t, int,
     struct uvm_object **, voff_t *, struct file *);
-paddr_t drm_mmap_paddr(struct drm_device *, off_t, int);
+paddr_t drm_legacy_mmap_paddr(struct drm_device *, off_t, int);
 #else
 int drm_legacy_mmap(struct file *filp, struct vm_area_struct *vma);
 #endif
diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/drm/drm_cdevsw.c
--- a/sys/external/bsd/drm2/drm/drm_cdevsw.c    Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/drm/drm_cdevsw.c    Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_cdevsw.c,v 1.7 2018/08/27 06:52:34 riastradh Exp $ */
+/*     $NetBSD: drm_cdevsw.c,v 1.8 2018/08/27 07:51:06 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_cdevsw.c,v 1.7 2018/08/27 06:52:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_cdevsw.c,v 1.8 2018/08/27 07:51:06 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -75,7 +75,7 @@
 static int     drm_stat(struct file *, struct stat *);
 static int     drm_fop_mmap(struct file *, off_t *, size_t, int, int *, int *,
                             struct uvm_object **, int *);
-static paddr_t drm_mmap(dev_t, off_t, int);
+static paddr_t drm_legacy_mmap(dev_t, off_t, int);
 
 const struct cdevsw drm_cdevsw = {
        .d_open = drm_open,
@@ -86,7 +86,7 @@
        .d_stop = nostop,
        .d_tty = notty,
        .d_poll = nopoll,
-       .d_mmap = drm_mmap,
+       .d_mmap = drm_legacy_mmap,
        .d_kqfilter = nokqfilter,
        .d_discard = nodiscard,
        /* XXX was D_TTY | D_NEGOFFSAFE */
@@ -472,7 +472,7 @@
 }
 
 static paddr_t
-drm_mmap(dev_t d, off_t offset, int prot)
+drm_legacy_mmap(dev_t d, off_t offset, int prot)
 {
        struct drm_minor *dminor;
        paddr_t paddr;
@@ -481,7 +481,7 @@
        if (IS_ERR(dminor))
                return (paddr_t)-1;
 
-       paddr = drm_mmap_paddr(dminor->dev, offset, prot);
+       paddr = drm_legacy_mmap_paddr(dminor->dev, offset, prot);
 
        drm_minor_release(dminor);
        return paddr;
diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/drm/drm_gem_vm.c
--- a/sys/external/bsd/drm2/drm/drm_gem_vm.c    Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/drm/drm_gem_vm.c    Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_gem_vm.c,v 1.8 2018/08/27 06:57:20 riastradh Exp $ */
+/*     $NetBSD: drm_gem_vm.c,v 1.9 2018/08/27 07:51:06 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem_vm.c,v 1.8 2018/08/27 06:57:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem_vm.c,v 1.9 2018/08/27 07:51:06 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -76,7 +76,7 @@
        if (*uobjp != NULL)
                return 0;
 
-       return drm_mmap_object(dev, byte_offset, nbytes, prot, uobjp,
+       return drm_legacy_mmap_object(dev, byte_offset, nbytes, prot, uobjp,
            uoffsetp, file);
 }
 
diff -r f38bca0dbc49 -r d2d19e8a8233 sys/external/bsd/drm2/drm/drm_vm.c
--- a/sys/external/bsd/drm2/drm/drm_vm.c        Mon Aug 27 07:50:54 2018 +0000
+++ b/sys/external/bsd/drm2/drm/drm_vm.c        Mon Aug 27 07:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_vm.c,v 1.8 2018/08/27 06:58:20 riastradh Exp $     */
+/*     $NetBSD: drm_vm.c,v 1.9 2018/08/27 07:51:06 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.8 2018/08/27 06:58:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.9 2018/08/27 07:51:06 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/conf.h>
@@ -41,14 +41,15 @@
 #include <drm/drmP.h>
 #include <drm/drm_legacy.h>
 
-static paddr_t drm_mmap_paddr_locked(struct drm_device *, off_t, int);
-static paddr_t drm_mmap_dma_paddr(struct drm_device *, off_t, int);
-static paddr_t drm_mmap_map_paddr(struct drm_device *, struct drm_local_map *,
-                   off_t, int);
+static paddr_t drm_legacy_mmap_paddr_locked(struct drm_device *, off_t, int);
+static paddr_t drm_legacy_mmap_dma_paddr(struct drm_device *, off_t, int);
+static paddr_t drm_legacy_mmap_map_paddr(struct drm_device *,
+                   struct drm_local_map *, off_t, int);
 
 int
-drm_mmap_object(struct drm_device *dev, off_t offset, size_t size, int prot,
-    struct uvm_object **uobjp, voff_t *uoffsetp, struct file *file __unused)
+drm_legacy_mmap_object(struct drm_device *dev, off_t offset, size_t size,
+    int prot, struct uvm_object **uobjp, voff_t *uoffsetp,
+    struct file *file __unused)
 {
        devmajor_t maj = cdevsw_lookup_major(&drm_cdevsw);
        dev_t devno = makedev(maj, dev->primary->index);
@@ -71,7 +72,7 @@
 }
 
 paddr_t
-drm_mmap_paddr(struct drm_device *dev, off_t byte_offset, int prot)
+drm_legacy_mmap_paddr(struct drm_device *dev, off_t byte_offset, int prot)
 {
        paddr_t paddr;
 
@@ -79,14 +80,15 @@
                return -1;
 
        mutex_lock(&dev->struct_mutex);
-       paddr = drm_mmap_paddr_locked(dev, byte_offset, prot);
+       paddr = drm_legacy_mmap_paddr_locked(dev, byte_offset, prot);
        mutex_unlock(&dev->struct_mutex);
 
        return paddr;
 }
 
 static paddr_t
-drm_mmap_paddr_locked(struct drm_device *dev, off_t byte_offset, int prot)
+drm_legacy_mmap_paddr_locked(struct drm_device *dev, off_t byte_offset,
+    int prot)
 {
        const off_t page_offset = (byte_offset >> PAGE_SHIFT);
        struct drm_hash_item *hash;
@@ -97,7 +99,7 @@
        if ((dev->dma != NULL) &&
            (0 <= byte_offset) &&
            (page_offset <= dev->dma->page_count))
-               return drm_mmap_dma_paddr(dev, byte_offset, prot);
+               return drm_legacy_mmap_dma_paddr(dev, byte_offset, prot);
 
        if (drm_ht_find_item(&dev->map_hash, page_offset, &hash))
                return -1;
@@ -121,11 +123,12 @@
        if (map->size < (map->offset - byte_offset))
                return -1;
 
-       return drm_mmap_map_paddr(dev, map, (byte_offset - map->offset), prot);
+       return drm_legacy_mmap_map_paddr(dev, map, (byte_offset - map->offset),
+           prot);
 }
 
 static paddr_t
-drm_mmap_dma_paddr(struct drm_device *dev, off_t byte_offset, int prot)
+drm_legacy_mmap_dma_paddr(struct drm_device *dev, off_t byte_offset, int prot)
 {
        const off_t page_offset = (byte_offset >> PAGE_SHIFT);
 
@@ -140,7 +143,7 @@
 }
 
 static paddr_t
-drm_mmap_map_paddr(struct drm_device *dev, struct drm_local_map *map,
+drm_legacy_mmap_map_paddr(struct drm_device *dev, struct drm_local_map *map,
     off_t byte_offset, int prot)
 {
        int flags = 0;



Home | Main Index | Thread Index | Old Index