mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
fix: Update canControl field based on set Request Support
Related-to: NEO-11443 Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c51329d098
commit
0136ef049a
@@ -147,7 +147,7 @@ ze_result_t LinuxPowerImp::getLimits(zes_power_sustained_limit_t *pSustained, ze
|
||||
|
||||
ze_result_t LinuxPowerImp::setLimits(const zes_power_sustained_limit_t *pSustained, const zes_power_burst_limit_t *pBurst, const zes_power_peak_limit_t *pPeak) {
|
||||
ze_result_t result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
if ((!isSubdevice) && (pSysmanProductHelper->isPowerSetLimitSupported())) {
|
||||
if (canControl) {
|
||||
uint64_t val = 0;
|
||||
|
||||
if (pSustained != nullptr) {
|
||||
@@ -238,7 +238,7 @@ ze_result_t LinuxPowerImp::getLimitsExt(uint32_t *pCount, zes_power_limit_ext_de
|
||||
|
||||
ze_result_t LinuxPowerImp::setLimitsExt(uint32_t *pCount, zes_power_limit_ext_desc_t *pSustained) {
|
||||
ze_result_t result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
if ((!isSubdevice) && (pSysmanProductHelper->isPowerSetLimitSupported())) {
|
||||
if (canControl) {
|
||||
uint64_t val = 0;
|
||||
for (uint32_t i = 0; i < *pCount; i++) {
|
||||
if (pSustained[i].level == ZES_POWER_LEVEL_SUSTAINED) {
|
||||
@@ -296,7 +296,7 @@ bool LinuxPowerImp::isPowerModuleSupported() {
|
||||
if (isIntelGraphicsHwmonDir(name)) {
|
||||
intelGraphicsHwmonDir = hwmonDir + "/" + tempHwmonDirEntry;
|
||||
hwmonDirExists = true;
|
||||
canControl = isSubdevice ? false : true;
|
||||
canControl = (!isSubdevice) && (pSysmanProductHelper->isPowerSetLimitSupported());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user