mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 15:47:20 +02:00
added the cpu core parking/pinning settings
added the cpu core parking/pinning settings to gamemode-config.c
This commit is contained in:
parent
520dc85ac3
commit
32a0b5b636
@ -106,6 +106,9 @@ struct GameModeConfig {
|
|||||||
long nv_powermizer_mode;
|
long nv_powermizer_mode;
|
||||||
char amd_performance_level[CONFIG_VALUE_MAX];
|
char amd_performance_level[CONFIG_VALUE_MAX];
|
||||||
|
|
||||||
|
char cpu_park_cores[CONFIG_VALUE_MAX];
|
||||||
|
char cpu_pin_cores[CONFIG_VALUE_MAX];
|
||||||
|
|
||||||
long require_supervisor;
|
long require_supervisor;
|
||||||
char supervisor_whitelist[CONFIG_LIST_MAX][CONFIG_VALUE_MAX];
|
char supervisor_whitelist[CONFIG_LIST_MAX][CONFIG_VALUE_MAX];
|
||||||
char supervisor_blacklist[CONFIG_LIST_MAX][CONFIG_VALUE_MAX];
|
char supervisor_blacklist[CONFIG_LIST_MAX][CONFIG_VALUE_MAX];
|
||||||
@ -296,6 +299,12 @@ static int inih_handler(void *user, const char *section, const char *name, const
|
|||||||
} else if (strcmp(name, "amd_performance_level") == 0) {
|
} else if (strcmp(name, "amd_performance_level") == 0) {
|
||||||
valid = get_string_value(value, self->values.amd_performance_level);
|
valid = get_string_value(value, self->values.amd_performance_level);
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(section, "cpu") == 0) {
|
||||||
|
if (strcmp(name, "park_cores") == 0) {
|
||||||
|
valid = get_string_value(value, self->values.cpu_park_cores);
|
||||||
|
} else if (strcmp(name, "pin_cores") == 0) {
|
||||||
|
valid = get_string_value(value, self->values.cpu_pin_cores);
|
||||||
|
}
|
||||||
} else if (strcmp(section, "supervisor") == 0) {
|
} else if (strcmp(section, "supervisor") == 0) {
|
||||||
/* Supervisor subsection */
|
/* Supervisor subsection */
|
||||||
if (strcmp(name, "supervisor_whitelist") == 0) {
|
if (strcmp(name, "supervisor_whitelist") == 0) {
|
||||||
@ -794,6 +803,25 @@ void config_get_amd_performance_level(GameModeConfig *self, char value[CONFIG_VA
|
|||||||
*/
|
*/
|
||||||
DEFINE_CONFIG_GET(require_supervisor)
|
DEFINE_CONFIG_GET(require_supervisor)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get various config info for cpu optimisations
|
||||||
|
*/
|
||||||
|
void config_get_cpu_park_cores(GameModeConfig *self, char value[CONFIG_VALUE_MAX])
|
||||||
|
{
|
||||||
|
memcpy_locked_config(self,
|
||||||
|
value,
|
||||||
|
&self->values.cpu_park_cores,
|
||||||
|
sizeof(self->values.cpu_park_cores));
|
||||||
|
}
|
||||||
|
|
||||||
|
void config_get_cpu_pin_cores(GameModeConfig *self, char value[CONFIG_VALUE_MAX])
|
||||||
|
{
|
||||||
|
memcpy_locked_config(self,
|
||||||
|
value,
|
||||||
|
&self->values.cpu_pin_cores,
|
||||||
|
sizeof(self->values.cpu_pin_cores));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks if the supervisor is whitelisted
|
* Checks if the supervisor is whitelisted
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user