From db0f8f91f344c5b040cc8ebb333f977ed3a93eca Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 4 Feb 2019 17:20:48 +0000 Subject: [PATCH] Update TODO comments --- daemon/gamemode-gpu.c | 8 +++----- daemon/gpuclockctl.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/daemon/gamemode-gpu.c b/daemon/gamemode-gpu.c index e861515..7304272 100644 --- a/daemon/gamemode-gpu.c +++ b/daemon/gamemode-gpu.c @@ -73,8 +73,6 @@ int game_mode_initialise_gpu(GameModeConfig *config, GameModeGPUInfo **info) config_get_gpu_vendor(config, &new_info->vendor); config_get_gpu_device(config, &new_info->device); - /* TODO: Detect the GPU vendor and device automatically when these aren't set */ - /* verify device ID */ if (new_info->device == -1) { LOG_ERROR( @@ -202,15 +200,15 @@ int game_mode_apply_gpu(const GameModeGPUInfo *info, bool apply) char nv_perf_level[4]; snprintf(nv_perf_level, 4, "%ld", info->nv_perf_level); - // TODO: Actually pass right arguments + // Set up our command line to pass to gpuclockctl const char *const exec_args[] = { "/usr/bin/pkexec", LIBEXECDIR "/gpuclockctl", vendor, device, "set", - apply ? core : "0", /* For now simply reset to zero */ - apply ? mem : "0", /* could in the future store default values for reset */ + apply ? core : "0", + apply ? mem : "0", info->vendor == Vendor_NVIDIA ? nv_perf_level : NULL, /* Only use this if Nvidia */ NULL, }; diff --git a/daemon/gpuclockctl.c b/daemon/gpuclockctl.c index 099cc49..d42e718 100644 --- a/daemon/gpuclockctl.c +++ b/daemon/gpuclockctl.c @@ -37,11 +37,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "gpu-control.h" // TODO -// Apply Nvidia GPU settings (CoolBits will be needed) -// Apply AMD GPU settings (Will need user changing pwm1_enable) -// Provide documentation on optimisations -// Intel? -// Gather GPU type and information automatically if possible +// Intel support - https://blog.ffwll.ch/2013/03/overclocking-your-intel-gpu-on-linux.html +// AMD - Allow setting fan speed as well +// Store baseline values with get_gpu_state to apply when leaving gamemode /* Helper to quit with usage */ static const char *usage_text =