diff options
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index fc1637c32cb1..19919ef9d661 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -39,9 +39,6 @@ | |||
39 | #define USE_PCI_DMA_API 0 | 39 | #define USE_PCI_DMA_API 0 |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | /* Max amount of stolen space, anything above will be returned to Linux */ | ||
43 | int intel_max_stolen = 32 * 1024 * 1024; | ||
44 | |||
45 | static const struct aper_size_info_fixed intel_i810_sizes[] = | 42 | static const struct aper_size_info_fixed intel_i810_sizes[] = |
46 | { | 43 | { |
47 | {64, 16384, 4}, | 44 | {64, 16384, 4}, |
@@ -486,7 +483,7 @@ static unsigned int intel_gtt_stolen_entries(void) | |||
486 | u8 rdct; | 483 | u8 rdct; |
487 | int local = 0; | 484 | int local = 0; |
488 | static const int ddt[4] = { 0, 16, 32, 64 }; | 485 | static const int ddt[4] = { 0, 16, 32, 64 }; |
489 | unsigned int overhead_entries, stolen_entries; | 486 | unsigned int overhead_entries; |
490 | unsigned int stolen_size = 0; | 487 | unsigned int stolen_size = 0; |
491 | 488 | ||
492 | pci_read_config_word(intel_private.bridge_dev, | 489 | pci_read_config_word(intel_private.bridge_dev, |
@@ -625,12 +622,7 @@ static unsigned int intel_gtt_stolen_entries(void) | |||
625 | } | 622 | } |
626 | } | 623 | } |
627 | 624 | ||
628 | if (!local && stolen_size > intel_max_stolen) { | 625 | if (stolen_size > 0) { |
629 | dev_info(&intel_private.bridge_dev->dev, | ||
630 | "detected %dK stolen memory, trimming to %dK\n", | ||
631 | stolen_size / KB(1), intel_max_stolen / KB(1)); | ||
632 | stolen_size = intel_max_stolen; | ||
633 | } else if (stolen_size > 0) { | ||
634 | dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n", | 626 | dev_info(&intel_private.bridge_dev->dev, "detected %dK %s memory\n", |
635 | stolen_size / KB(1), local ? "local" : "stolen"); | 627 | stolen_size / KB(1), local ? "local" : "stolen"); |
636 | } else { | 628 | } else { |
@@ -639,9 +631,7 @@ static unsigned int intel_gtt_stolen_entries(void) | |||
639 | stolen_size = 0; | 631 | stolen_size = 0; |
640 | } | 632 | } |
641 | 633 | ||
642 | stolen_entries = stolen_size/KB(4) - overhead_entries; | 634 | return stolen_size/KB(4) - overhead_entries; |
643 | |||
644 | return stolen_entries; | ||
645 | } | 635 | } |
646 | 636 | ||
647 | static void i965_adjust_pgetbl_size(unsigned int size_flag) | 637 | static void i965_adjust_pgetbl_size(unsigned int size_flag) |