aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/agp/intel-gtt.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 6cb80189743e..e8ea6825822c 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -203,13 +203,11 @@ static int intel_i810_fetch_size(void)
203 return 0; 203 return 0;
204 } 204 }
205 if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) { 205 if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) {
206 agp_bridge->previous_size = 206 agp_bridge->current_size = (void *) (values + 1);
207 agp_bridge->current_size = (void *) (values + 1);
208 agp_bridge->aperture_size_idx = 1; 207 agp_bridge->aperture_size_idx = 1;
209 return values[1].size; 208 return values[1].size;
210 } else { 209 } else {
211 agp_bridge->previous_size = 210 agp_bridge->current_size = (void *) (values);
212 agp_bridge->current_size = (void *) (values);
213 agp_bridge->aperture_size_idx = 0; 211 agp_bridge->aperture_size_idx = 0;
214 return values[0].size; 212 return values[0].size;
215 } 213 }
@@ -825,7 +823,7 @@ static int intel_i830_fetch_size(void)
825 if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB && 823 if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB &&
826 agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) { 824 agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) {
827 /* 855GM/852GM/865G has 128MB aperture size */ 825 /* 855GM/852GM/865G has 128MB aperture size */
828 agp_bridge->previous_size = agp_bridge->current_size = (void *) values; 826 agp_bridge->current_size = (void *) values;
829 agp_bridge->aperture_size_idx = 0; 827 agp_bridge->aperture_size_idx = 0;
830 return values[0].size; 828 return values[0].size;
831 } 829 }
@@ -833,11 +831,11 @@ static int intel_i830_fetch_size(void)
833 pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 831 pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl);
834 832
835 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { 833 if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
836 agp_bridge->previous_size = agp_bridge->current_size = (void *) values; 834 agp_bridge->current_size = (void *) values;
837 agp_bridge->aperture_size_idx = 0; 835 agp_bridge->aperture_size_idx = 0;
838 return values[0].size; 836 return values[0].size;
839 } else { 837 } else {
840 agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1); 838 agp_bridge->current_size = (void *) (values + 1);
841 agp_bridge->aperture_size_idx = 1; 839 agp_bridge->aperture_size_idx = 1;
842 return values[1].size; 840 return values[1].size;
843 } 841 }
@@ -1202,7 +1200,6 @@ static int intel_i9xx_fetch_size(void)
1202 for (i = 0; i < num_sizes; i++) { 1200 for (i = 0; i < num_sizes; i++) {
1203 if (aper_size == intel_i830_sizes[i].size) { 1201 if (aper_size == intel_i830_sizes[i].size) {
1204 agp_bridge->current_size = intel_i830_sizes + i; 1202 agp_bridge->current_size = intel_i830_sizes + i;
1205 agp_bridge->previous_size = agp_bridge->current_size;
1206 return aper_size; 1203 return aper_size;
1207 } 1204 }
1208 } 1205 }