Remove i915 structs from MemoryInfo

Use structs defined in ioctl_helper.h instead of
i915 dependent ones to avoid conflicts between
different kernels

Related-To: NEO-6149

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-12-17 13:26:04 +00:00
committed by Compute-Runtime-Automation
parent dfe2be6e1a
commit 2647d563c7
17 changed files with 173 additions and 114 deletions

View File

@@ -40,7 +40,7 @@ ze_result_t LinuxMemoryImp::getBandwidth(zes_mem_bandwidth_t *pBandwidth) {
}
ze_result_t LinuxMemoryImp::getState(zes_mem_state_t *pState) {
std::vector<drm_i915_memory_region_info> deviceRegions;
std::vector<NEO::MemoryRegion> deviceRegions;
if (pDrm->queryMemoryInfo() == false) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
@@ -50,12 +50,12 @@ ze_result_t LinuxMemoryImp::getState(zes_mem_state_t *pState) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
for (auto region : memoryInfo->getDrmRegionInfos()) {
if (region.region.memory_class == I915_MEMORY_CLASS_DEVICE) {
if (region.region.memoryClass == I915_MEMORY_CLASS_DEVICE) {
deviceRegions.push_back(region);
}
}
pState->free = deviceRegions[subdeviceId].unallocated_size;
pState->size = deviceRegions[subdeviceId].probed_size;
pState->free = deviceRegions[subdeviceId].unallocatedSize;
pState->size = deviceRegions[subdeviceId].probedSize;
pState->health = ZES_MEM_HEALTH_OK;
return ZE_RESULT_SUCCESS;