提交 e1583165 编写于 作者: D Daniel Vetter 提交者: Eric Anholt

agp/intel-gtt: kill previous_size assignments

Not needed for the GTT and inconsistent: Sometimes the _new_ size
was stored there ...
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 1ca46bd1
...@@ -203,13 +203,11 @@ static int intel_i810_fetch_size(void) ...@@ -203,13 +203,11 @@ static int intel_i810_fetch_size(void)
return 0; return 0;
} }
if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) { if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) {
agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1);
agp_bridge->current_size = (void *) (values + 1);
agp_bridge->aperture_size_idx = 1; agp_bridge->aperture_size_idx = 1;
return values[1].size; return values[1].size;
} else { } else {
agp_bridge->previous_size = agp_bridge->current_size = (void *) (values);
agp_bridge->current_size = (void *) (values);
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return values[0].size; return values[0].size;
} }
...@@ -825,7 +823,7 @@ static int intel_i830_fetch_size(void) ...@@ -825,7 +823,7 @@ static int intel_i830_fetch_size(void)
if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB && if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB &&
agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) { agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) {
/* 855GM/852GM/865G has 128MB aperture size */ /* 855GM/852GM/865G has 128MB aperture size */
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return values[0].size; return values[0].size;
} }
...@@ -833,11 +831,11 @@ static int intel_i830_fetch_size(void) ...@@ -833,11 +831,11 @@ static int intel_i830_fetch_size(void)
pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl);
if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return values[0].size; return values[0].size;
} else { } else {
agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1); agp_bridge->current_size = (void *) (values + 1);
agp_bridge->aperture_size_idx = 1; agp_bridge->aperture_size_idx = 1;
return values[1].size; return values[1].size;
} }
...@@ -1202,7 +1200,6 @@ static int intel_i9xx_fetch_size(void) ...@@ -1202,7 +1200,6 @@ static int intel_i9xx_fetch_size(void)
for (i = 0; i < num_sizes; i++) { for (i = 0; i < num_sizes; i++) {
if (aper_size == intel_i830_sizes[i].size) { if (aper_size == intel_i830_sizes[i].size) {
agp_bridge->current_size = intel_i830_sizes + i; agp_bridge->current_size = intel_i830_sizes + i;
agp_bridge->previous_size = agp_bridge->current_size;
return aper_size; return aper_size;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册