Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
got AGP working on K8T800 on 2.6.0 kernel!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Ulukay
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2002
Posts: 143

PostPosted: Fri Jan 02, 2004 12:28 pm    Post subject: got AGP working on K8T800 on 2.6.0 kernel! Reply with quote

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
_________________
Jeden Tag erhöht sich zwangsläufig die Anzahl derer, die mich
am Arsch lecken können... Das ist heute DEIN Tag!
Back to top
View user's profile Send private message
markfl
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 240
Location: Kent, UK

PostPosted: Fri Jan 02, 2004 12:48 pm    Post subject: Reply with quote

Congratulations, my Asus P4C800 was easy to configure, i just emerged nvidia-kernel, didnt compile agpgart and let nvidia do the work, its pretty fast and lets me game away :)

MJ
_________________
Life it seems, will fade away
Drifting further every day
Back to top
View user's profile Send private message
Config
Retired Dev
Retired Dev


Joined: 25 May 2003
Posts: 187
Location: Zurich, Switzerland

PostPosted: Sat Jan 03, 2004 11:45 am    Post subject: Reply with quote

Is there any way to use 32bit compiled opengl apps like Quake3?

Thanks
_________________
Config - caught by a chronic disease called tuxmania....
Back to top
View user's profile Send private message
Ulukay
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2002
Posts: 143

PostPosted: Wed Jan 07, 2004 11:10 pm    Post subject: Reply with quote

www.kernel.org
the 2.6.1-rc2 patch should include this (and many other) agpgart fix
_________________
Jeden Tag erhöht sich zwangsläufig die Anzahl derer, die mich
am Arsch lecken können... Das ist heute DEIN Tag!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum