fix(sysman): enables memory health indicator for supported platforms only

Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
Kulkarni, Ashwin Kumar
2024-02-26 11:30:45 +00:00
committed by Compute-Runtime-Automation
parent 798c068ed1
commit 0ebaf7e1e2
8 changed files with 177 additions and 14 deletions

View File

@@ -52,6 +52,7 @@ class SysmanProductHelper {
// Memory
virtual ze_result_t getMemoryProperties(zes_mem_properties_t *pProperties, LinuxSysmanImp *pLinuxSysmanImp, NEO::Drm *pDrm, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subDeviceId, bool isSubdevice) = 0;
virtual ze_result_t getMemoryBandwidth(zes_mem_bandwidth_t *pBandwidth, PlatformMonitoringTech *pPmt, SysmanDeviceImp *pDevice, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subdeviceId) = 0;
virtual void getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) = 0;
// Performance
virtual void getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) = 0;

View File

@@ -29,6 +29,7 @@ class SysmanProductHelperHw : public SysmanProductHelper {
// Memory
ze_result_t getMemoryProperties(zes_mem_properties_t *pProperties, LinuxSysmanImp *pLinuxSysmanImp, NEO::Drm *pDrm, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subDeviceId, bool isSubdevice) override;
ze_result_t getMemoryBandwidth(zes_mem_bandwidth_t *pBandwidth, PlatformMonitoringTech *pPmt, SysmanDeviceImp *pDevice, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subdeviceId) override;
void getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) override;
// Performance
void getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) override;

View File

@@ -92,6 +92,11 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryBandwidth(zes_mem_bandwi
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
template <PRODUCT_FAMILY gfxProduct>
void SysmanProductHelperHw<gfxProduct>::getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) {
*health = ZES_MEM_HEALTH_UNKNOWN;
}
template <PRODUCT_FAMILY gfxProduct>
void SysmanProductHelperHw<gfxProduct>::getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) {
if (performanceFactor > halfOfMaxPerformanceFactor) {

View File

@@ -190,6 +190,14 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryBandwidth(zes_mem_bandwi
return getHBMBandwidth(pBandwidth, pPmt, pDevice, pSysmanKmdInterface, subdeviceId);
}
template <>
void SysmanProductHelperHw<gfxProduct>::getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) {
*health = ZES_MEM_HEALTH_UNKNOWN;
if (pFwInterface != nullptr) {
pFwInterface->fwGetMemoryHealthIndicator(health);
}
}
template <>
void SysmanProductHelperHw<gfxProduct>::getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) {
if (performanceFactor > halfOfMaxPerformanceFactor) {