Skip to content

Commit 175310d

Browse files
feature: Remove support for min power limit property
Max limit to be same as default power limit. Related-To: NEO-10525 Signed-off-by: Bellekallu Rajkiran <[email protected]> Source: cb924cf
1 parent 5b9e1e3 commit 175310d

File tree

10 files changed

+30
-439
lines changed

10 files changed

+30
-439
lines changed

level_zero/sysman/source/api/power/linux/sysman_os_power_imp.cpp

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,6 @@
1919
namespace L0 {
2020
namespace Sysman {
2121

22-
class LinuxPowerImp::PowerLimitRestorer : NEO::NonCopyableOrMovableClass {
23-
public:
24-
PowerLimitRestorer(L0::Sysman::SysFsAccessInterface *pSysfsAccess, std::string powerLimit) : pSysfsAccess(pSysfsAccess), powerLimit(powerLimit) {
25-
result = pSysfsAccess->read(powerLimit, powerLimitValue);
26-
}
27-
28-
~PowerLimitRestorer() {
29-
if (result == ZE_RESULT_SUCCESS) {
30-
result = pSysfsAccess->write(powerLimit, powerLimitValue);
31-
DEBUG_BREAK_IF(result != ZE_RESULT_SUCCESS);
32-
}
33-
}
34-
operator ze_result_t() const {
35-
return result;
36-
}
37-
38-
protected:
39-
ze_result_t result = ZE_RESULT_ERROR_UNINITIALIZED;
40-
SysFsAccessInterface *pSysfsAccess = nullptr;
41-
std::string powerLimit = {};
42-
uint64_t powerLimitValue = 0;
43-
};
44-
45-
std::unique_lock<std::mutex> LinuxPowerImp::obtainMutex() {
46-
return std::unique_lock<std::mutex>(this->powerLimitMutex);
47-
}
48-
4922
ze_result_t LinuxPowerImp::getProperties(zes_power_properties_t *pProperties) {
5023
pProperties->onSubdevice = isSubdevice;
5124
pProperties->subdeviceId = subdeviceId;
@@ -64,59 +37,7 @@ ze_result_t LinuxPowerImp::getProperties(zes_power_properties_t *pProperties) {
6437
return result;
6538
}
6639

67-
auto lock = this->obtainMutex();
68-
auto powerLimitRestorer = L0::Sysman::LinuxPowerImp::PowerLimitRestorer(pSysfsAccess, sustainedPowerLimit);
69-
if (powerLimitRestorer != ZE_RESULT_SUCCESS) {
70-
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s(): Failed to read %s and returning error:0x%x \n", __FUNCTION__, sustainedPowerLimit.c_str(), getErrorCode(powerLimitRestorer));
71-
return getErrorCode(powerLimitRestorer);
72-
}
73-
74-
result = getMinLimit(pProperties->minLimit);
75-
if (result != ZE_RESULT_SUCCESS) {
76-
return result;
77-
}
78-
79-
return getMaxLimit(pProperties->maxLimit);
80-
}
81-
82-
ze_result_t LinuxPowerImp::getMinLimit(int32_t &minLimit) {
83-
// Fw clamps to minimum value if power limit requested to set is less than min limit, Set to 100 micro watt to get min limit
84-
uint64_t powerLimit = 100;
85-
auto result = pSysfsAccess->write(sustainedPowerLimit, powerLimit);
86-
if (ZE_RESULT_SUCCESS != result) {
87-
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s(): Failed to write %s and returning error:0x%x \n", __FUNCTION__, sustainedPowerLimit.c_str(), getErrorCode(result));
88-
return getErrorCode(result);
89-
}
90-
91-
result = pSysfsAccess->read(sustainedPowerLimit, powerLimit);
92-
if (ZE_RESULT_SUCCESS != result) {
93-
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s(): Failed to read %s and returning error:0x%x \n", __FUNCTION__, sustainedPowerLimit.c_str(), getErrorCode(result));
94-
return getErrorCode(result);
95-
}
96-
97-
pSysmanKmdInterface->convertSysfsValueUnit(SysmanKmdInterface::milli, pSysmanKmdInterface->getNativeUnit(SysfsName::sysfsNameSustainedPowerLimit), powerLimit, powerLimit);
98-
minLimit = static_cast<int32_t>(powerLimit);
99-
100-
return result;
101-
}
102-
103-
ze_result_t LinuxPowerImp::getMaxLimit(int32_t &maxLimit) {
104-
// Fw clamps to maximum value if power limit requested to set is greater than max limit, Set to max value to get max limit
105-
uint64_t powerLimit = std::numeric_limits<int32_t>::max();
106-
auto result = pSysfsAccess->write(sustainedPowerLimit, powerLimit);
107-
if (ZE_RESULT_SUCCESS != result) {
108-
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s(): Failed to write %s and returning error:0x%x \n", __FUNCTION__, sustainedPowerLimit.c_str(), getErrorCode(result));
109-
return getErrorCode(result);
110-
}
111-
112-
result = pSysfsAccess->read(sustainedPowerLimit, powerLimit);
113-
if (ZE_RESULT_SUCCESS != result) {
114-
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s(): Failed to read %s and returning error:0x%x \n", __FUNCTION__, sustainedPowerLimit.c_str(), getErrorCode(result));
115-
return getErrorCode(result);
116-
}
117-
118-
pSysmanKmdInterface->convertSysfsValueUnit(SysmanKmdInterface::milli, pSysmanKmdInterface->getNativeUnit(SysfsName::sysfsNameSustainedPowerLimit), powerLimit, powerLimit);
119-
maxLimit = static_cast<int32_t>(powerLimit);
40+
pProperties->maxLimit = pProperties->defaultLimit;
12041

12142
return result;
12243
}

level_zero/sysman/source/api/power/linux/sysman_os_power_imp.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,16 @@ class LinuxPowerImp : public OsPower, NEO::NonCopyableOrMovableClass {
4545
SysFsAccessInterface *pSysfsAccess = nullptr;
4646
SysmanKmdInterface *pSysmanKmdInterface = nullptr;
4747
SysmanProductHelper *pSysmanProductHelper = nullptr;
48-
virtual std::unique_lock<std::mutex> obtainMutex();
4948

5049
private:
5150
std::string intelGraphicsHwmonDir = {};
5251
std::string criticalPowerLimit = {};
5352
std::string sustainedPowerLimit = {};
5453
std::string sustainedPowerLimitInterval = {};
55-
std::mutex powerLimitMutex{};
5654
bool canControl = false;
5755
bool isSubdevice = false;
5856
uint32_t subdeviceId = 0;
5957
uint32_t powerLimitCount = 0;
60-
class PowerLimitRestorer;
6158

6259
ze_result_t getErrorCode(ze_result_t result) {
6360
if (result == ZE_RESULT_ERROR_NOT_AVAILABLE) {
@@ -66,8 +63,6 @@ class LinuxPowerImp : public OsPower, NEO::NonCopyableOrMovableClass {
6663
return result;
6764
}
6865

69-
ze_result_t getMinLimit(int32_t &minLimit);
70-
ze_result_t getMaxLimit(int32_t &maxLimit);
7166
ze_result_t getDefaultLimit(int32_t &defaultLimit);
7267
};
7368
} // namespace Sysman

level_zero/sysman/test/unit_tests/sources/power/linux/mock_sysfs_power.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const std::string defaultPowerLimit("power1_rated_max");
4141
constexpr uint64_t expectedEnergyCounter = 123456785u;
4242
constexpr uint64_t expectedEnergyCounterTile0 = 123456785u;
4343
constexpr uint64_t expectedEnergyCounterTile1 = 128955785u;
44-
constexpr uint32_t mockDefaultPowerLimitVal = 300000000;
44+
constexpr uint32_t mockDefaultPowerLimitVal = 600000000;
4545
constexpr uint64_t mockMinPowerLimitVal = 300000000;
4646
constexpr uint64_t mockMaxPowerLimitVal = 600000000;
4747

level_zero/sysman/test/unit_tests/sources/power/linux/test_zes_power.cpp

Lines changed: 6 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -100,34 +100,9 @@ TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerProper
100100
EXPECT_EQ(properties.canControl, true);
101101
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
102102
EXPECT_EQ(properties.defaultLimit, static_cast<int32_t>(mockDefaultPowerLimitVal / milliFactor));
103-
EXPECT_EQ(properties.maxLimit, static_cast<int32_t>(mockMaxPowerLimitVal / milliFactor));
104-
EXPECT_EQ(properties.minLimit, static_cast<int32_t>(mockMinPowerLimitVal / milliFactor));
105-
}
106-
}
107-
108-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidMockMutexPowerImpWhenGettingPowerPropertiesThenMutexLockCounterMatchesNumberOfGetCalls) {
109-
class MockMutexPowerImp : public L0::Sysman::LinuxPowerImp {
110-
public:
111-
using L0::Sysman::LinuxPowerImp::pSysfsAccess;
112-
MockMutexPowerImp(L0::Sysman::OsSysman *pOsSysman, ze_bool_t onSubdevice, uint32_t subdeviceId) : L0::Sysman::LinuxPowerImp(pOsSysman, onSubdevice, subdeviceId) {}
113-
uint32_t mutexLockCounter = 0;
114-
std::unique_lock<std::mutex> obtainMutex() override {
115-
mutexLockCounter++;
116-
std::unique_lock<std::mutex> mutexLock = L0::Sysman::LinuxPowerImp::obtainMutex();
117-
EXPECT_TRUE(mutexLock.owns_lock());
118-
return mutexLock;
119-
}
120-
};
121-
122-
std::unique_ptr<MockMutexPowerImp> pLinuxPowerImp(new MockMutexPowerImp(pOsSysman, false, 0));
123-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
124-
125-
zes_power_properties_t properties{};
126-
uint32_t testReadCount = 0;
127-
for (uint32_t i = 0; i < testReadCount; i++) {
128-
EXPECT_EQ(ZE_RESULT_SUCCESS, pLinuxPowerImp->getProperties(&properties));
103+
EXPECT_EQ(properties.maxLimit, static_cast<int32_t>(mockDefaultPowerLimitVal / milliFactor));
104+
EXPECT_EQ(properties.minLimit, -1);
129105
}
130-
EXPECT_EQ(pLinuxPowerImp->mutexLockCounter, testReadCount);
131106
}
132107

