Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218026
b: refs/heads/master
c: b1c5b0f
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Sep 14, 2010
1 parent b54299c commit 27b8ceb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 819f3fb7fe349d0e6aadbd7088529ab95fe5cd9f
refs/heads/master: b1c5b0f8cc16a1d22e2e521c4236a6ceca1b2983
15 changes: 6 additions & 9 deletions trunk/drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,18 +774,17 @@ static unsigned int intel_gtt_total_entries(void)
static unsigned int intel_gtt_mappable_entries(void)
{
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,
I830_GMCH_CTRL, &gmch_ctrl);
pci_read_config_word(intel_private.bridge_dev,
I830_GMCH_CTRL, &gmch_ctrl);

if (INTEL_GTT_GEN == 2) {
if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_64M)
aperture_size *= 64;
aperture_size = MB(64);
else
aperture_size *= 128;
aperture_size = MB(128);
} else {
/* 9xx supports large sizes, just look at the length */
aperture_size = pci_resource_len(intel_private.pcidev, 2);
Expand All @@ -799,8 +798,6 @@ static int intel_gtt_init(void)
u32 gtt_map_size;
int ret;

intel_private.base.gtt_mappable_entries = intel_gtt_mappable_entries();

ret = intel_private.driver->setup();
if (ret != 0)
return ret;
Expand Down

0 comments on commit 27b8ceb

Please sign in to comment.