Commit b1c5b0f8 authored by Chris Wilson's avatar Chris Wilson

agp/intel: Remove redundant setting of gtt_mappable_entries

Two calls enter, only one will leave.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 819f3fb7
...@@ -774,18 +774,17 @@ static unsigned int intel_gtt_total_entries(void) ...@@ -774,18 +774,17 @@ static unsigned int intel_gtt_total_entries(void)
static unsigned int intel_gtt_mappable_entries(void) static unsigned int intel_gtt_mappable_entries(void)
{ {
unsigned int aperture_size; unsigned int aperture_size;
u16 gmch_ctrl;
aperture_size = 1024 * 1024; if (INTEL_GTT_GEN == 2) {
u16 gmch_ctrl;
pci_read_config_word(intel_private.bridge_dev, pci_read_config_word(intel_private.bridge_dev,
I830_GMCH_CTRL, &gmch_ctrl); I830_GMCH_CTRL, &gmch_ctrl);
if (INTEL_GTT_GEN == 2) {
if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M) if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M)
aperture_size *= 64; aperture_size = MB(64);
else else
aperture_size *= 128; aperture_size = MB(128);
} else { } else {
/* 9xx supports large sizes, just look at the length */ /* 9xx supports large sizes, just look at the length */
aperture_size = pci_resource_len(intel_private.pcidev, 2); aperture_size = pci_resource_len(intel_private.pcidev, 2);
...@@ -799,8 +798,6 @@ static int intel_gtt_init(void) ...@@ -799,8 +798,6 @@ static int intel_gtt_init(void)
u32 gtt_map_size; u32 gtt_map_size;
int ret; int ret;
intel_private.base.gtt_mappable_entries = intel_gtt_mappable_entries();
ret = intel_private.driver->setup(); ret = intel_private.driver->setup();
if (ret != 0) if (ret != 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment