sysclk: add kip editing flag

for those who don't want this feature. it's on by default
This commit is contained in:
souldbminersmwc
2025-12-14 10:14:41 -05:00
parent 03154f86b8
commit bb7f0c8f5f
3 changed files with 19 additions and 3 deletions

View File

@@ -60,6 +60,8 @@ typedef enum {
HocClkConfigValue_EnforceBoardLimit,
HocClkConfigValue_KipEditing,
KipConfigValue_custRev,
KipConfigValue_mtcConf,
KipConfigValue_hpMode,
@@ -222,6 +224,9 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
case HocClkConfigValue_EnforceBoardLimit:
return pretty ? "Enforce Board Limit" : "enforce_board_limit";
case HocClkConfigValue_KipEditing:
return pretty ? "Enable KIP Editing" : "kip_editing";
// KIP config values
case KipConfigValue_custRev:
return pretty ? "Custom Revision" : "kip_cust_rev";
@@ -375,7 +380,7 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
switch(val)
{
case SysClkConfigValue_PollingIntervalMs:
return 50ULL;
return 300ULL;
case SysClkConfigValue_TempLogIntervalMs:
case SysClkConfigValue_FreqLogIntervalMs:
case SysClkConfigValue_PowerLogIntervalMs:
@@ -401,6 +406,8 @@ static inline uint64_t sysclkDefaultConfigValue(SysClkConfigValue val)
case HocClkConfigValue_DockedGovernor:
case HocClkConfigValue_HandheldGovernor:
case HocClkConfigValue_HandheldTDP:
case HocClkConfigValue_EnforceBoardLimit:
case HocClkConfigValue_KipEditing:
return 1ULL;
case HocClkConfigValue_ThermalThrottleThreshold:
return 70ULL;
@@ -440,6 +447,7 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
case HocClkConfigValue_HandheldGovernor:
case HocClkConfigValue_HandheldTDP:
case HocClkConfigValue_EnforceBoardLimit:
case HocClkConfigValue_KipEditing:
return (input & 0x1) == input;
case KipConfigValue_custRev:

View File

@@ -336,7 +336,11 @@ void MiscGui::listUI()
addFreqButton(HocClkConfigValue_EristaMaxMemClock, nullptr, SysClkModule_MEM, emc_freq_label_e);
}
this->listElement->addItem(new tsl::elm::CategoryHeader("KIP"));
this->listElement->addItem(new tsl::elm::CategoryHeader("KIP Editing"));
addConfigToggle(HocClkConfigValue_KipEditing, nullptr);
this->listElement->addItem(new tsl::elm::CategoryHeader("KIP Settings"));
std::vector<NamedValue> autoAdjOptions = {
NamedValue("AUTO_ADJ", 0),

View File

@@ -79,7 +79,9 @@ ClockManager::ClockManager()
this->lastCsvWriteNs = 0;
this->rnxSync = new ReverseNXSync;
this->GetKipData();
if(this->config->GetConfigValue(HocClkConfigValue_KipEditing))
this->GetKipData();
}
ClockManager::~ClockManager()
@@ -587,6 +589,8 @@ void ClockManager::SetKipData() {
}
}
// I know this is very hacky, but the config system in the sysmodule doesn't really support writing
void ClockManager::GetKipData() {
std::scoped_lock lock{this->contextMutex};