mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-08-06 21:28:30 +02:00
Remove the nv_perf_level config option and figure it out programmatically
This also fixes the instances in testing where we don't have the nv overclock in use, but we do have the mode set Solves issues explaining the what the perf_level actually meant, and future proofs for any PR that wants to set individual perf levels
This commit is contained in:
@@ -91,7 +91,6 @@ struct GameModeConfig {
|
||||
long gpu_device;
|
||||
long nv_core_clock_mhz_offset;
|
||||
long nv_mem_clock_mhz_offset;
|
||||
long nv_perf_level;
|
||||
long nv_powermizer_mode;
|
||||
char amd_performance_level[CONFIG_VALUE_MAX];
|
||||
|
||||
@@ -257,8 +256,6 @@ static int inih_handler(void *user, const char *section, const char *name, const
|
||||
valid = get_long_value(name, value, &self->values.nv_core_clock_mhz_offset);
|
||||
} else if (strcmp(name, "nv_mem_clock_mhz_offset") == 0) {
|
||||
valid = get_long_value(name, value, &self->values.nv_mem_clock_mhz_offset);
|
||||
} else if (strcmp(name, "nv_perf_level") == 0) {
|
||||
valid = get_long_value(name, value, &self->values.nv_perf_level);
|
||||
} else if (strcmp(name, "nv_powermizer_mode") == 0) {
|
||||
valid = get_long_value(name, value, &self->values.nv_powermizer_mode);
|
||||
} else if (strcmp(name, "amd_performance_level") == 0) {
|
||||
@@ -332,8 +329,9 @@ static void load_config_files(GameModeConfig *self)
|
||||
self->values.renice = 4; /* default value of 4 */
|
||||
self->values.reaper_frequency = DEFAULT_REAPER_FREQ;
|
||||
self->values.gpu_device = -1; /* 0 is a valid device ID so use -1 to indicate no value */
|
||||
self->values.nv_perf_level = -1;
|
||||
self->values.nv_powermizer_mode = -1;
|
||||
self->values.nv_core_clock_mhz_offset = -1;
|
||||
self->values.nv_mem_clock_mhz_offset = -1;
|
||||
self->values.script_timeout = 10; /* Default to 10 seconds for scripts */
|
||||
|
||||
/*
|
||||
@@ -585,7 +583,6 @@ void config_get_apply_gpu_optimisations(GameModeConfig *self, char value[CONFIG_
|
||||
DEFINE_CONFIG_GET(gpu_device)
|
||||
DEFINE_CONFIG_GET(nv_core_clock_mhz_offset)
|
||||
DEFINE_CONFIG_GET(nv_mem_clock_mhz_offset)
|
||||
DEFINE_CONFIG_GET(nv_perf_level)
|
||||
DEFINE_CONFIG_GET(nv_powermizer_mode)
|
||||
|
||||
void config_get_amd_performance_level(GameModeConfig *self, char value[CONFIG_VALUE_MAX])
|
||||
|
Reference in New Issue
Block a user