133108
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndExtPropertiesThenCallSucceeds) {
@@ -148,8 +123,8 @@ TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerProper
148123
EXPECT_EQ(properties.canControl, true);
149124
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
150125
EXPECT_EQ(properties.defaultLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
151-
EXPECT_EQ(properties.maxLimit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
152-
EXPECT_EQ(properties.minLimit, (int32_t)(mockMinPowerLimitVal / milliFactor));
126+
EXPECT_EQ(properties.maxLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
127+
EXPECT_EQ(properties.minLimit, -1);
153128
EXPECT_EQ(extProperties.domain, ZES_POWER_DOMAIN_CARD);
154129
EXPECT_TRUE(defaultLimit.limitValueLocked);
155130
EXPECT_TRUE(defaultLimit.enabledStateLocked);
@@ -177,8 +152,8 @@ TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWithNoStypeForExtPrope
177152
EXPECT_EQ(properties.canControl, true);
178153
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
179154
EXPECT_EQ(properties.defaultLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
180-
EXPECT_EQ(properties.maxLimit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
181-
EXPECT_EQ(properties.minLimit, (int32_t)(mockMinPowerLimitVal / milliFactor));
155+
EXPECT_EQ(properties.maxLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
156+
EXPECT_EQ(properties.minLimit, -1);
182157
}
183158
}
184159

@@ -194,102 +169,6 @@ TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerProper
194169
EXPECT_EQ(properties.defaultLimit, -1);
195170
}
196171

197-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndSustainedLimitReadFailsThenFailureIsReturned) {
198-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
199-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
200-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
201-
pLinuxPowerImp->isPowerModuleSupported();
202-
203-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
204-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
205-
zes_power_properties_t properties{};
206-
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pLinuxPowerImp->getProperties(&properties));
207-
EXPECT_EQ(properties.minLimit, -1);
208-
EXPECT_EQ(properties.maxLimit, -1);
209-
}
210-
211-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndMinLimitReadFailsThenFailureIsReturned) {
212-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
213-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
214-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
215-
pLinuxPowerImp->isPowerModuleSupported();
216-
217-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
218-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
219-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
220-
zes_power_properties_t properties{};
221-
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pLinuxPowerImp->getProperties(&properties));
222-
EXPECT_EQ(properties.minLimit, -1);
223-
}
224-
225-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndMaxLimitReadFailsThenFailureIsReturned) {
226-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
227-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
228-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
229-
pLinuxPowerImp->isPowerModuleSupported();
230-
231-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
232-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
233-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_SUCCESS);
234-
pSysfsAccess->mockReadValUnsignedLongResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
235-
zes_power_properties_t properties{};
236-
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pLinuxPowerImp->getProperties(&properties));
237-
EXPECT_EQ(properties.maxLimit, -1);
238-
}
239-
240-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndSysfsWriteForMinLimitFailsThenFailureIsReturned) {
241-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
242-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
243-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
244-
pLinuxPowerImp->isPowerModuleSupported();
245-
246-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
247-
zes_power_properties_t properties{};
248-
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pLinuxPowerImp->getProperties(&properties));
249-
EXPECT_EQ(properties.minLimit, -1);
250-
}
251-
252-
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndSysfsWriteForMaxLimitFailsThenFailureIsReturned) {
253-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
254-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
255-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
256-
pLinuxPowerImp->isPowerModuleSupported();
257-
258-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_SUCCESS);
259-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
260-
zes_power_properties_t properties{};
261-
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pLinuxPowerImp->getProperties(&properties));
262-
EXPECT_EQ(properties.maxLimit, -1);
263-
}
264-
265-
HWTEST2_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerPropertiesAndSysfsWriteToOriginalLimitFailsThenVerifySustainedLimitIsMaximum, IsPVC) {
266-
std::unique_ptr<PublicLinuxPowerImp> pLinuxPowerImp(new PublicLinuxPowerImp(pOsSysman, false, 0));
267-
pLinuxPowerImp->pSysfsAccess = pSysfsAccess;
268-
pLinuxPowerImp->pPmt = static_cast<MockPowerPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
269-
pLinuxPowerImp->isPowerModuleSupported();
270-
271-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_SUCCESS);
272-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_SUCCESS);
273-
pSysfsAccess->mockWriteUnsignedResult.push_back(ZE_RESULT_ERROR_NOT_AVAILABLE);
274-
zes_power_properties_t properties{};
275-
EXPECT_EQ(ZE_RESULT_SUCCESS, pLinuxPowerImp->getProperties(&properties));
276-
277-
std::vector<zes_power_limit_ext_desc_t> allLimits(mockLimitCount);
278-
auto handles = getPowerHandles(powerHandleComponentCount);
279-
for (auto handle : handles) {
280-
ASSERT_NE(nullptr, handle);
281-
uint32_t limitCount = mockLimitCount;
282-
EXPECT_EQ(ZE_RESULT_SUCCESS, zesPowerGetLimitsExt(handle, &limitCount, allLimits.data()));
283-
for (uint32_t i = 0; i < limitCount; i++) {
284-
if (allLimits[i].level == ZES_POWER_LEVEL_SUSTAINED) {
285-
EXPECT_EQ(ZES_POWER_SOURCE_ANY, allLimits[i].source);
286-
EXPECT_EQ(ZES_LIMIT_UNIT_POWER, allLimits[i].limitUnit);
287-
EXPECT_EQ(allLimits[i].limit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
288-
}
289-
}
290-
}
291-
}
292-
293172
TEST_F(SysmanDevicePowerFixtureI915, GivenValidPowerHandleWhenGettingPowerEnergyCounterFailedWhenHwmonInterfaceExistThenValidErrorCodeReturned) {
294173
auto handles = getPowerHandles(powerHandleComponentCount);
295174
auto subDeviceCount = pLinuxSysmanImp->getSubDeviceCount();

level_zero/sysman/test/unit_tests/sources/power/linux/test_zes_power_helper.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ TEST_F(SysmanDevicePowerMultiDeviceFixtureHelper, GivenValidPowerHandleWhenGetti
6767
} else {
6868
EXPECT_EQ(properties.canControl, true);
6969
EXPECT_EQ(properties.defaultLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
70-
EXPECT_EQ(properties.maxLimit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
71-
EXPECT_EQ(properties.minLimit, (int32_t)(mockMinPowerLimitVal / milliFactor));
70+
EXPECT_EQ(properties.maxLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
71+
EXPECT_EQ(properties.minLimit, -1);
7272
}
7373
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
7474
}
@@ -101,8 +101,8 @@ TEST_F(SysmanDevicePowerMultiDeviceFixtureHelper, GivenValidPowerHandleWhenGetti
101101
EXPECT_EQ(extProperties.domain, ZES_POWER_DOMAIN_CARD);
102102
EXPECT_EQ(defaultLimit.limit, static_cast<int32_t>(mockDefaultPowerLimitVal / milliFactor));
103103
EXPECT_EQ(properties.defaultLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
104-
EXPECT_EQ(properties.maxLimit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
105-
EXPECT_EQ(properties.minLimit, (int32_t)(mockMinPowerLimitVal / milliFactor));
104+
EXPECT_EQ(properties.maxLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
105+
EXPECT_EQ(properties.minLimit, -1);
106106
}
107107
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
108108
}
@@ -128,8 +128,8 @@ TEST_F(SysmanDevicePowerMultiDeviceFixtureHelper, GivenValidPowerHandleAndExtPro
128128
EXPECT_TRUE(properties.canControl);
129129
EXPECT_EQ(extProperties.domain, ZES_POWER_DOMAIN_CARD);
130130
EXPECT_EQ(properties.defaultLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
131-
EXPECT_EQ(properties.maxLimit, (int32_t)(mockMaxPowerLimitVal / milliFactor));
132-
EXPECT_EQ(properties.minLimit, (int32_t)(mockMinPowerLimitVal / milliFactor));
131+
EXPECT_EQ(properties.maxLimit, (int32_t)(mockDefaultPowerLimitVal / milliFactor));
132+
EXPECT_EQ(properties.minLimit, -1);
133133
}
134134
EXPECT_EQ(properties.isEnergyThresholdSupported, false);
135135
}

0 commit comments

Comments
 (0)