Add query system info on linux

Source location of DRM_I915_QUERY_HWCONFIG_TABLE
and modified intel_hwconfig_types.h:
https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/tree/intel/IGTPW_6061/

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-11-12 17:34:33 +00:00
committed by Compute-Runtime-Automation
parent 29f74a1a98
commit 23f7a908d7
18 changed files with 546 additions and 60 deletions

View File

@@ -13,6 +13,7 @@
#include "shared/source/os_interface/linux/local_memory_helper.h"
#include "shared/source/os_interface/linux/memory_info_impl.h"
#include "shared/source/os_interface/linux/sys_calls.h"
#include "shared/source/os_interface/linux/system_info_impl.h"
#include "drm_neo.h"
#include "drm_query_flags.h"
@@ -102,10 +103,18 @@ bool Drm::isDebugAttachAvailable() {
}
bool Drm::querySystemInfo() {
return false;
}
auto length = 0;
void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {}
auto deviceBlobQuery = this->query(DRM_I915_QUERY_HWCONFIG_TABLE, DrmQueryItemFlags::empty, length);
auto deviceBlob = reinterpret_cast<uint32_t *>(deviceBlobQuery.get());
if (!deviceBlob) {
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stdout, "%s", "INFO: System Info query failed!\n");
return false;
}
this->systemInfo.reset(new SystemInfoImpl(deviceBlob, length));
return true;
}
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
this->cacheInfo.reset(new CacheInfoImpl());