[Beignet] [PATCH v2] Fix build with latest libdrm
Armin K
krejzi at email.com
Sun Oct 9 16:54:37 UTC 2016
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: 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..cf35f40 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.1
More information about the Beignet
mailing list