Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm remove unused code:



details:   https://anonhg.NetBSD.org/src/rev/cfe362e01165
branches:  trunk
changeset: 433412:cfe362e01165
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Sep 14 01:43:43 2018 +0000

description:
remove unused code:
- old drm nouveau was never ported
- the libdrm in this repo was never used
- these tests were never used, and this whole tree is obsolete, but
  we never ported some of the old drivers to new drm.

XXX: probably can delete i915drm.
XXX: would ike to delete old radeondrm, but it is still the only
     functional drm on some older radeon r100/r200 chipsets.

diffstat:

 sys/external/bsd/drm/conf/files.drm                           |     33 +-
 sys/external/bsd/drm/dist/bsd-core/nouveau/Makefile           |     33 -
 sys/external/bsd/drm/dist/bsd-core/nouveau_drv.c              |    148 -
 sys/external/bsd/drm/dist/bsd-core/nouveau_sgdma.c            |    357 -
 sys/external/bsd/drm/dist/libdrm.pc.in                        |     10 -
 sys/external/bsd/drm/dist/libdrm/ChangeLog                    |     20 -
 sys/external/bsd/drm/dist/libdrm/Makefile.am                  |     39 -
 sys/external/bsd/drm/dist/libdrm/TODO                         |     10 -
 sys/external/bsd/drm/dist/libdrm/intel/Makefile.am            |     47 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_bufmgr.c         |    230 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_bufmgr.h         |    197 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_bufmgr_fake.c    |   1530 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_bufmgr_gem.c     |   1491 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_bufmgr_priv.h    |    208 -
 sys/external/bsd/drm/dist/libdrm/intel/intel_chipset.h        |     71 -
 sys/external/bsd/drm/dist/libdrm/intel/mm.c                   |    281 -
 sys/external/bsd/drm/dist/libdrm/intel/mm.h                   |     96 -
 sys/external/bsd/drm/dist/libdrm/libdrm_lists.h               |     89 -
 sys/external/bsd/drm/dist/libdrm/nouveau/Makefile.am          |     42 -
 sys/external/bsd/drm/dist/libdrm/nouveau/libdrm_nouveau.pc.in |     10 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_bo.c         |    849 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_bo.h         |     97 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_channel.c    |    178 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_channel.h    |     56 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_class.h      |   8006 ---
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_device.c     |    202 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_device.h     |     31 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.c        |    217 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_dma.h        |    154 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_drmif.h      |     62 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_fence.c      |    243 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_grobj.c      |    138 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_grobj.h      |     48 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_notifier.c   |    146 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_notifier.h   |     63 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_private.h    |    203 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_pushbuf.c    |    276 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_pushbuf.h    |    160 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_resource.c   |    115 -
 sys/external/bsd/drm/dist/libdrm/nouveau/nouveau_resource.h   |     48 -
 sys/external/bsd/drm/dist/libdrm/xf86drm.c                    |   2487 -
 sys/external/bsd/drm/dist/libdrm/xf86drm.h                    |    670 -
 sys/external/bsd/drm/dist/libdrm/xf86drmHash.c                |    428 -
 sys/external/bsd/drm/dist/libdrm/xf86drmMode.c                |    668 -
 sys/external/bsd/drm/dist/libdrm/xf86drmMode.h                |    364 -
 sys/external/bsd/drm/dist/libdrm/xf86drmRandom.c              |    208 -
 sys/external/bsd/drm/dist/libdrm/xf86drmSL.c                  |    480 -
 sys/external/bsd/drm/dist/libdrm/xf86mm.h                     |    198 -
 sys/external/bsd/drm/dist/libdrm_intel.pc.in                  |     10 -
 sys/external/bsd/drm/dist/shared-core/nouveau_dma.c           |    173 -
 sys/external/bsd/drm/dist/shared-core/nouveau_dma.h           |     96 -
 sys/external/bsd/drm/dist/shared-core/nouveau_drm.h           |    299 -
 sys/external/bsd/drm/dist/shared-core/nouveau_drv.h           |    626 -
 sys/external/bsd/drm/dist/shared-core/nouveau_fifo.c          |    602 -
 sys/external/bsd/drm/dist/shared-core/nouveau_irq.c           |    588 -
 sys/external/bsd/drm/dist/shared-core/nouveau_mem.c           |    910 -
 sys/external/bsd/drm/dist/shared-core/nouveau_notifier.c      |    165 -
 sys/external/bsd/drm/dist/shared-core/nouveau_object.c        |   1173 -
 sys/external/bsd/drm/dist/shared-core/nouveau_reg.h           |    601 -
 sys/external/bsd/drm/dist/shared-core/nouveau_state.c         |    897 -
 sys/external/bsd/drm/dist/shared-core/nouveau_swmthd.c        |    191 -
 sys/external/bsd/drm/dist/shared-core/nouveau_swmthd.h        |     33 -
 sys/external/bsd/drm/dist/shared-core/nv04_fb.c               |     23 -
 sys/external/bsd/drm/dist/shared-core/nv04_fifo.c             |    138 -
 sys/external/bsd/drm/dist/shared-core/nv04_graph.c            |    516 -
 sys/external/bsd/drm/dist/shared-core/nv04_instmem.c          |    159 -
 sys/external/bsd/drm/dist/shared-core/nv04_mc.c               |     22 -
 sys/external/bsd/drm/dist/shared-core/nv04_timer.c            |     53 -
 sys/external/bsd/drm/dist/shared-core/nv10_fb.c               |     25 -
 sys/external/bsd/drm/dist/shared-core/nv10_fifo.c             |    169 -
 sys/external/bsd/drm/dist/shared-core/nv10_graph.c            |    914 -
 sys/external/bsd/drm/dist/shared-core/nv20_graph.c            |    913 -
 sys/external/bsd/drm/dist/shared-core/nv40_fb.c               |     62 -
 sys/external/bsd/drm/dist/shared-core/nv40_fifo.c             |    209 -
 sys/external/bsd/drm/dist/shared-core/nv40_graph.c            |   2190 -
 sys/external/bsd/drm/dist/shared-core/nv40_mc.c               |     38 -
 sys/external/bsd/drm/dist/shared-core/nv50_fifo.c             |    343 -
 sys/external/bsd/drm/dist/shared-core/nv50_graph.c            |    337 -
 sys/external/bsd/drm/dist/shared-core/nv50_grctx.h            |  20935 ----------
 sys/external/bsd/drm/dist/shared-core/nv50_instmem.c          |    331 -
 sys/external/bsd/drm/dist/shared-core/nv50_mc.c               |     43 -
 sys/external/bsd/drm/dist/tests/Makefile.am                   |     50 -
 sys/external/bsd/drm/dist/tests/auth.c                        |    137 -
 sys/external/bsd/drm/dist/tests/dristat.c                     |    279 -
 sys/external/bsd/drm/dist/tests/drmstat.c                     |    425 -
 sys/external/bsd/drm/dist/tests/drmtest.c                     |    128 -
 sys/external/bsd/drm/dist/tests/drmtest.h                     |     40 -
 sys/external/bsd/drm/dist/tests/gem_basic.c                   |    102 -
 sys/external/bsd/drm/dist/tests/gem_flink.c                   |    132 -
 sys/external/bsd/drm/dist/tests/gem_mmap.c                    |    136 -
 sys/external/bsd/drm/dist/tests/gem_readwrite.c               |    139 -
 sys/external/bsd/drm/dist/tests/getclient.c                   |     60 -
 sys/external/bsd/drm/dist/tests/getstats.c                    |     51 -
 sys/external/bsd/drm/dist/tests/getversion.c                  |     48 -
 sys/external/bsd/drm/dist/tests/lock.c                        |    263 -
 sys/external/bsd/drm/dist/tests/modeprint/Makefile.am         |     13 -
 sys/external/bsd/drm/dist/tests/modeprint/modeprint.c         |    402 -
 sys/external/bsd/drm/dist/tests/modetest/Makefile.am          |     15 -
 sys/external/bsd/drm/dist/tests/modetest/modetest.c           |    624 -
 sys/external/bsd/drm/dist/tests/openclose.c                   |     37 -
 sys/external/bsd/drm/dist/tests/setversion.c                  |     89 -
 sys/external/bsd/drm/dist/tests/ttmtest/AUTHORS               |      1 -
 sys/external/bsd/drm/dist/tests/ttmtest/ChangeLog             |     23 -
 sys/external/bsd/drm/dist/tests/ttmtest/Makefile.am           |      1 -
 sys/external/bsd/drm/dist/tests/ttmtest/configure.ac          |     33 -
 sys/external/bsd/drm/dist/tests/ttmtest/reconf                |      2 -
 sys/external/bsd/drm/dist/tests/ttmtest/src/Makefile.am       |      8 -
 sys/external/bsd/drm/dist/tests/ttmtest/src/ttmtest.c         |    430 -
 sys/external/bsd/drm/dist/tests/ttmtest/src/xf86dri.c         |    604 -
 sys/external/bsd/drm/dist/tests/ttmtest/src/xf86dri.h         |    116 -
 sys/external/bsd/drm/dist/tests/ttmtest/src/xf86dristr.h      |    390 -
 sys/external/bsd/drm/dist/tests/updatedraw.c                  |    153 -
 112 files changed, 1 insertions(+), 60451 deletions(-)

