Back to home page

OSCL-LXR

 
 

    


0001 ===========================================
0002  GPU Power/Thermal Controls and Monitoring
0003 ===========================================
0004 
0005 HWMON Interfaces
0006 ================
0007 
0008 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0009    :doc: hwmon
0010 
0011 GPU sysfs Power State Interfaces
0012 ================================
0013 
0014 GPU power controls are exposed via sysfs files.
0015 
0016 power_dpm_state
0017 ---------------
0018 
0019 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0020    :doc: power_dpm_state
0021 
0022 power_dpm_force_performance_level
0023 ---------------------------------
0024 
0025 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0026    :doc: power_dpm_force_performance_level
0027 
0028 pp_table
0029 --------
0030 
0031 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0032    :doc: pp_table
0033 
0034 pp_od_clk_voltage
0035 -----------------
0036 
0037 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0038    :doc: pp_od_clk_voltage
0039 
0040 pp_dpm_*
0041 --------
0042 
0043 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0044    :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
0045 
0046 pp_power_profile_mode
0047 ---------------------
0048 
0049 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0050    :doc: pp_power_profile_mode
0051 
0052 \*_busy_percent
0053 ---------------
0054 
0055 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0056    :doc: gpu_busy_percent
0057 
0058 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0059    :doc: mem_busy_percent
0060 
0061 gpu_metrics
0062 -----------
0063 
0064 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
0065    :doc: gpu_metrics
0066 
0067 GFXOFF
0068 ======
0069 
0070 GFXOFF is a feature found in most recent GPUs that saves power at runtime. The
0071 card's RLC (RunList Controller) firmware powers off the gfx engine
0072 dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
0073 default on supported GPUs.
0074 
0075 Userspace can interact with GFXOFF through a debugfs interface:
0076 
0077 ``amdgpu_gfxoff``
0078 -----------------
0079 
0080 Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
0081 
0082   $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
0083   01
0084 
0085 - Write 0 to disable it, and 1 to enable it.
0086 - Read 0 means it's disabled, 1 it's enabled.
0087 
0088 If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
0089 needed. Disabled means that it will never enter GFXOFF mode.
0090 
0091 ``amdgpu_gfxoff_status``
0092 ------------------------
0093 
0094 Read it to check current GFXOFF's status of a GPU::
0095 
0096   $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
0097   02
0098 
0099 - 0: GPU is in GFXOFF state, the gfx engine is powered down.
0100 - 1: Transition out of GFXOFF state
0101 - 2: Not in GFXOFF state
0102 - 3: Transition into GFXOFF state
0103 
0104 If GFXOFF is enabled, the value will be transitioning around [0, 3], always
0105 getting into 0 when possible. When it's disabled, it's always at 2. Returns
0106 ``-EINVAL`` if it's not supported.