aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r--drivers/char/agp/intel-gtt.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index d7207e8092ab..6eb64c19af0e 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -782,20 +782,14 @@ static unsigned int intel_gtt_mappable_entries(void)
782 pci_read_config_word(intel_private.bridge_dev, 782 pci_read_config_word(intel_private.bridge_dev,
783 I830_GMCH_CTRL, &gmch_ctrl); 783 I830_GMCH_CTRL, &gmch_ctrl);
784 784
785 switch (intel_private.pcidev->device) { 785 if (INTEL_GTT_GEN == 2) {
786 case PCI_DEVICE_ID_INTEL_82830_CGC:
787 case PCI_DEVICE_ID_INTEL_82845G_IG:
788 case PCI_DEVICE_ID_INTEL_82855GM_IG:
789 case PCI_DEVICE_ID_INTEL_82865_IG:
790 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M) 786 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M)
791 aperture_size *= 64; 787 aperture_size *= 64;
792 else 788 else
793 aperture_size *= 128; 789 aperture_size *= 128;
794 break; 790 } else {
795 default:
796 /* 9xx supports large sizes, just look at the length */ 791 /* 9xx supports large sizes, just look at the length */
797 aperture_size = pci_resource_len(intel_private.pcidev, 2); 792 aperture_size = pci_resource_len(intel_private.pcidev, 2);
798 break;
799 } 793 }
800 794
801 return aperture_size >> PAGE_SHIFT; 795 return aperture_size >> PAGE_SHIFT;