mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Allow to query memory info with prelim ioctl
If prelims are supported, query memory info with specific ioctl. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
df2e31dbb0
commit
e07b27c0e2
@@ -930,4 +930,18 @@ void Drm::appendDrmContextFlags(drm_i915_gem_context_create_ext &gcc, bool isDir
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Drm::getMemoryRegions() {
|
||||
return this->query(IoctlHelper::get(this)->getMemRegionsIoctlVal(), DrmQueryItemFlags::empty);
|
||||
}
|
||||
|
||||
bool Drm::queryMemoryInfo() {
|
||||
auto dataQuery = getMemoryRegions();
|
||||
if (!dataQuery.empty()) {
|
||||
auto memRegions = IoctlHelper::get(this)->translateToMemoryRegions(dataQuery);
|
||||
this->memoryInfo.reset(new MemoryInfo(memRegions));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user