]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia.git/commitdiff
- post 2.6.10 patchset.
authorPaweł Sikora <pluto@pld-linux.org>
Mon, 3 Jan 2005 18:46:44 +0000 (18:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    X11-driver-nvidia-1165235.patch -> 1.1
    X11-driver-nvidia-1171869.patch -> 1.1

X11-driver-nvidia-1165235.patch [new file with mode: 0644]
X11-driver-nvidia-1171869.patch [new file with mode: 0644]

diff --git a/X11-driver-nvidia-1165235.patch b/X11-driver-nvidia-1165235.patch
new file mode 100644 (file)
index 0000000..ca8b2cb
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ru usr/src/nv/nv.c usr/src/nv.1165235/nv.c
+--- usr/src/nv/nv.c    2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1165235/nv.c    2004-11-25 16:45:04.000000000 +0100
+@@ -1604,9 +1604,8 @@
+         }
+         nv_vm_list_page_count(at->page_table, at->num_pages);
+-        /* prevent the swapper from swapping it out */
+-        /* mark the memory i/o so the buffers aren't dumped on core dumps */
+-        vma->vm_flags |= (VM_LOCKED | VM_IO);
++        // mark it as IO so that we don't dump it on core dump
++        vma->vm_flags |= VM_IO;
+     }
+     /* Magic allocator */
diff --git a/X11-driver-nvidia-1171869.patch b/X11-driver-nvidia-1171869.patch
new file mode 100644 (file)
index 0000000..3fbc404
--- /dev/null
@@ -0,0 +1,41 @@
+diff -ru usr/src/nv/nv-linux.h usr/src/nv.1171869/nv-linux.h
+--- usr/src/nv/nv-linux.h      2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1171869/nv-linux.h      2004-12-03 11:34:45.000000000 +0100
+@@ -480,12 +480,22 @@
+ #define NV_PCI_RESOURCE_SIZE(dev, bar)  ((dev)->resource[(bar) - 1].end - (dev)->resource[(bar) - 1].start + 1)
+ #define NV_PCI_BUS_NUMBER(dev)        (dev)->bus->number
+-#define NV_PCI_SLOT_NUMBER(dev)       PCI_SLOT((dev)->devfn)
++#define NV_PCI_DEVFN(dev)             (dev)->devfn
++#define NV_PCI_SLOT_NUMBER(dev)       PCI_SLOT(NV_PCI_DEVFN(dev))
+ #ifdef NV_PCI_GET_CLASS_PRESENT
+ #define NV_PCI_DEV_PUT(dev)                    pci_dev_put(dev)
+ #define NV_PCI_GET_DEVICE(vendor,device,from)  pci_get_device(vendor,device,from)
+-#define NV_PCI_GET_SLOT(bus,devfn)             pci_get_slot(pci_find_bus(0,bus),devfn)
++#define NV_PCI_GET_SLOT(bus,devfn)                                       \
++   ({                                                                    \
++        struct pci_dev *__dev = NULL;                                    \
++        while ((__dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, __dev)))  \
++        {                                                                \
++            if (NV_PCI_BUS_NUMBER(__dev) == bus                          \
++                    && NV_PCI_DEVFN(__dev) == devfn) break;              \
++        }                                                                \
++        __dev;                                                           \
++    })
+ #define NV_PCI_GET_CLASS(class,from)           pci_get_class(class,from)
+ #else
+ #define NV_PCI_DEV_PUT(dev)
+diff -ru usr/src/nv/os-interface.c usr/src/nv.1171869/os-interface.c
+--- usr/src/nv/os-interface.c  2004-11-03 22:53:00.000000000 +0100
++++ usr/src/nv.1171869/os-interface.c  2004-12-03 11:34:51.000000000 +0100
+@@ -866,7 +866,8 @@
+ )
+ {
+     struct pci_dev *dev;
+-    dev = NV_PCI_GET_SLOT(bus, PCI_DEVFN(slot, function));
++    unsigned int devfn = PCI_DEVFN(slot, function);
++    dev = NV_PCI_GET_SLOT(bus, devfn);
+     if (dev) {
+         if (vendor) *vendor = dev->vendor;
+         if (device) *device = dev->device;
This page took 0.042494 seconds and 4 git commands to generate.