[Mesa-dev] [PATCH 1/4] i915: Use drm_intel_get_aperture_sizes instead of drmAgpSize

Ian Romanick idr at freedesktop.org
Mon Nov 11 11:19:06 PST 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Send the zombie back to the grave before it infects the townsfolk.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: "10.0" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/drivers/dri/i915/intel_screen.c | 8 ++++++--
 1 file 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 2c309ed..5b84780 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -722,9 +722,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);
-- 
1.8.1.4



More information about the mesa-dev mailing list