1. 10 2月, 2022 1 次提交
  2. 30 12月, 2021 2 次提交
  3. 02 12月, 2021 1 次提交
    • D
      amdgpu/pm: Create shared array of power profile name strings · 3867e370
      Darren Powell 提交于
       == Description ==
       All the power profile modes use the same strings (or a subset of)
       Creating a public array of the strings will allow sharing rather than
       duplicating for each chip
       First patch only implements change for navi10, followup with other chips
      
       == Changes ==
       Create a declaration of the public array in kgd_pp_interface.h
       Define the public array in amdgpu_pm.c
       Modify the implementaiton of navi10_get_power_profile_mode to use new array
      
       == Test ==
       LOGFILE=pp_profile_strings.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_power_profile_mode "
      
       for f in $FILES
       do
         echo === $f === >> $LOGFILE
         cat $HWMON_DIR/device/$f >> $LOGFILE
       done
       cat $LOGFILE
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      3867e370
  4. 23 11月, 2021 1 次提交
  5. 04 11月, 2021 1 次提交
  6. 29 10月, 2021 1 次提交
  7. 22 10月, 2021 1 次提交
  8. 15 9月, 2021 1 次提交
  9. 01 9月, 2021 1 次提交
  10. 17 8月, 2021 3 次提交
  11. 10 8月, 2021 1 次提交
  12. 30 6月, 2021 1 次提交
    • D
      amdgpu/pm: remove code duplication in show_power_cap calls · 91161b06
      Darren Powell 提交于
       v3: updated patch to apply to latest code
       v2: reorder to check pointers before calling pm_runtime_* functions
      
       created generic function and call with enum from
       * amdgpu_hwmon_show_power_cap_max
       * amdgpu_hwmon_show_power_cap
       * amdgpu_hwmon_show_power_cap_default
      
      === Test ===
      AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
      AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10`
      HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
      
      cp pp_show_power_cap.txt{,.old}
      lspci -nn | grep "VGA\|Display" > pp_show_power_cap.test.log
      FILES="
      power1_cap
      power1_cap_max
      power1_cap_default "
      
      for f in $FILES
      do
        echo  $f = `cat $HWMON_DIR/$f` >> pp_show_power_cap.test.log
      done
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      91161b06
  13. 19 6月, 2021 1 次提交
    • D
      amdgpu/pm: replaced snprintf usage in amdgpu_pm.c with sysfs_emit · 09b6744c
      Darren Powell 提交于
       replaced snprintf usage in amdgpu_pm.c with sysfs_emit
       fixed warning on comparing int with uint32_t in amdgpu_get_pp_num_states()
      
      == Test ==
      AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
      AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10`
      HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
      
      lspci -nn | grep "VGA\|Display"  > scnprintf.test.log
      FILES="pp_num_states
      pp_od_clk_voltage
      pp_features
      pp_dpm_sclk
      pp_dpm_mclk
      pp_dpm_socclk
      pp_dpm_fclk
      pp_dpm_vclk
      pp_dpm_dclk
      pp_dpm_dcefclk
      pp_power_profile_mode "
      
      for f in $FILES
      do
        echo === $f === >> scnprintf.test.log
        cat $HWMON_DIR/device/$f >> scnprintf.test.log
      done
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      09b6744c
  14. 09 6月, 2021 4 次提交
  15. 05 6月, 2021 2 次提交
  16. 02 6月, 2021 1 次提交
  17. 11 5月, 2021 4 次提交
  18. 05 5月, 2021 1 次提交
  19. 29 4月, 2021 2 次提交
  20. 16 4月, 2021 1 次提交
  21. 10 4月, 2021 3 次提交
    • T
      drm/amd/pm: Convert sysfs sprintf/snprintf family to sysfs_emit · a9ca9bb3
      Tian Tao 提交于
      Fix the following coccicheck warning:
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:1940:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:1978:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2022:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:294:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:154:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:496:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:512:9-17: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:1740:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:1667:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2074:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2047:9-17: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2768:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2738:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2442:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3246:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3253:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2458:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3047:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3133:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3209:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3216:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2410:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2496:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2470:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2426:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2965:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:2972:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3006:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu/drm/amd/pm/amdgpu_pm.c:3013:8-16: WARNING:
      use scnprintf or sprintf
      Signed-off-by: NTian Tao <tiantao6@hisilicon.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      a9ca9bb3
    • A
      drm/amdgpu/pm: bail on sysfs/debugfs queries during platform suspend · d2ae842d
      Alex Deucher 提交于
      The GPU is in the process of being shutdown.  Spurious queries during
      suspend and resume can put the SMU into a bad state.  Runtime PM is
      handled dynamically so we check if we are in non-runtime suspend.
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      d2ae842d
    • E
      drm/amd/pm: label these APIs used internally as static · c6ce68e6
      Evan Quan 提交于
      Also drop unnecessary header file and declarations.
      Signed-off-by: NEvan Quan <evan.quan@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      c6ce68e6
  22. 24 3月, 2021 4 次提交
  23. 06 3月, 2021 1 次提交
  24. 27 2月, 2021 1 次提交
    • D
      amdgpu/pm: Powerplay API for smu , updates to some pm functions · 8f4828d0
      Darren Powell 提交于
      v3: updated to include new clocks od_vddgfx_offset, od_cclk
          Context mismatch with revision v3 to patch 0003
      
      Modified Functions
        smu_sys_set_pp_table()        - modifed signature to match Powerplay API set_pp_table
        smu_force_performance_level() - modifed arg0 to match Powerplay API force_performance_level
        smu_od_edit_dpm_table()       - modifed arg0 to match Powerplay API odn_edit_dpm_table
      
      Other Changes
        smu_od_edit_dpm_table()       - removed call to task(READJUST_POWER_STATE) after COMMIT_TABLE,
                                        now handled in calling function
        amdgpu_set_power_dpm_force_performance_level() - now checks thermal for swsmu systems before trying to change level
        amdgpu_set_pp_od_clk_voltage() - now attempts to set fine_grain_clock_vol before swsmu edit dpm table
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      8f4828d0