1 =========================================== 1 =========================================== 2 GPU Power/Thermal Controls and Monitoring 2 GPU Power/Thermal Controls and Monitoring 3 =========================================== 3 =========================================== 4 4 5 HWMON Interfaces 5 HWMON Interfaces 6 ================ 6 ================ 7 7 8 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 8 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 9 :doc: hwmon 9 :doc: hwmon 10 10 11 GPU sysfs Power State Interfaces 11 GPU sysfs Power State Interfaces 12 ================================ 12 ================================ 13 13 14 GPU power controls are exposed via sysfs files 14 GPU power controls are exposed via sysfs files. 15 15 16 power_dpm_state 16 power_dpm_state 17 --------------- 17 --------------- 18 18 19 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 19 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 20 :doc: power_dpm_state 20 :doc: power_dpm_state 21 21 22 power_dpm_force_performance_level 22 power_dpm_force_performance_level 23 --------------------------------- 23 --------------------------------- 24 24 25 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 25 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 26 :doc: power_dpm_force_performance_level 26 :doc: power_dpm_force_performance_level 27 27 28 pp_table 28 pp_table 29 -------- 29 -------- 30 30 31 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 31 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 32 :doc: pp_table 32 :doc: pp_table 33 33 34 pp_od_clk_voltage 34 pp_od_clk_voltage 35 ----------------- 35 ----------------- 36 36 37 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 37 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 38 :doc: pp_od_clk_voltage 38 :doc: pp_od_clk_voltage 39 39 40 pp_dpm_* 40 pp_dpm_* 41 -------- 41 -------- 42 42 43 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 43 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 44 :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk 44 :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie 45 45 46 pp_power_profile_mode 46 pp_power_profile_mode 47 --------------------- 47 --------------------- 48 48 49 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 49 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 50 :doc: pp_power_profile_mode 50 :doc: pp_power_profile_mode 51 51 52 pm_policy << 53 --------------------- << 54 << 55 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ << 56 :doc: pm_policy << 57 << 58 \*_busy_percent 52 \*_busy_percent 59 --------------- 53 --------------- 60 54 61 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 55 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 62 :doc: gpu_busy_percent 56 :doc: gpu_busy_percent 63 57 64 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 58 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 65 :doc: mem_busy_percent 59 :doc: mem_busy_percent 66 60 67 gpu_metrics 61 gpu_metrics 68 ----------- 62 ----------- 69 63 70 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 64 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 71 :doc: gpu_metrics 65 :doc: gpu_metrics 72 66 73 fan_curve 67 fan_curve 74 --------- 68 --------- 75 69 76 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 70 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 77 :doc: fan_curve 71 :doc: fan_curve 78 72 79 acoustic_limit_rpm_threshold 73 acoustic_limit_rpm_threshold 80 ---------------------------- 74 ---------------------------- 81 75 82 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 76 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 83 :doc: acoustic_limit_rpm_threshold 77 :doc: acoustic_limit_rpm_threshold 84 78 85 acoustic_target_rpm_threshold 79 acoustic_target_rpm_threshold 86 ----------------------------- 80 ----------------------------- 87 81 88 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 82 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 89 :doc: acoustic_target_rpm_threshold 83 :doc: acoustic_target_rpm_threshold 90 84 91 fan_target_temperature 85 fan_target_temperature 92 ---------------------- 86 ---------------------- 93 87 94 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 88 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 95 :doc: fan_target_temperature 89 :doc: fan_target_temperature 96 90 97 fan_minimum_pwm 91 fan_minimum_pwm 98 --------------- 92 --------------- 99 93 100 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_ 94 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 101 :doc: fan_minimum_pwm 95 :doc: fan_minimum_pwm 102 96 103 GFXOFF 97 GFXOFF 104 ====== 98 ====== 105 99 106 GFXOFF is a feature found in most recent GPUs 100 GFXOFF is a feature found in most recent GPUs that saves power at runtime. The 107 card's RLC (RunList Controller) firmware power 101 card's RLC (RunList Controller) firmware powers off the gfx engine 108 dynamically when there is no workload on gfx o 102 dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by 109 default on supported GPUs. 103 default on supported GPUs. 110 104 111 Userspace can interact with GFXOFF through a d 105 Userspace can interact with GFXOFF through a debugfs interface (all values in 112 `uint32_t`, unless otherwise noted): 106 `uint32_t`, unless otherwise noted): 113 107 114 ``amdgpu_gfxoff`` 108 ``amdgpu_gfxoff`` 115 ----------------- 109 ----------------- 116 110 117 Use it to enable/disable GFXOFF, and to check 111 Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled:: 118 112 119 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_ 113 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff 120 01 114 01 121 115 122 - Write 0 to disable it, and 1 to enable it. 116 - Write 0 to disable it, and 1 to enable it. 123 - Read 0 means it's disabled, 1 it's enabled. 117 - Read 0 means it's disabled, 1 it's enabled. 124 118 125 If it's enabled, that means that the GPU is fr 119 If it's enabled, that means that the GPU is free to enter into GFXOFF mode as 126 needed. Disabled means that it will never ente 120 needed. Disabled means that it will never enter GFXOFF mode. 127 121 128 ``amdgpu_gfxoff_status`` 122 ``amdgpu_gfxoff_status`` 129 ------------------------ 123 ------------------------ 130 124 131 Read it to check current GFXOFF's status of a 125 Read it to check current GFXOFF's status of a GPU:: 132 126 133 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_ 127 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status 134 02 128 02 135 129 136 - 0: GPU is in GFXOFF state, the gfx engine is 130 - 0: GPU is in GFXOFF state, the gfx engine is powered down. 137 - 1: Transition out of GFXOFF state 131 - 1: Transition out of GFXOFF state 138 - 2: Not in GFXOFF state 132 - 2: Not in GFXOFF state 139 - 3: Transition into GFXOFF state 133 - 3: Transition into GFXOFF state 140 134 141 If GFXOFF is enabled, the value will be transi 135 If GFXOFF is enabled, the value will be transitioning around [0, 3], always 142 getting into 0 when possible. When it's disabl 136 getting into 0 when possible. When it's disabled, it's always at 2. Returns 143 ``-EINVAL`` if it's not supported. 137 ``-EINVAL`` if it's not supported. 144 138 145 ``amdgpu_gfxoff_count`` 139 ``amdgpu_gfxoff_count`` 146 ----------------------- 140 ----------------------- 147 141 148 Read it to get the total GFXOFF entry count at 142 Read it to get the total GFXOFF entry count at the time of query since system 149 power-up. The value is an `uint64_t` type, how 143 power-up. The value is an `uint64_t` type, however, due to firmware limitations, 150 it can currently overflow as an `uint32_t`. *O 144 it can currently overflow as an `uint32_t`. *Only supported in vangogh* 151 145 152 ``amdgpu_gfxoff_residency`` 146 ``amdgpu_gfxoff_residency`` 153 --------------------------- 147 --------------------------- 154 148 155 Write 1 to amdgpu_gfxoff_residency to start lo 149 Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to 156 get average GFXOFF residency % multiplied by 1 150 get average GFXOFF residency % multiplied by 100 during the last logging 157 interval. E.g. a value of 7854 means 78.54% of 151 interval. E.g. a value of 7854 means 78.54% of the time in the last logging 158 interval the GPU was in GFXOFF mode. *Only sup 152 interval the GPU was in GFXOFF mode. *Only supported in vangogh*
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.