diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-15 06:32:18 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-30 17:22:53 -0500 |
commit | e12a2d53ae45a69aea499b64f75e7222cca0f12f (patch) | |
tree | aa636f33e9f51b17ed62a821b9872e58d80f8f52 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 9e8944ab564f2e3dde90a518cd32048c58918608 (diff) |
drm/i915: Fix detection of base of stolen memory
The routine to query the base of stolen memory was using the wrong
registers and the wrong encodings on virtually every platform.
It was not until the G33 refresh, that a PCI config register was
introduced that explicitly said where the stolen memory was. Prior to
865G there was not even a register that said where the end of usable
low memory was and where the stolen memory began (or ended depending
upon chipset). Before then, one has to look at the BIOS memory maps to
find the Top of Memory. Alas that is not exported by arch/x86 and so we
have to resort to disabling stolen memory on gen2 for the time being.
Then SandyBridge enlarged the PCI register to a full 32-bits and change
the encoding of the address, so even though we happened to be querying
the right register, we read the wrong bits and ended up using address 0
for our stolen data, i.e. notably FBC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 31ab43b79736..21360a7e2c8f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -765,6 +765,7 @@ typedef struct drm_i915_private { | |||
765 | unsigned long gtt_start; | 765 | unsigned long gtt_start; |
766 | unsigned long gtt_mappable_end; | 766 | unsigned long gtt_mappable_end; |
767 | unsigned long gtt_end; | 767 | unsigned long gtt_end; |
768 | unsigned long stolen_base; /* limited to low memory (32-bit) */ | ||
768 | 769 | ||
769 | struct io_mapping *gtt_mapping; | 770 | struct io_mapping *gtt_mapping; |
770 | phys_addr_t gtt_base_addr; | 771 | phys_addr_t gtt_base_addr; |