1c08d2f8bSYann Dirson=========================================== 2c08d2f8bSYann Dirson GPU Power/Thermal Controls and Monitoring 3c08d2f8bSYann Dirson=========================================== 4c08d2f8bSYann Dirson 5c08d2f8bSYann DirsonHWMON Interfaces 6c08d2f8bSYann Dirson================ 7c08d2f8bSYann Dirson 8c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 9c08d2f8bSYann Dirson :doc: hwmon 10c08d2f8bSYann Dirson 11c08d2f8bSYann DirsonGPU sysfs Power State Interfaces 12c08d2f8bSYann Dirson================================ 13c08d2f8bSYann Dirson 14c08d2f8bSYann DirsonGPU power controls are exposed via sysfs files. 15c08d2f8bSYann Dirson 16c08d2f8bSYann Dirsonpower_dpm_state 17c08d2f8bSYann Dirson--------------- 18c08d2f8bSYann Dirson 19c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 20c08d2f8bSYann Dirson :doc: power_dpm_state 21c08d2f8bSYann Dirson 22c08d2f8bSYann Dirsonpower_dpm_force_performance_level 23c08d2f8bSYann Dirson--------------------------------- 24c08d2f8bSYann Dirson 25c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 26c08d2f8bSYann Dirson :doc: power_dpm_force_performance_level 27c08d2f8bSYann Dirson 28c08d2f8bSYann Dirsonpp_table 29c08d2f8bSYann Dirson-------- 30c08d2f8bSYann Dirson 31c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 32c08d2f8bSYann Dirson :doc: pp_table 33c08d2f8bSYann Dirson 34c08d2f8bSYann Dirsonpp_od_clk_voltage 35c08d2f8bSYann Dirson----------------- 36c08d2f8bSYann Dirson 37c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 38c08d2f8bSYann Dirson :doc: pp_od_clk_voltage 39c08d2f8bSYann Dirson 40c08d2f8bSYann Dirsonpp_dpm_* 41c08d2f8bSYann Dirson-------- 42c08d2f8bSYann Dirson 43c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 44c08d2f8bSYann Dirson :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie 45c08d2f8bSYann Dirson 46c08d2f8bSYann Dirsonpp_power_profile_mode 47c08d2f8bSYann Dirson--------------------- 48c08d2f8bSYann Dirson 49c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 50c08d2f8bSYann Dirson :doc: pp_power_profile_mode 51c08d2f8bSYann Dirson 52*f88e570dSLijo Lazarpm_policy 53*f88e570dSLijo Lazar--------------------- 54*f88e570dSLijo Lazar 55*f88e570dSLijo Lazar.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 56*f88e570dSLijo Lazar :doc: pm_policy 57*f88e570dSLijo Lazar 58c08d2f8bSYann Dirson\*_busy_percent 59c08d2f8bSYann Dirson--------------- 60c08d2f8bSYann Dirson 61c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 62c08d2f8bSYann Dirson :doc: gpu_busy_percent 63c08d2f8bSYann Dirson 64c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 65c08d2f8bSYann Dirson :doc: mem_busy_percent 66c08d2f8bSYann Dirson 67c08d2f8bSYann Dirsongpu_metrics 68c08d2f8bSYann Dirson----------- 69c08d2f8bSYann Dirson 70c08d2f8bSYann Dirson.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 71c08d2f8bSYann Dirson :doc: gpu_metrics 727a06e125SAndré Almeida 73d7bf1b55SEvan Quanfan_curve 74d7bf1b55SEvan Quan--------- 75d7bf1b55SEvan Quan 76d7bf1b55SEvan Quan.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 77d7bf1b55SEvan Quan :doc: fan_curve 78d7bf1b55SEvan Quan 79548009adSEvan Quanacoustic_limit_rpm_threshold 80548009adSEvan Quan---------------------------- 81548009adSEvan Quan 82548009adSEvan Quan.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 83548009adSEvan Quan :doc: acoustic_limit_rpm_threshold 84548009adSEvan Quan 8547cf6fcbSEvan Quanacoustic_target_rpm_threshold 8647cf6fcbSEvan Quan----------------------------- 8747cf6fcbSEvan Quan 8847cf6fcbSEvan Quan.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 8947cf6fcbSEvan Quan :doc: acoustic_target_rpm_threshold 9047cf6fcbSEvan Quan 91eedd5a34SEvan Quanfan_target_temperature 92eedd5a34SEvan Quan---------------------- 93eedd5a34SEvan Quan 94eedd5a34SEvan Quan.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 95eedd5a34SEvan Quan :doc: fan_target_temperature 96eedd5a34SEvan Quan 979df5d008SEvan Quanfan_minimum_pwm 989df5d008SEvan Quan--------------- 999df5d008SEvan Quan 1009df5d008SEvan Quan.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 1019df5d008SEvan Quan :doc: fan_minimum_pwm 1029df5d008SEvan Quan 1037a06e125SAndré AlmeidaGFXOFF 1047a06e125SAndré Almeida====== 1057a06e125SAndré Almeida 1067a06e125SAndré AlmeidaGFXOFF is a feature found in most recent GPUs that saves power at runtime. The 1077a06e125SAndré Almeidacard's RLC (RunList Controller) firmware powers off the gfx engine 1087a06e125SAndré Almeidadynamically when there is no workload on gfx or compute pipes. GFXOFF is on by 1097a06e125SAndré Almeidadefault on supported GPUs. 1107a06e125SAndré Almeida 111e7611596SAndré AlmeidaUserspace can interact with GFXOFF through a debugfs interface (all values in 112e7611596SAndré Almeida`uint32_t`, unless otherwise noted): 1137a06e125SAndré Almeida 1147a06e125SAndré Almeida``amdgpu_gfxoff`` 1157a06e125SAndré Almeida----------------- 1167a06e125SAndré Almeida 1177a06e125SAndré AlmeidaUse it to enable/disable GFXOFF, and to check if it's current enabled/disabled:: 1187a06e125SAndré Almeida 1197a06e125SAndré Almeida $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff 1207a06e125SAndré Almeida 01 1217a06e125SAndré Almeida 1227a06e125SAndré Almeida- Write 0 to disable it, and 1 to enable it. 1237a06e125SAndré Almeida- Read 0 means it's disabled, 1 it's enabled. 1247a06e125SAndré Almeida 1257a06e125SAndré AlmeidaIf it's enabled, that means that the GPU is free to enter into GFXOFF mode as 1267a06e125SAndré Almeidaneeded. Disabled means that it will never enter GFXOFF mode. 1277a06e125SAndré Almeida 1287a06e125SAndré Almeida``amdgpu_gfxoff_status`` 1297a06e125SAndré Almeida------------------------ 1307a06e125SAndré Almeida 1317a06e125SAndré AlmeidaRead it to check current GFXOFF's status of a GPU:: 1327a06e125SAndré Almeida 1337a06e125SAndré Almeida $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status 1347a06e125SAndré Almeida 02 1357a06e125SAndré Almeida 1367a06e125SAndré Almeida- 0: GPU is in GFXOFF state, the gfx engine is powered down. 1377a06e125SAndré Almeida- 1: Transition out of GFXOFF state 1387a06e125SAndré Almeida- 2: Not in GFXOFF state 1397a06e125SAndré Almeida- 3: Transition into GFXOFF state 1407a06e125SAndré Almeida 1417a06e125SAndré AlmeidaIf GFXOFF is enabled, the value will be transitioning around [0, 3], always 1427a06e125SAndré Almeidagetting into 0 when possible. When it's disabled, it's always at 2. Returns 1437a06e125SAndré Almeida``-EINVAL`` if it's not supported. 144e7611596SAndré Almeida 145e7611596SAndré Almeida``amdgpu_gfxoff_count`` 146e7611596SAndré Almeida----------------------- 147e7611596SAndré Almeida 148e7611596SAndré AlmeidaRead it to get the total GFXOFF entry count at the time of query since system 149e7611596SAndré Almeidapower-up. The value is an `uint64_t` type, however, due to firmware limitations, 150e7611596SAndré Almeidait can currently overflow as an `uint32_t`. *Only supported in vangogh* 151e7611596SAndré Almeida 152e7611596SAndré Almeida``amdgpu_gfxoff_residency`` 153e7611596SAndré Almeida--------------------------- 154e7611596SAndré Almeida 155e7611596SAndré AlmeidaWrite 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to 156e7611596SAndré Almeidaget average GFXOFF residency % multiplied by 100 during the last logging 157e7611596SAndré Almeidainterval. E.g. a value of 7854 means 78.54% of the time in the last logging 158e7611596SAndré Almeidainterval the GPU was in GFXOFF mode. *Only supported in vangogh* 159