mirror_ubuntu-kernels/drivers/gpu/drm/amd/pm
Darren Powell c8cb19c7b2 amdgpu/pm: Add emit_clock_levels calls
(v4)
     Modifications to satisfy checkpatch --strict
   (v3)
     Rewrote patchset to order patches as (API, hw impl, usecase)

     - modified amdgpu_get_pp_od_clk_voltage to try
       amdgpu_dpm_emit_clock_levels and fallback to
       amdgpu_dpm_print_clock_levels if emit is not implemented.
     - modified amdgpu_get_pp_dpm_clock to try
       amdgpu_dpm_emit_clock_levels and fallback to
       amdgpu_dpm_print_clock_levels if emit is not implemented.
     - Newline is printed to buf if no output produced

 == Test ==
 LOGFILE=pp_clk.test.log
 AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
 AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | awk '{print $9}'`
 HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}

 lspci -nn | grep "VGA\|Display"  > $LOGFILE
 FILES="pp_od_clk_voltage
 pp_dpm_sclk
 pp_dpm_mclk
 pp_dpm_pcie
 pp_dpm_socclk
 pp_dpm_fclk
 pp_dpm_dcefclk
 pp_dpm_vclk
 pp_dpm_dclk "

 for f in $FILES
 do
   echo === $f === >> $LOGFILE
   cat $HWMON_DIR/device/$f >> $LOGFILE
 done
 cat $LOGFILE

Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-02-11 16:12:29 -05:00
..
inc drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-07 18:03:50 -05:00
legacy-dpm drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-07 18:03:50 -05:00
powerplay drm/amd: Expose the FRU SMU I2C bus 2022-01-27 15:49:48 -05:00
swsmu amdgpu/pm: Implement emit_clk_levels for navi10 2022-02-11 16:12:15 -05:00
amdgpu_dpm_internal.c drm/amd/pm: add missing prototypes to amdgpu_dpm_internal 2022-02-07 18:03:50 -05:00
amdgpu_dpm.c amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset 2022-02-02 18:27:58 -05:00
amdgpu_pm.c amdgpu/pm: Add emit_clock_levels calls 2022-02-11 16:12:29 -05:00
Makefile drm/amd/pm: relocate the power related headers 2022-01-14 17:51:14 -05:00