diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2013-02-08 14:32:47 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-02-15 04:30:38 -0500 |
commit | 41907ddc1b71aaa4ef5290f46f0ec49d581d6aac (patch) | |
tree | 5cb9829dfc0753d61713246f2cd60955827b19e8 /drivers/char/agp | |
parent | d46da4377689bd938795e53c4e2fb54dbcaeea44 (diff) |
drm/i915: Fix gen2 mappable calculations
When I refactored the code initially, I forgot that gen2 uses a
different bar for the CPU mappable aperture. The agp-less code knows
nothing of generations less than 5, so we have to expand the gtt_probe
function to include the mappable base and end.
It was originally broken by me:
commit baa09f5fd8a6d033ec075355dda99a65b7f6a0f3
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Thu Jan 24 13:49:57 2013 -0800
drm/i915: Add probe and remove to the gtt ops
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index d8e7e6c9114e..207e5c36e9ec 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -1371,10 +1371,13 @@ int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, | |||
1371 | } | 1371 | } |
1372 | EXPORT_SYMBOL(intel_gmch_probe); | 1372 | EXPORT_SYMBOL(intel_gmch_probe); |
1373 | 1373 | ||
1374 | void intel_gtt_get(size_t *gtt_total, size_t *stolen_size) | 1374 | void intel_gtt_get(size_t *gtt_total, size_t *stolen_size, |
1375 | phys_addr_t *mappable_base, unsigned long *mappable_end) | ||
1375 | { | 1376 | { |
1376 | *gtt_total = intel_private.gtt_total_entries << PAGE_SHIFT; | 1377 | *gtt_total = intel_private.gtt_total_entries << PAGE_SHIFT; |
1377 | *stolen_size = intel_private.stolen_size; | 1378 | *stolen_size = intel_private.stolen_size; |
1379 | *mappable_base = intel_private.gma_bus_addr; | ||
1380 | *mappable_end = intel_private.gtt_mappable_entries << PAGE_SHIFT; | ||
1378 | } | 1381 | } |
1379 | EXPORT_SYMBOL(intel_gtt_get); | 1382 | EXPORT_SYMBOL(intel_gtt_get); |
1380 | 1383 | ||