提交 1b6064d7 编写于 作者: C Chris Wilson

agp/intel: Remove the artificial cap on stolen size

Now that the stolen memory does not also steal entries from the GTT, we
can use all the memory the BIOS set aside for the GPU.
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
上级 fe669bf8
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#define USE_PCI_DMA_API 0 #define USE_PCI_DMA_API 0
#endif #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[] = static const struct aper_size_info_fixed intel_i810_sizes[] =
{ {
{64, 16384, 4}, {64, 16384, 4},
...@@ -486,7 +483,7 @@ static unsigned int intel_gtt_stolen_entries(void) ...@@ -486,7 +483,7 @@ static unsigned int intel_gtt_stolen_entries(void)
u8 rdct; u8 rdct;
int local = 0; int local = 0;
static const int ddt[4] = { 0, 16, 32, 64 }; static const int ddt[4] = { 0, 16, 32, 64 };
unsigned int overhead_entries, stolen_entries; unsigned int overhead_entries;
unsigned int stolen_size = 0; unsigned int stolen_size = 0;
pci_read_config_word(intel_private.bridge_dev, pci_read_config_word(intel_private.bridge_dev,
...@@ -625,12 +622,7 @@ static unsigned int intel_gtt_stolen_entries(void) ...@@ -625,12 +622,7 @@ static unsigned int intel_gtt_stolen_entries(void)
} }
} }
if (!local && stolen_size > intel_max_stolen) { if (stolen_size > 0) {
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) {
dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n", dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n",
stolen_size / KB(1), local ? "local" : "stolen"); stolen_size / KB(1), local ? "local" : "stolen");
} else { } else {
...@@ -639,9 +631,7 @@ static unsigned int intel_gtt_stolen_entries(void) ...@@ -639,9 +631,7 @@ static unsigned int intel_gtt_stolen_entries(void)
stolen_size = 0; stolen_size = 0;
} }
stolen_entries = stolen_size/KB(4) - overhead_entries; return stolen_size/KB(4) - overhead_entries;
return stolen_entries;
} }
static void i965_adjust_pgetbl_size(unsigned int size_flag) static void i965_adjust_pgetbl_size(unsigned int size_flag)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册