diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-14 14:30:13 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-14 16:13:12 -0400 |
commit | b1c5b0f8cc16a1d22e2e521c4236a6ceca1b2983 (patch) | |
tree | c9d2ae374fb56af57532bb929e0c2e1cb0be7ac7 /drivers/char/agp/intel-gtt.c | |
parent | 819f3fb7fe349d0e6aadbd7088529ab95fe5cd9f (diff) |
agp/intel: Remove redundant setting of gtt_mappable_entries
Two calls enter, only one will leave.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index dedf05dc433d..791582c73ff7 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -774,18 +774,17 @@ static unsigned int intel_gtt_total_entries(void) | |||
774 | static unsigned int intel_gtt_mappable_entries(void) | 774 | static unsigned int intel_gtt_mappable_entries(void) |
775 | { | 775 | { |
776 | unsigned int aperture_size; | 776 | unsigned int aperture_size; |
777 | u16 gmch_ctrl; | ||
778 | 777 | ||
779 | aperture_size = 1024 * 1024; | 778 | if (INTEL_GTT_GEN == 2) { |
779 | u16 gmch_ctrl; | ||
780 | 780 | ||
781 | pci_read_config_word(intel_private.bridge_dev, | 781 | pci_read_config_word(intel_private.bridge_dev, |
782 | I830_GMCH_CTRL, &gmch_ctrl); | 782 | I830_GMCH_CTRL, &gmch_ctrl); |
783 | 783 | ||
784 | if (INTEL_GTT_GEN == 2) { | ||
785 | if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M) | 784 | if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M) |
786 | aperture_size *= 64; | 785 | aperture_size = MB(64); |
787 | else | 786 | else |
788 | aperture_size *= 128; | 787 | aperture_size = MB(128); |
789 | } else { | 788 | } else { |
790 | /* 9xx supports large sizes, just look at the length */ | 789 | /* 9xx supports large sizes, just look at the length */ |
791 | aperture_size = pci_resource_len(intel_private.pcidev, 2); | 790 | aperture_size = pci_resource_len(intel_private.pcidev, 2); |
@@ -799,8 +798,6 @@ static int intel_gtt_init(void) | |||
799 | u32 gtt_map_size; | 798 | u32 gtt_map_size; |
800 | int ret; | 799 | int ret; |
801 | 800 | ||
802 | intel_private.base.gtt_mappable_entries = intel_gtt_mappable_entries(); | ||
803 | |||
804 | ret = intel_private.driver->setup(); | 801 | ret = intel_private.driver->setup(); |
805 | if (ret != 0) | 802 | if (ret != 0) |
806 | return ret; | 803 | return ret; |