nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   got AGP working on K8T800 on 2.6.0 kernel! (http://www.nvnews.net/vbulletin/showthread.php?t=22996)

ulukay 01-02-04 06:30 AM

got AGP working on K8T800 on 2.6.0 kernel!
 
maybee many k8t800 user know this error messages:

dmesg:
Jan 2 12:51:09 sunnygentoo32 kernel: Linux agpgart interface v0.100 (c) Dave Jones
Jan 2 12:51:37 sunnygentoo32 kernel: agpgart: Detected AGP bridge 0
Jan 2 12:51:37 sunnygentoo32 kernel: agpgart: Too many northbridges for AGP
Jan 2 12:53:47 sunnygentoo32 kernel: nvidia: no version magic, tainting kernel.
Jan 2 12:53:47 sunnygentoo32 kernel: nvidia: module license 'NVIDIA' taints kernel.
Jan 2 12:53:47 sunnygentoo32 kernel: 0: nvidia: loading NVIDIA Linux x86 nvidia.o Kernel Module 1.0-5328 Wed Dec 17 13:54:51 PST 2003

and XF86log:
(**) NVIDIA(0): Use of AGPGART requested
(--) NVIDIA(0): Linear framebuffer at 0xB0000000
(--) NVIDIA(0): MMIO registers at 0xCE000000
(II) NVIDIA(0): NVIDIA GPU detected as: GeForce FX 5900 Ultra
(--) NVIDIA(0): VideoBIOS: 04.35.20.22.00
(--) NVIDIA(0): VideoRAM: 262144 kBytes

(WW) NVIDIA(0): Failed to verify AGP usage

sunnydale root # cat /proc/driver/nvidia/agp/status
Status: Disabled


but there is a VERY simple solution
edit your /usr/src/linux/drivers/char/agp/amd64-agp.c

search for this section:
Code:

static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
{
        struct pci_dev *loop_dev = NULL;
        int i = 0;

        /* cache pci_devs of northbridges. */
        while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
                        != NULL) {
                if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) {
                        printk(KERN_INFO PFX "No usable aperture found.\n");
#ifdef __x86_64__
                        /* should port this to i386 */
                        printk(KERN_INFO PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
#endif
                        return -1;
                }

                hammers[i++] = loop_dev;
                nr_garts = i;

                if (i == MAX_HAMMER_GARTS) {
                        printk(KERN_INFO PFX "Too many northbridges for AGP\n");
                        return -1;
                }

                      }
        return i == 0 ? -1 : 0;
}

aaaand:
move these 2 lines below the next if statement

"hammers[i++] = loop_dev;


nr_garts = i;"

so it should look like this:
Code:

static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
{
        struct pci_dev *loop_dev = NULL;
        int i = 0;

        /* cache pci_devs of northbridges. */
        while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
                        != NULL) {
                if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) {
                        printk(KERN_INFO PFX "No usable aperture found.\n");
#ifdef __x86_64__
                        /* should port this to i386 */
                        printk(KERN_INFO PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
#endif
                        return -1;
                }

                if (i == MAX_HAMMER_GARTS) {
                        printk(KERN_INFO PFX "Too many northbridges for AGP\n");
                        return -1;
                }

                hammers[i++] = loop_dev;
                nr_garts = i;

                      }
        return i == 0 ? -1 : 0;
}

now you get the following:

dmesg;
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected AGP bridge 0
agpgart: Maximum main memory to use for agp memory: 941M
agpgart: AGP aperture is 256M @ 0xd0000000

nvidia: no version magic, tainting kernel.
nvidia: module license 'NVIDIA' taints kernel.
0: nvidia: loading NVIDIA Linux x86 nvidia.o Kernel Module 1.0-5328 Wed Dec 17 13:54:51 PST 2003
agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode

XF86log:
(II) NVIDIA(0): AGP 8X successfully initialized


sunnygentoo32 root # cat /proc/driver/nvidia/agp/status
Status: Enabled
Driver: AGPGART
AGP Rate: 8x
Fast Writes: Enabled
SBA: Enabled


edit: i forgot, i configured my kernel this way:
<M> /dev/agpgart (AGP Support)
<M> AMD Opteron/Athlon64 on-CPU GART support

and i'm using "NvAgp" "2" in my XF86Config

after you changed the /usr/src/linux/drivers/char/agp/amd64-agp.c, you have to recompile your kernelo modules with
cd /usr/src/linux
make modules modules_install

whig 01-03-04 10:48 PM

Good on ya :)

Please post again when you've got it working with a pure AMD64 system (kernel, O/S, video drivers) and mixed games (i386/AMD64) as I would be interested.

BTW, what are you doing with a Riva TNT2 Vanta on an Athlon? Changed by now, surely.

elektronisch 01-03-04 10:51 PM

awesome.
not like i have a kt800 but now i might ;D

whig 01-04-04 12:45 AM

Now we all have underpowered video cards attributed to us (look on the left). How would one correct this?

ulukay 01-07-04 05:12 PM

www.kernel.org
the 2.6.1-rc2 patch should include this (and many other) agpgart fix


All times are GMT -5. The time now is 05:35 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.