Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132173
b: refs/heads/master
c: 2f68891
h: refs/heads/master
i:
  132171: b035c6a
v: v3
  • Loading branch information
Yinghai Lu authored and Linus Torvalds committed Mar 10, 2009
1 parent c686638 commit 70b4a67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a891ed5adef39aca0b7662c58a2566c7a16237e
refs/heads/master: 2f68891314b14e7e0ef07b4e77a8ea6e917fc74b
13 changes: 9 additions & 4 deletions trunk/drivers/char/agp/amd64-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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))
Expand Down

0 comments on commit 70b4a67

Please sign in to comment.