summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-11-11 10:55:34 -0800
committerIan Romanick <[email protected]>2013-11-13 14:49:26 -0800
commit9fe108db0942ebf41cd1cce0ca6a6444901fbb0a (patch)
tree1cfed5cf736a77e58876a4880255e4c78ec04757 /src/mesa
parent279e8d264109303f0e8248ab4c3703c71f65983f (diff)
i915: Use drm_intel_get_aperture_sizes instead of drmAgpSize
Send the zombie back to the grave before it infects the townsfolk. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index a10331cea0b..1ef36207e6f 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -723,9 +723,13 @@ i915_query_renderer_integer(__DRIscreen *psp, int param, int *value)
* assume that there's some fragmentation, and we start doing extra
* flushing, etc. That's the big cliff apps will care about.
*/
- const unsigned long agp_bytes = drmAgpSize(psp->fd);
+ size_t aper_size;
+ size_t mappable_size;
+
+ drm_intel_get_aperture_sizes(psp->fd, &mappable_size, &aper_size);
+
const unsigned gpu_mappable_megabytes =
- (agp_bytes / (1024 * 1024)) * 3 / 4;
+ (aper_size / (1024 * 1024)) * 3 / 4;
const long system_memory_pages = sysconf(_SC_PHYS_PAGES);
const long system_page_size = sysconf(_SC_PAGE_SIZE);