diffs (truncated from 60912 to 300 lines):

diff -r a01501ce4714 -r cfe362e01165 sys/external/bsd/drm/conf/files.drm
--- a/sys/external/bsd/drm/conf/files.drm       Thu Sep 13 22:12:35 2018 +0000
+++ b/sys/external/bsd/drm/conf/files.drm       Fri Sep 14 01:43:43 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.drm,v 1.8 2018/07/10 17:01:43 maya Exp $
+#      $NetBSD: files.drm,v 1.9 2018/09/14 01:43:43 mrg Exp $
 
 # direct rendering modules
 define drmbase
@@ -51,37 +51,6 @@
 file   external/bsd/drm/dist/shared-core/mga_state.c           mgadrm
 file   external/bsd/drm/dist/shared-core/mga_warp.c            mgadrm
 
-#device        nouveaudrm: drmbase, drmpci
-#attach        nouveaudrm at drm
-#file  external/bsd/drm/dist/bsd-core/nouveau_drv.c            nouveaudrm
-#file  external/bsd/drm/dist/bsd-core/nouveau_sgdma.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_state.c       nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_mem.c         nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_object.c      nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_fifo.c        nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_notifier.c    nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_dma.c         nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_irq.c         nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nouveau_swmthd.c      nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_timer.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_mc.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv40_mc.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv50_mc.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_fb.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv10_fb.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv40_fb.c             nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_fifo.c           nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv10_fifo.c           nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv40_fifo.c           nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv50_fifo.c           nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_graph.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv10_graph.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv20_graph.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv40_graph.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv50_graph.c          nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv04_instmem.c        nouveaudrm
-#file  external/bsd/drm/dist/shared-core/nv50_instmem.c        nouveaudrm
-
 device r128drm: drmbase, drmpci, firmload
 attach r128drm at drm
 file   external/bsd/drm/dist/bsd-core/ati_pcigart.c            (r128drm | radeondrm)
