mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Check i915 version at runtime
Related-To: NEO-6510 Check which prelim version is being used. Select proper IoctlHelper based on that version. If no version found, switch to upstream instead. Source of prelim headers: https://github.com/intel-gpu/drm-uapi-helper Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
abb91a7dae
commit
5a3fd1dc94
@@ -895,4 +895,18 @@ void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {
|
||||
gtSysInfo->MaxDualSubSlicesSupported = sysInfo->getMaxDualSubSlicesSupported();
|
||||
}
|
||||
|
||||
void Drm::getPrelimVersion(std::string &prelimVersion) {
|
||||
std::string sysFsPciPath = getSysFsPciPath();
|
||||
std::string prelimVersionPath = sysFsPciPath + "/prelim_uapi_version";
|
||||
|
||||
std::ifstream ifs(prelimVersionPath.c_str(), std::ifstream::in);
|
||||
|
||||
if (ifs.fail()) {
|
||||
prelimVersion = "";
|
||||
} else {
|
||||
ifs >> prelimVersion;
|
||||
}
|
||||
ifs.close();
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user