Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228727
b: refs/heads/master
c: 1b6064d
h: refs/heads/master
i:
  228725: a4cefb4
  228723: 78d3a13
  228719: 2a7cfd3
v: v3
  • Loading branch information
Chris Wilson committed Nov 23, 2010
1 parent 4c978bf commit 0b2ed7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 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: fe669bf88e9108b96a847385df08c9b1e98c1420
refs/heads/master: 1b6064d79b9a1c5e5aa6fcc6855f3da5e639ff73
16 changes: 3 additions & 13 deletions trunk/drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#define USE_PCI_DMA_API 0
#endif

/* Max amount of stolen space, anything above will be returned to Linux */
int intel_max_stolen = 32 * 1024 * 1024;

static const struct aper_size_info_fixed intel_i810_sizes[] =
{
{64, 16384, 4},
Expand Down Expand Up @@ -486,7 +483,7 @@ static unsigned int intel_gtt_stolen_entries(void)
u8 rdct;
int local = 0;
static const int ddt[4] = { 0, 16, 32, 64 };
unsigned int overhead_entries, stolen_entries;
unsigned int overhead_entries;
unsigned int stolen_size = 0;

pci_read_config_word(intel_private.bridge_dev,
Expand Down Expand Up @@ -625,12 +622,7 @@ static unsigned int intel_gtt_stolen_entries(void)
}
}

if (!local && stolen_size > intel_max_stolen) {
dev_info(&intel_private.bridge_dev->dev,
"detected %dK stolen memory, trimming to %dK\n",
stolen_size / KB(1), intel_max_stolen / KB(1));
stolen_size = intel_max_stolen;
} else if (stolen_size > 0) {
if (stolen_size > 0) {
dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n",
stolen_size / KB(1), local ? "local" : "stolen");
} else {
Expand All @@ -639,9 +631,7 @@ static unsigned int intel_gtt_stolen_entries(void)
stolen_size = 0;
}

stolen_entries = stolen_size/KB(4) - overhead_entries;

return stolen_entries;
return stolen_size/KB(4) - overhead_entries;
}

static void i965_adjust_pgetbl_size(unsigned int size_flag)
Expand Down

0 comments on commit 0b2ed7c

Please sign in to comment.