summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-03-23 21:34:23 -0700
committerKenneth Graunke <[email protected]>2017-04-10 14:31:32 -0700
commitb97bcf3b6b6fcc66fcfedc4fd21315f69ddd7796 (patch)
treee976103c083a8000d1013f19b2f11dff3be578f3 /src
parentc28691ab77d432a3351539dd6eca81b53620d4d4 (diff)
i965/drm: Assume aperture size query will work.
This query has been available since 2.6.28. We require 3.6. Reviewed-by: Chris Wilson <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_bufmgr_gem.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
index 440ec16de38..339e2034b06 100644
--- a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
+++ b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
@@ -3024,21 +3024,8 @@ drm_bacon_bufmgr_gem_init(int fd, int batch_size)
}
memclear(aperture);
- ret = drmIoctl(bufmgr->fd,
- DRM_IOCTL_I915_GEM_GET_APERTURE,
- &aperture);
-
- if (ret == 0)
- bufmgr->gtt_size = aperture.aper_available_size;
- else {
- fprintf(stderr, "DRM_IOCTL_I915_GEM_APERTURE failed: %s\n",
- strerror(errno));
- bufmgr->gtt_size = 128 * 1024 * 1024;
- fprintf(stderr, "Assuming %dkB available aperture size.\n"
- "May lead to reduced performance or incorrect "
- "rendering.\n",
- (int)bufmgr->gtt_size / 1024);
- }
+ drmIoctl(bufmgr->fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
+ bufmgr->gtt_size = aperture.aper_available_size;
bufmgr->pci_device = get_pci_device_id(bufmgr);