diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 01:29:17 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 01:29:17 +0100 |
commit | 3c1f67d60e2b4f4455563928999fd41cc653645d (patch) | |
tree | 0d58c145a05fb09167f1ab6882b474eccb1f3563 /drivers/char/agp/amd64-agp.c | |
parent | 03d78913f01e8f6599823f00357ed17b32747d3d (diff) | |
parent | 9ead64974b05501bbac0d63a47c99fa786d064ba (diff) | |
download | kernel-crypto-3c1f67d60e2b4f4455563928999fd41cc653645d.tar.gz kernel-crypto-3c1f67d60e2b4f4455563928999fd41cc653645d.tar.xz kernel-crypto-3c1f67d60e2b4f4455563928999fd41cc653645d.zip |
Merge branch 'linus' into core/locking
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 52f4361eb6e..d765afda9c2 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -271,15 +271,15 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, nb_order = (nb_order >> 1) & 7; pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base); nb_aper = nb_base << 25; - if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) { - return 0; - } /* Northbridge seems to contain crap. Try the AGP bridge. */ pci_read_config_word(agp, cap+0x14, &apsize); - if (apsize == 0xffff) + if (apsize == 0xffff) { + if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) + return 0; return -1; + } apsize &= 0xfff; /* Some BIOS use weird encodings not in the AGPv3 table. */ @@ -301,6 +301,11 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, order = nb_order; } + if (nb_order >= order) { + if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) + return 0; + } + dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) |