[linux-audio-user] Re: linux-audio-user Digest, Vol 16, Issue 110

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

 



On Tue, 25 Jan 2005 18:56:26 +1100
"Shayne O'Connor" <forums@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> 2.6.9 - i'm pretty sure this is where nvidia video drivers stopped
> working for me. i've been able to compile and load the 6629 drivers on
> >= 2.6.9, but .... let me tell you - it doesn't do anything *good* for
> video acceleration ... a black screen and a few icons is all it can
> manage on the latest kernels :(
> 
> have a look at the nvidia forums - everyone's basically camping out for
> the next release ... until then, i wouldn't bother with them on a kernel
> after 2.6.8.
> 
> that said, a number of people *do* seem to have gotten them to work - is
> it worth the pain and heartache though? no.

Hi,

i kinda got them to work on 

2.6.11-rc1-V0.7.35-00

I needed two patches called:

NVIDIA_kernel-1.0-6629-1165235.diff.txt

and 

NVIDIA_kernel-1.0-6629-1171869.diff.txt

(attached)

With these patches applied i got a black screen which was cured by
adding:

Option          "NvAGP" "2"

to this section of my XF86Config-4:

Section "Device"
        Identifier      "Generic Video Card"
#       Driver          "nv"
        Driver          "nvidia"
        Option          "NvAGP" "2"
EndSection

This makes 2D ops a bit slower than usually, but i can frag again :)

Have fun
Flo

-- 
Palimm Palimm!
http://affenbande.org/~tapas/
-------------- next part --------------
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 */
-------------- next part --------------
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;

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux