summaryrefslogtreecommitdiff
path: root/lib/libdrm/intel/intel_bufmgr_gem.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-10-16 06:11:12 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-10-16 06:11:12 +0000
commitb1f001d8d4458cc7e6a324490ffef53aaca9a93c (patch)
tree8614e7a23dfe855a578134c9766b553a375c87b5 /lib/libdrm/intel/intel_bufmgr_gem.c
parentdbfc47a13e7838592fd16d549f2a654ebfc102bd (diff)
Merge libdrm 2.4.71
Diffstat (limited to 'lib/libdrm/intel/intel_bufmgr_gem.c')
-rw-r--r--lib/libdrm/intel/intel_bufmgr_gem.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/lib/libdrm/intel/intel_bufmgr_gem.c b/lib/libdrm/intel/intel_bufmgr_gem.c
index 93261ce97..ffb9ff3c6 100644
--- a/lib/libdrm/intel/intel_bufmgr_gem.c
+++ b/lib/libdrm/intel/intel_bufmgr_gem.c
@@ -3251,6 +3251,36 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)
return 0;
}
+int
+drm_intel_get_pooled_eu(int fd)
+{
+ drm_i915_getparam_t gp;
+ int ret = -1;
+
+ memclear(gp);
+ gp.param = I915_PARAM_HAS_POOLED_EU;
+ gp.value = &ret;
+ if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
+ return -errno;
+
+ return ret;
+}
+
+int
+drm_intel_get_min_eu_in_pool(int fd)
+{
+ drm_i915_getparam_t gp;
+ int ret = -1;
+
+ memclear(gp);
+ gp.param = I915_PARAM_MIN_EU_IN_POOL;
+ gp.value = &ret;
+ if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
+ return -errno;
+
+ return ret;
+}
+
/**
* Annotate the given bo for use in aub dumping.
*
@@ -3395,7 +3425,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
bufmgr_gem->gtt_size > 256*1024*1024) {
/* The unmappable part of gtt on gen 3 (i.e. above 256MB) can't
* be used for tiled blits. To simplify the accounting, just
- * substract the unmappable part (fixed to 256MB on all known
+ * subtract the unmappable part (fixed to 256MB on all known
* gen3 devices) if the kernel advertises it. */
bufmgr_gem->gtt_size -= 256*1024*1024;
}