summaryrefslogtreecommitdiff
path: root/src/intel
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2016-10-09 18:54:37 +0200
committerYang Rong <rong.r.yang@intel.com>2016-10-10 22:48:05 +0800
commitbba70eb5fc4e954d7ce2d2aefa7c31f83d802cf0 (patch)
tree8ce972e26f4f8c0ea3cee65488fb92effb6f9045 /src/intel
parenta6e8ab4547d58a8db3c9edca3126ecdf24d6e275 (diff)
Fix build with latest libdrm
libdrm-2.4.71 contains drm_intel_get_pooled_eu and drm_intel_get_min_eu_in_pool with different signatures. v2: - Fix conditional not to include 0. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Signed-off-by: Armin K <krejzi@email.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/intel_driver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
index 5f4afda4..cf8f8292 100644
--- a/src/intel/intel_driver.c
+++ b/src/intel/intel_driver.c
@@ -958,14 +958,14 @@ 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)
+ int has_pooled_eu;
+ if((has_pooled_eu = drm_intel_get_pooled_eu(driver->fd)) > 0)
device->sub_slice_count = 2;
#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 > 0 && (min_eu = drm_intel_get_min_eu_in_pool(driver->fd)) > 0) {
assert(min_eu == 9); //don't support fuse down device.
}
#endif //HAS_MIN_EU_IN_POOL