brintos

brintos / linux-shallow public Read only

0
0
Text · 4.0 KiB · 6d942b5 Raw
159 lines · plain
1===========================================2 GPU Power/Thermal Controls and Monitoring3===========================================4 5HWMON Interfaces6================7 8.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c9   :doc: hwmon10 11GPU sysfs Power State Interfaces12================================13 14GPU power controls are exposed via sysfs files.15 16power_dpm_state17---------------18 19.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c20   :doc: power_dpm_state21 22power_dpm_force_performance_level23---------------------------------24 25.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c26   :doc: power_dpm_force_performance_level27 28pp_table29--------30 31.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c32   :doc: pp_table33 34pp_od_clk_voltage35-----------------36 37.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c38   :doc: pp_od_clk_voltage39 40pp_dpm_*41--------42 43.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c44   :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie45 46pp_power_profile_mode47---------------------48 49.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c50   :doc: pp_power_profile_mode51 52pm_policy53---------------------54 55.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c56   :doc: pm_policy57 58\*_busy_percent59---------------60 61.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c62   :doc: gpu_busy_percent63 64.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c65   :doc: mem_busy_percent66 67gpu_metrics68-----------69 70.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c71   :doc: gpu_metrics72 73fan_curve74---------75 76.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c77   :doc: fan_curve78 79acoustic_limit_rpm_threshold80----------------------------81 82.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c83   :doc: acoustic_limit_rpm_threshold84 85acoustic_target_rpm_threshold86-----------------------------87 88.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c89   :doc: acoustic_target_rpm_threshold90 91fan_target_temperature92----------------------93 94.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c95   :doc: fan_target_temperature96 97fan_minimum_pwm98---------------99 100.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c101   :doc: fan_minimum_pwm102 103GFXOFF104======105 106GFXOFF is a feature found in most recent GPUs that saves power at runtime. The107card's RLC (RunList Controller) firmware powers off the gfx engine108dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by109default on supported GPUs.110 111Userspace can interact with GFXOFF through a debugfs interface (all values in112`uint32_t`, unless otherwise noted):113 114``amdgpu_gfxoff``115-----------------116 117Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::118 119  $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff120  01121 122- Write 0 to disable it, and 1 to enable it.123- Read 0 means it's disabled, 1 it's enabled.124 125If it's enabled, that means that the GPU is free to enter into GFXOFF mode as126needed. Disabled means that it will never enter GFXOFF mode.127 128``amdgpu_gfxoff_status``129------------------------130 131Read it to check current GFXOFF's status of a GPU::132 133  $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status134  02135 136- 0: GPU is in GFXOFF state, the gfx engine is powered down.137- 1: Transition out of GFXOFF state138- 2: Not in GFXOFF state139- 3: Transition into GFXOFF state140 141If GFXOFF is enabled, the value will be transitioning around [0, 3], always142getting into 0 when possible. When it's disabled, it's always at 2. Returns143``-EINVAL`` if it's not supported.144 145``amdgpu_gfxoff_count``146-----------------------147 148Read it to get the total GFXOFF entry count at the time of query since system149power-up. The value is an `uint64_t` type, however, due to firmware limitations,150it can currently overflow as an `uint32_t`. *Only supported in vangogh*151 152``amdgpu_gfxoff_residency``153---------------------------154 155Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to156get average GFXOFF residency % multiplied by 100 during the last logging157interval. E.g. a value of 7854 means 78.54% of the time in the last logging158interval the GPU was in GFXOFF mode. *Only supported in vangogh*159