Extend Support for memory on Sysman for iGFX

Changing from discrete to iGFX the Memory Module support.

Signed-off-by: Daniel Enriquez <daniel.enriquez.montanez@intel.com>
This commit is contained in:
Daniel Enriquez
2021-04-26 18:56:18 -07:00
committed by Compute-Runtime-Automation
parent 5291722ef1
commit 0afe6b2caa
3 changed files with 25 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -9,7 +9,21 @@
namespace L0 {
bool WddmMemoryImp::isMemoryModuleSupported() {
return pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
uint32_t value = 0;
KmdSysman::RequestProperty request;
KmdSysman::ResponseProperty response;
request.commandId = KmdSysman::Command::Get;
request.componentId = KmdSysman::Component::MemoryComponent;
request.requestId = KmdSysman::Requests::Memory::NumMemoryDomains;
if (pKmdSysManager->requestSingle(request, response) != ZE_RESULT_SUCCESS) {
return false;
}
memcpy_s(&value, sizeof(uint32_t), response.dataBuffer, sizeof(uint32_t));
return (value > 0);
}
ze_result_t WddmMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
ze_result_t status = ZE_RESULT_SUCCESS;