Bug 98090 - after update libdrm to 2.4.71 beignet stopped compiling (drm_intel_get_min_eu_in_pool)
Summary: after update libdrm to 2.4.71 beignet stopped compiling (drm_intel_get_min_eu...
Status: RESOLVED FIXED
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Zhigang Gong
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-05 08:19 UTC by Igor Gnatenko
Modified: 2016-12-01 03:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Igor Gnatenko 2016-10-05 08:19:34 UTC
/builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.c: In function 'intel_update_device_info':
/builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.c:895:7: error: too many arguments to function 'drm_intel_get_pooled_eu'
   if(!drm_intel_get_pooled_eu(driver->fd, &has_pooled_eu) && has_pooled_eu)
       ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.h:56:0,
                 from /builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.c:60:
/usr/include/libdrm/intel_bufmgr.h:276:5: note: declared here
 int drm_intel_get_pooled_eu(int fd);
     ^~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.c:901:25: error: too many arguments to function 'drm_intel_get_min_eu_in_pool'
   if (has_pooled_eu && !drm_intel_get_min_eu_in_pool(driver->fd, &min_eu)) {
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.h:56:0,
                 from /builddir/build/BUILD/Beignet-1.2.0-Source/src/intel/intel_driver.c:60:
/usr/include/libdrm/intel_bufmgr.h:277:5: note: declared here
 int drm_intel_get_min_eu_in_pool(int fd);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Igor Gnatenko 2016-10-05 08:29:07 UTC
diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
index f503b55..484346c 100644
--- a/src/intel/intel_driver.c
+++ b/src/intel/intel_driver.c
@@ -957,14 +957,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




I think something like this should fix bug.
Comment 2 Xiuli Pan 2016-12-01 03:14:13 UTC
Hi Igor,

It seems the patch is also in mail-list and merged in master. I will close this bug.

Thanks
Xiuli


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.