summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJeff McGee <jeff.mcgee@intel.com>2015-03-09 16:35:58 -0700
committerZhigang Gong <zhigang.gong@intel.com>2015-03-19 13:56:32 +0800
commit1e3346f54593e75e658c8bcb43cf84aeb092a5e6 (patch)
tree95fa9aced48628fecb2468a667c8d3ed1336ab5c /CMakeLists.txt
parent4777647052322c917a1cec7b61e91d987b783104 (diff)
downloadbeignet-1e3346f54593e75e658c8bcb43cf84aeb092a5e6.tar.gz
Query the driver directly for compute units and subslice
Values of device max compute units and max subslice obtained directly from the driver should be more accurate than our own ID-based lookup values. This is particularly important when a single device ID may encompass more than one configuration. If the driver cannot provide a valid value for the given device, we fallback on the ID-based lookup value. This query requires libdrm 2.4.60. For now we will consider the use of this query to be optional and exclude it from compilation when building against older libdrm. Later we may want to consider requiring the query or at least warning more strongly when it is not supported. v2: Make feature use conditional on libdrm version (Zhigang). Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28cb28ec..3bbc1956 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,6 +137,15 @@ IF(DRM_INTEL_FOUND)
ELSE(DRM_INTEL_VERSION VERSION_GREATER 2.4.57)
MESSAGE(STATUS "Disable userptr support")
ENDIF(DRM_INTEL_VERSION VERSION_GREATER 2.4.57)
+ IF(DRM_INTEL_VERSION VERSION_GREATER 2.4.59)
+ MESSAGE(STATUS "Enable EU total query support")
+ SET(DRM_INTEL_EU_TOTAL "enable")
+ MESSAGE(STATUS "Enable subslice total query support")
+ SET(DRM_INTEL_SUBSLICE_TOTAL "enable")
+ ELSE(DRM_INTEL_VERSION VERSION_GREATER 2.4.59)
+ MESSAGE(STATUS "Disable EU total query support")
+ MESSAGE(STATUS "Disable subslice total query support")
+ ENDIF(DRM_INTEL_VERSION VERSION_GREATER 2.4.59)
ELSE(DRM_INTEL_FOUND)
MESSAGE(FATAL_ERROR "Looking for DRM Intel (>= 2.4.52) - not found")
ENDIF(DRM_INTEL_FOUND)