diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 25d64224cdbb..9e3939db76e8 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -312,6 +312,17 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, | |||
312 | pci_read_config_dword(agp, 0x10, &aper_low); | 312 | pci_read_config_dword(agp, 0x10, &aper_low); |
313 | pci_read_config_dword(agp, 0x14, &aper_hi); | 313 | pci_read_config_dword(agp, 0x14, &aper_hi); |
314 | aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); | 314 | aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); |
315 | |||
316 | /* | ||
317 | * On some sick chips APSIZE is 0. This means it wants 4G | ||
318 | * so let double check that order, and lets trust the AMD NB settings | ||
319 | */ | ||
320 | if (aper + (32ULL<<(20 + order)) > 0x100000000ULL) { | ||
321 | printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n", | ||
322 | 32 << order); | ||
323 | order = nb_order; | ||
324 | } | ||
325 | |||
315 | printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); | 326 | printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); |
316 | if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order)) | 327 | if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order)) |
317 | return -1; | 328 | return -1; |