[PATCH i-g-t] tests/kms_histogram: Add check for ghe api call

Mohammed Thasleem mohammed.thasleem at intel.com
Wed Jan 8 12:46:37 UTC 2025


Check ghe algo for the function called by ghe igt while compiling.

v2: Update version check and remove warning message. (Lucas)
    Print messae at api else check. (Kamil)

Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
 meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meson.build b/meson.build
index 8b2a2a64a..6370887d6 100644
--- a/meson.build
+++ b/meson.build
@@ -199,7 +199,17 @@ endif
 
 libghe = dependency('libghe', required : false)
 if libghe.found()
+  if libghe.version().version_compare('>=0.2.0')
+
+    cc = meson.get_compiler('c')
+
+    if cc.has_function('histogram_compute_generate_data_bin', dependencies: libghe)
+      message('libghe provides the required function')
       config.set('HAVE_LIBGHE', 1)
+    else
+      message ('libghe API changed')
+    endif
+  endif
 endif
 
 build_info += 'Build Chamelium test: @0@'.format(chamelium.found())
-- 
2.43.0



More information about the igt-dev mailing list