diff -r a01501ce4714 -r cfe362e01165 sys/external/bsd/drm/dist/bsd-core/nouveau/Makefile
--- a/sys/external/bsd/drm/dist/bsd-core/nouveau/Makefile       Thu Sep 13 22:12:35 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/..
-KMOD   = nouveau
-NO_MAN = YES
-SRCS    = nouveau_drv.c nouveau_state.c nouveau_mem.c nouveau_object.c \
-         nouveau_sgdma.c nouveau_fifo.c nouveau_notifier.c nouveau_dma.c \
-         nouveau_irq.c nouveau_swmthd.c \
-         nv04_timer.c \
-         nv04_mc.c nv40_mc.c nv50_mc.c \
-         nv04_fb.c nv10_fb.c nv40_fb.c \
-         nv04_fifo.c nv10_fifo.c nv40_fifo.c nv50_fifo.c \
-         nv04_graph.c nv10_graph.c nv20_graph.c \
-         nv40_graph.c nv50_graph.c \
-         nv04_instmem.c nv50_instmem.c
-#        nouveau_bo.c nouveau_fence.c \
-SRCS   += device_if.h bus_if.h pci_if.h opt_drm.h
-CFLAGS += ${DEBUG_FLAGS} -I. -I..
-
-.if defined(DRM_DEBUG)
-DRM_DEBUG_OPT= "\#define DRM_DEBUG 1"
-.endif
-
-.if !defined(DRM_NOLINUX)
-DRM_LINUX_OPT= "\#define DRM_LINUX 1"
-.endif
-
-opt_drm.h:
-       touch opt_drm.h
-       echo $(DRM_DEBUG_OPT) >> opt_drm.h
-       echo $(DRM_LINUX_OPT) >> opt_drm.h
-
-.include <bsd.kmod.mk>
diff -r a01501ce4714 -r cfe362e01165 sys/external/bsd/drm/dist/bsd-core/nouveau_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/nouveau_drv.c  Thu Sep 13 22:12:35 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/* nouveau_drv.c.c -- nouveau nouveau driver -*- linux-c -*-
- * Created: Wed Feb 14 17:10:04 2001 by gareth%valinux.com@localhost
- */
-/*-
- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Gareth Hughes <gareth%valinux.com@localhost>
- *
- */
-
-#include "drmP.h"
-#include "drm.h"
-#include "nouveau_drv.h"
-#include "drm_pciids.h"
-
-extern struct drm_ioctl_desc nouveau_ioctls[];
-extern int nouveau_max_ioctl;
-
-/* drv_PCI_IDs for nouveau is just to match the vendor id */
-static struct drm_pci_id_list nouveau_pciidlist[] = {
-       {0x10DE, 0, 0, "NVidia Display Adapter"}, \
-       {0, 0, 0, NULL}
-};
-
-static void nouveau_configure(struct drm_device *dev)
-{
-       dev->driver->driver_features =
-          DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ;
-
-       dev->driver->buf_priv_size      = sizeof(struct drm_nouveau_private);
-       dev->driver->load               = nouveau_load;
-       dev->driver->unload             = nouveau_unload;
-       dev->driver->firstopen          = nouveau_firstopen;
-       dev->driver->preclose           = nouveau_preclose;
-       dev->driver->lastclose          = nouveau_lastclose;
-       dev->driver->irq_preinstall     = nouveau_irq_preinstall;
-       dev->driver->irq_postinstall    = nouveau_irq_postinstall;
-       dev->driver->irq_uninstall      = nouveau_irq_uninstall;
-       dev->driver->irq_handler        = nouveau_irq_handler;
-
-       dev->driver->ioctls             = nouveau_ioctls;
-       dev->driver->max_ioctl          = nouveau_max_ioctl;
-
-       dev->driver->name               = DRIVER_NAME;
-       dev->driver->desc               = DRIVER_DESC;
-       dev->driver->date               = DRIVER_DATE;
-       dev->driver->major              = DRIVER_MAJOR;
-       dev->driver->minor              = DRIVER_MINOR;
-       dev->driver->patchlevel         = DRIVER_PATCHLEVEL;
-}
-
-static int
-nouveau_probe(device_t kdev)
-{
-       int vendor;
-
-       if (pci_get_class(kdev) == PCIC_DISPLAY) {
-               vendor = pci_get_vendor(kdev);
-               if (vendor == 0x10de) {
-
-                       const char *ident;
-                       char model[64];
-
-                       if (pci_get_vpd_ident(kdev, &ident) == 0) {
-                               snprintf(model, 64, "%s", ident);
-                               device_set_desc_copy(kdev, model);
-                               DRM_DEBUG("VPD : %s\n", model);
-                       }
-
-                       return drm_probe(kdev, nouveau_pciidlist);
-               }
-       }
-       return ENXIO;
-}
-
-static int
-nouveau_attach(device_t kdev)
-{
-       struct drm_device *dev = device_get_softc(kdev);
-
-       dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
-           M_WAITOK | M_ZERO);
-
-       nouveau_configure(dev);
-
-       return drm_attach(kdev, nouveau_pciidlist);
-}
-
-static int
-nouveau_detach(device_t kdev)
-{
-       struct drm_device *dev = device_get_softc(kdev);
-       int ret;
-
-       ret = drm_detach(kdev);
-
-       free(dev->driver, DRM_MEM_DRIVER);
-
-       return ret;
-}
-
-static device_method_t nouveau_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         nouveau_probe),
-       DEVMETHOD(device_attach,        nouveau_attach),
-       DEVMETHOD(device_detach,        nouveau_detach),
-
-       { 0, 0 }
-};
-
-static driver_t nouveau_driver = {
-#if __FreeBSD_version >= 700010
-       "drm",
-#else
-       "drmsub",
-#endif
-       nouveau_methods,
-       sizeof(struct drm_device)
-};
-
-extern devclass_t drm_devclass;
-#if __FreeBSD_version >= 700010
-DRIVER_MODULE(nouveau, vgapci, nouveau_driver, drm_devclass, 0, 0);
-#else
-DRIVER_MODULE(nouveau, agp, nouveau_driver, drm_devclass, 0, 0);
-#endif
-MODULE_DEPEND(nouveau, drm, 1, 1, 1);
diff -r a01501ce4714 -r cfe362e01165 sys/external/bsd/drm/dist/bsd-core/nouveau_sgdma.c
--- a/sys/external/bsd/drm/dist/bsd-core/nouveau_sgdma.c        Thu Sep 13 22:12:35 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-#include "drmP.h"
-#include "nouveau_drv.h"
-
-#define NV_CTXDMA_PAGE_SHIFT 12
-#define NV_CTXDMA_PAGE_SIZE  (1 << NV_CTXDMA_PAGE_SHIFT)
-#define NV_CTXDMA_PAGE_MASK  (NV_CTXDMA_PAGE_SIZE - 1)
-
-#if 0
-struct nouveau_sgdma_be {
-       struct drm_ttm_backend backend;
-       struct drm_device *dev;
-
-       int         pages;
-       int         pages_populated;
-       dma_addr_t *pagelist;
-       int         is_bound;
-
-       unsigned int pte_start;
-};
-
-static int
-nouveau_sgdma_needs_ub_cache_adjust(struct drm_ttm_backend *be)
-{
-       return ((be->flags & DRM_BE_FLAG_BOUND_CACHED) ? 0 : 1);
-}
-
-static int
-nouveau_sgdma_populate(struct drm_ttm_backend *be, unsigned long num_pages,
-                      struct page **pages, struct page *dummy_read_page)
-{
-       struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)be;
-       int p, d, o;
-
-       DRM_DEBUG("num_pages = %ld\n", num_pages);
-
-       if (nvbe->pagelist)
-               return -EINVAL;
-       nvbe->pages    = (num_pages << PAGE_SHIFT) >> NV_CTXDMA_PAGE_SHIFT;
-       nvbe->pagelist = drm_alloc(nvbe->pages*sizeof(dma_addr_t),
-                                  DRM_MEM_PAGES);
-
-       nvbe->pages_populated = d = 0;
-       for (p = 0; p < num_pages; p++) {
-               for (o = 0; o < PAGE_SIZE; o += NV_CTXDMA_PAGE_SIZE) {
-                       struct page *page = pages[p];
-                       if (!page)
-                               page = dummy_read_page;
-#ifdef __linux__
-                       nvbe->pagelist[d] = pci_map_page(nvbe->dev->pdev,
-                                                        page, o,
-                                                        NV_CTXDMA_PAGE_SIZE,
-                                                        PCI_DMA_BIDIRECTIONAL);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
-                       if (pci_dma_mapping_error(nvbe->dev->pdev, nvbe->pagelist[d])) {
-#else
-                       if (pci_dma_mapping_error(nvbe->pagelist[d])) {
-#endif
-                               be->func->clear(be);
-                               DRM_ERROR("pci_map_page failed\n");
-                               return -EINVAL;



Home | Main Index | Thread Index | Old Index