diff --git a/src/amdgpu.cpp b/src/amdgpu.cpp index 0f28feac..5b8bc84c 100644 --- a/src/amdgpu.cpp +++ b/src/amdgpu.cpp @@ -250,7 +250,7 @@ void amdgpu_metrics_polling_thread() { } } -void amdgpu_get_metrics(){ +void amdgpu_get_metrics(uint32_t deviceID){ static bool init = false; if (!init){ std::thread(amdgpu_metrics_polling_thread).detach(); @@ -264,7 +264,12 @@ void amdgpu_get_metrics(){ gpu_info.MemClock = amdgpu_common_metrics.current_uclk_mhz; // Use hwmon instead, see gpu.cpp - // gpu_info.CoreClock = amdgpu_common_metrics.current_gfxclk_mhz; + if ( deviceID == 0x1435 || deviceID == 0x163f ) + { + // If we are on VANGOGH (Steam Deck), then + // always use use core clock from GPU metrics. + gpu_info.CoreClock = amdgpu_common_metrics.current_gfxclk_mhz; + } // gpu_info.temp = amdgpu_common_metrics.gpu_temp_c; gpu_info.apu_cpu_power = amdgpu_common_metrics.average_cpu_power_w; gpu_info.apu_cpu_temp = amdgpu_common_metrics.apu_cpu_temp_c; diff --git a/src/amdgpu.h b/src/amdgpu.h index 54e56036..71e975b0 100644 --- a/src/amdgpu.h +++ b/src/amdgpu.h @@ -193,7 +193,7 @@ struct amdgpu_common_metrics { }; bool amdgpu_verify_metrics(const std::string& path); -void amdgpu_get_metrics(); +void amdgpu_get_metrics(uint32_t deviceID); extern std::string metrics_path; extern std::condition_variable amdgpu_c; extern bool amdgpu_run_thread; diff --git a/src/overlay.cpp b/src/overlay.cpp index ec192bd8..4f98bd28 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -130,7 +130,7 @@ void update_hw_info(const struct overlay_params& params, uint32_t vendorID) getAmdGpuInfo(); #ifdef __linux__ if (gpu_metrics_exists) - amdgpu_get_metrics(); + amdgpu_get_metrics(deviceID); #endif if (vendorID == 0x10de) getNvidiaGpuInfo(params);