[PlanetCCRMA] NVIDIA 1.0-6111 - latest kernel support

Shayne O'Connor forums@machinehasnoagenda.com
Mon Mar 7 12:58:01 2005


This is a multi-part message in MIME format.
--------------020709050101060700080407
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

i know there was an attempt a couple of months ago to build a 2.6.10 (?)
kernel that restored backwards compatibility for the NVIDIA binary
drivers ... from what i remember, it didn't work, though :(

the problem for me with the NVIDIA drivers is this:

1) the most recent driver (6629) has patches available to make it work
on newer kernels - however, there is a known bug with this driver and my
card (GeForce MX 4000) that makes it unusable.

2) the driver before that (6111) *does* work with this card, but doesn't
compile properly on newer kernels.

in a perfect world, i would just go back to using a 2.6.8 kernel, but
seeing as i use my computer mainly for audio, that's not really an
option (the latest CCRMA edge kernel has given me a rock-solid stable
audio production environment).

fernando, i'm not sure if this is the kernel patch you used when trying
to help us NVIDIA users out before, but if not, is there any chance you
could build a version of the latest kernel that applies this patch?
(that is, if there are others sharing my predicament).

apparently there is a new driver release due out soon that fixes these
problems, but it's been *so* long, and i need that 3d acceleration to
run Mixxx properly.

thanx

shayne

--------------020709050101060700080407
Content-Type: text/x-patch;
 name="nvidia_6111-6629_compat2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="nvidia_6111-6629_compat2.diff"

Index: linux-2.6.11-ck1/arch/i386/mm/init.c
===================================================================
--- linux-2.6.11-ck1.orig/arch/i386/mm/init.c	2005-03-02 20:51:41.000000000 +1100
+++ linux-2.6.11-ck1/arch/i386/mm/init.c	2005-03-02 20:54:44.000000000 +1100
@@ -41,6 +41,7 @@
 #include <asm/sections.h>
 
 unsigned int __VMALLOC_RESERVE = 128 << 20;
+EXPORT_SYMBOL(__VMALLOC_RESERVE);
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 unsigned long highstart_pfn, highend_pfn;
Index: linux-2.6.11-ck1/drivers/pci/search.c
===================================================================
--- linux-2.6.11-ck1.orig/drivers/pci/search.c	2005-03-02 20:51:41.000000000 +1100
+++ linux-2.6.11-ck1/drivers/pci/search.c	2005-03-02 20:54:44.000000000 +1100
@@ -346,6 +346,19 @@ exit:
 }
 
 /**
+ * pci_find_class - begin or continue searching for a PCI device by class
+ * @class: search for a PCI device with this class designation
+ * @from: Previous PCI device found in search, or %NULL for new search.
+ *
+ * Deprecated - please use pci_get_class. This is provided only for
+ * compatibility with nVidia GPU kernel driver.
+ */
+struct pci_dev *pci_find_class(unsigned int class, struct pci_dev *from)
+{
+	return pci_get_class(class, from);
+}
+
+/**
  * pci_dev_present - Returns 1 if device matching the device list is present, 0 if not.
  * @ids: A pointer to a null terminated list of struct pci_device_id structures
  * that describe the type of PCI device the caller is trying to find.
@@ -386,3 +399,4 @@ EXPORT_SYMBOL(pci_get_device);
 EXPORT_SYMBOL(pci_get_subsys);
 EXPORT_SYMBOL(pci_get_slot);
 EXPORT_SYMBOL(pci_get_class);
+EXPORT_SYMBOL(pci_find_class);
Index: linux-2.6.11-ck1/include/linux/pci.h
===================================================================
--- linux-2.6.11-ck1.orig/include/linux/pci.h	2005-03-02 20:51:41.000000000 +1100
+++ linux-2.6.11-ck1/include/linux/pci.h	2005-03-02 20:54:44.000000000 +1100
@@ -767,6 +767,7 @@ struct pci_dev *pci_get_subsys (unsigned
 				struct pci_dev *from);
 struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
 struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
+struct pci_dev *pci_find_class (unsigned int class, struct pci_dev *from);
 int pci_dev_present(const struct pci_device_id *ids);
 
 int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
@@ -933,6 +934,9 @@ unsigned int ss_vendor, unsigned int ss_
 static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from)
 { return NULL; }
 
+static inline struct pci_dev *pci_find_class(unsigned int class, struct pci_dev *from)
+{ return NULL; }
+
 #define pci_dev_present(ids)	(0)
 #define pci_dev_put(dev)	do { } while (0)
 
Index: linux-2.6.11-ck1/mm/mmap.c
===================================================================
--- linux-2.6.11-ck1.orig/mm/mmap.c	2005-03-02 20:51:41.000000000 +1100
+++ linux-2.6.11-ck1/mm/mmap.c	2005-03-02 20:54:44.000000000 +1100
@@ -1113,7 +1113,8 @@ out:	
 	__vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
 	if (vm_flags & VM_LOCKED) {
 		mm->locked_vm += len >> PAGE_SHIFT;
-		make_pages_present(addr, addr + len);
+		if (!(vm_flags & VM_IO))
+			make_pages_present(addr, addr + len);
 	}
 	if (flags & MAP_POPULATE) {
 		up_write(&mm->mmap_sem);

--------------020709050101060700080407--