[Beignet] [PATCH] Fix build with latest libdrm

Armin K krejzi at email.com
Wed Oct 5 14:31:26 UTC 2016


libdrm-2.4.71 contains drm_intel_get_pooled_eu and
drm_intel_get_min_eu_in_pool with different
signatures.

Signed-off-by: Armin K <krejzi at email.com>
---
 src/intel/intel_driver.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
index f503b55..f690f69 100644
--- a/src/intel/intel_driver.c
+++ b/src/intel/intel_driver.c
@@ -958,13 +958,16 @@ intel_update_device_info(cl_device_id device)
 #ifdef HAS_POOLED_EU
   /* BXT pooled eu, 3*6 to 2*9, like sub slice count is 2 */
   unsigned int has_pooled_eu = 0;
-  if(!drm_intel_get_pooled_eu(driver->fd, &has_pooled_eu) && has_pooled_eu)
+  if (drm_intel_get_pooled_eu(driver->fd) >= 0) {
     device->sub_slice_count = 2;
+    has_pooled_eu = 1;
+  }
 
 #ifdef HAS_MIN_EU_IN_POOL
-  unsigned int min_eu;
+  int min_eu;
   /* for fused down 2x6 devices, beignet don't support. */
-  if (has_pooled_eu && !drm_intel_get_min_eu_in_pool(driver->fd, &min_eu)) {
+  if (has_pooled_eu) {
+    min_eu = drm_intel_get_min_eu_in_pool(driver->fd);
     assert(min_eu == 9); //don't support fuse down device.
   }
 #endif //HAS_MIN_EU_IN_POOL
-- 
2.10.0



More information about the Beignet mailing list