Graham Sider
7cab3cff86
drm/amd/pm: Add vangogh throttler translation
...
Perform dependent to independent throttle status translation
for vangogh.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
f06d9511af
drm/amd/pm: Add sienna cichlid throttler translation
...
Perform dependent to independent throttle status translation
for sienna cichlid.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
64cdee43a6
drm/amd/pm: Add navi1x throttler translation
...
Perform dependent to independent throttle status translation
for navi1x.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
f6b92e3313
drm/amd/pm: Add arcturus throttler translation
...
Perform dependent to independent throttle status translation
for arcturus.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
c23083cd37
drm/amd/pm: Add common throttler translation func
...
Defines smu_cmn_get_indep_throttler_status which performs ASIC
independent translation given a corresponding lookup table.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
1049de4305
drm/amd/pm: Add ASIC independent throttle bits
...
Add new defines for thermal throttle status bits which are ASIC
independent. This bit field will be visible to userspace via
gpu_metrics alongside the previous ASIC dependent bit fields. Seperated
into four types: power throttlers (16 bits), current throttlers (16
bits), temperature (24 bits), other (8 bits).
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Graham Sider
22a7dcf580
drm/amd/pm: Add u64 throttler status field to gpu_metrics
...
This patch set adds support for a new ASIC independant u64 throttler
status field (indep_throttle_status). Piggybacks off the
gpu_metrics_v1_3 bump and similarly bumps gpu_metrics_v2 version (to
v2_2) to add field.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-10 11:44:25 -04:00
Xiaomeng Hou
2b517bd183
drm/amd/pm: fix warning reported by kernel test robot
...
Kernel test robot throws warning ->
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:483:2:
warning: variable 'member_type' is used uninitialized whenever switch
default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:487:47:
note: uninitialized use occurs here
return yellow_carp_get_smu_metrics_data(smu, member_type, value);
^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:465:2:
note: variable 'member_type' is declared here
MetricsMember_t member_type;
^
1 warning generated.
Fix this warning by return errno when the clk type is unsupported.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:14:29 -04:00
Darren Powell
90a681c5e4
amdgpu/pm: add kernel documentation for smu_get_power_limit
...
added doc tag "amdgpu_pp_power" with description
added tags for enums pp_power_limit_level, pp_power_type
added tag for function smu_get_power_limit
Test:
* Temporary insertion into Documentation/gpu/amdgpu.rst
------------START------------
Power Limit
-----------
.. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h
:doc: amdgpu_pp_power
.. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h
:identifiers: pp_power_limit_level
.. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h
:identifiers: pp_power_type
.. kernel-doc:: drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
:identifiers: smu_get_power_limit
-------------END-------------
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:14:11 -04:00
Darren Powell
dc2a8240b2
amdgpu/pm: handle return value for get_power_limit
...
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:14:03 -04:00
Darren Powell
4f9cbeb317
amdgpu/pm: modify and add smu_get_power_limit to Powerplay API
...
modify args of smu_get_power_limit to match Powerplay API .get_power_limit
add smu_get_power_limit to Powerplay API swsmu_pm_funcs
remove special handling of smu in amdgpu_hwmon_show_power_cap*
* 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 11`
HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
lspci -nn | grep "VGA\|Display" ; \
echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \
echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \
echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:13:56 -04:00
Darren Powell
04bec52127
amdgpu/pm: modify Powerplay API get_power_limit to use new pp_power enums
...
updated {amd_pm_funcs}->get_power_limit() signature
rewrote pp_get_power_limit to use new enums
pp_get_power_limit now returns -EOPNOTSUPP for unknown power limit
update calls to {amd_pm_funcs}->get_power_limit()
* Test Notes
* testing hardware was NAVI10 (tests SMU path)
** needs testing on VANGOGH
** needs testing on SMU < 11
** ie, one of
TOPAZ, FIJI, TONGA, POLARIS10, POLARIS11, POLARIS12, VEGAM, CARRIZO,
STONEY, VEGA10, VEGA12,VEGA20, RAVEN, BONAIRE, HAWAII
* 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 11`
HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
lspci -nn | grep "VGA\|Display" ; \
echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \
echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \
echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:13:49 -04:00
Darren Powell
a40a020de2
amdgpu/pm: clean up smu_get_power_limit function signature
...
add two new powerplay enums (limit_level, type)
add enums to smu_get_power_limit signature
remove input bitfield stuffing of output variable limit
update calls to smu_get_power_limit
* 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 11`
HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
lspci -nn | grep "VGA\|Display" ; \
echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \
echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \
echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:13:40 -04:00
Darren Powell
cef85a40be
amdgpu/pm: reorder definition of swsmu_pm_funcs for readability
...
Match the order of definition to the structure's declaration to
help with locating included and missing functions of the API
Signed-off-by: Darren Powell <darren.powell@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-08 12:13:25 -04:00
Xiaomeng Hou
203ed53f65
drm/amd/pm: disable manually setting MCLK power level on yellow carp
...
PMFW provides specific messages for setting fclk freq range thus adjust
the power level. There's misusing of these messages when setting
dpm mclk. Since actually mclk could adjust automatically complying with
fclk, remove standalone support for mclk dpm level setting.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:25 -04:00
Aaron Liu
7d38d9dc4e
drm/amdgpu: add mode2 reset support for yellow carp
...
This patch adds mode2 reset support for yellow carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:24 -04:00
Xiaomeng Hou
6c83a0151b
drm/amd/pm: add set_performance_level function for yellow carp
...
This patch enables editing sysfs file power_dpm_force_performance_level
for yellow carp. User could thus adjust the dpm forced level.
v2: enable fine grain control of GFXCLK only when in manual performance
level mode. In other mode, the min/max range of GFXCLK will be reset to
corresponding values.
Ex: To enable min 300MHz / max 600MHz gfx clocks
1) echo manual > /sys/bus/pci/devices/.../power_dpm_force_performance_level
2) echo s 0 300 > /sys/bus/pci/devices/.../pp_od_clk_voltage
3) echo s 1 600 > /sys/bus/pci/devices/.../pp_od_clk_voltage
4) echo c > /sys/bus/pci/devices/.../pp_od_clk_voltage
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:24 -04:00
Xiaomeng Hou
9df5b9bd8b
drm/amd/pm: add the interface to dump smu metrics table for yellow carp
...
This patch is to add the interface to dump smu metrics table for yellow
carp.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:23 -04:00
Xiaomeng Hou
bd8dcea93a
drm/amd/pm: add callbacks to read/write sysfs file pp_power_profile_mode
...
Implement the sysfs API for getting/setting pp_power_profile_mode for
yellow carp.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:23 -04:00
Xiaomeng Hou
40954754f7
drm/amd/pm: add callback get_dpm_ultimate_freq for yellow carp
...
Add callback function to get the hard frequency range of a clock domain
for yellow carp.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:23 -04:00
Xiaomeng Hou
3df43e65e7
drm/amd/pm: add callback to get bootup values for yellow carp
...
Add get_vbios_bootup_values function to get the bootup values for yellow
carp.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:22 -04:00
Aaron Liu
907b3436f1
drm/amd/pm: add PrepareMp1ForUnload support for yellow carp
...
Driver needs to notify the PMFW when the RLC is disabled.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:22 -04:00
Xiaomeng Hou
a06370edff
drm/amd/pm: add callback force_clk_levels for yellow carp
...
Implement the sysfs API to set a range of allowed DPM levels for
specific clock domain.
v2: return error directly if the specified clock type not supported
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:21 -04:00
Xiaomeng Hou
0b8b1c4d1a
drm/amd/pm: initialize feature_enabled/feature_support bitmap for yellow carp
...
Initialize the feature_enabled and feature_supported bitmap for yellow
carp.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:21 -04:00
Xiaomeng Hou
2f6888afde
drm/amd/pm: implement is_dpm_running() callback for yellow carp
...
Implement function to check if DPM is running for yellow carp.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:21 -04:00
Xiaomeng Hou
d70b6842bd
drm/amd/pm: add feature map for yellow carp
...
Add feature map for yellow carp.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:21 -04:00
Xiaomeng Hou
a831bafa00
drm/amd/pm: add support to get dpm clock value for yellow carp
...
Implement the sysfs API for getting values of pp dpm
clocks(pp_dpm_socclk/mclk/fclk/vclk/dclk) for yellow carp.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:20 -04:00
Xiaomeng Hou
d54e9e70f5
drm/amd/pm: add the fine grain tuning function for yellow carp
...
Use the pp_od_clk_voltage sysfs file to configure the min and max value
of gfx clock frequency or to restore the default values.
Command guide:
echo "s level value" > pp_od_clk_voltage
"s" - set the sclk frequency
"level" - 0 or 1, "0" represents the min value, "1" represents
the max value
"value" - the target value of sclk frequency, it should be
limited in the safe range
echo "r" > pp_od_clk_voltage
"r" - reset the sclk frequency, restore the default value
echo "c" > pp_od_clk_voltage
"c" - commit the min and max value of sclk frequency to the
system only after the commit command, the setting target values
by "s" command will take effect
Example:
1) check the default sclk frequency
$ cat pp_od_clk_voltage
OD_SCLK:
0: 200Mhz
1: 600Mhz
OD_RANGE:
SCLK: 200MHz 600MHz
2) use "s" -- set command to configure the min or max sclk frequency
$ echo "s 0 300" > pp_od_clk_voltage
$ echo "s 1 500" > pp_od_clk_voltage
$ echo "c" > pp_od_clk_voltage
$ cat pp_od_clk_voltage
OD_SCLK:
0: 300Mhz
1: 500Mhz
OD_RANGE:
SCLK: 200MHz 600MHz
3) use "r" -- reset command to restore the min and max sclk frequency
$ echo "r" > pp_od_clk_voltage
$ echo "c" > pp_od_clk_voltage
$ cat pp_od_clk_voltage
OD_SCLK:
0: 200Mhz
1: 600Mhz
OD_RANGE:
SCLK: 200MHz 600MHz
v2: modify the description of reset command usage - need to do "commit"
after set the restore command
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:20 -04:00
Xiaomeng Hou
4cea0fc981
drm/amd/pm: add set_watermarks_table function for yellow carp
...
Add callback function set_watermarks_table for yellow carp.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:20 -04:00
Xiaomeng Hou
77755dd32e
drm/amd/pm: add read_sensor function for yellow carp
...
Add callback function read_sensor for yellow carp.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:19 -04:00
Aaron Liu
c16e87d6f4
drm/amdgpu/pm: support smu_post_init for yellow carp
...
Add smu_post_init support for yellow carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:18 -04:00
Huang Rui
3975cd8f7c
drm/amd/pm: add vcn/jepg enable functions for yellow carp
...
This patch is to add vcn/jepg enable functions to power up/down them
with smu messages. VCN/JEPG are poweroff by default.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:17 -04:00
Aaron Liu
a885bea764
drm/amdgpu/pm: enable gfx_off in yellow carp smu post init
...
Enable gfx_off in smu_late_init for yellow carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:15 -04:00
Aaron Liu
999dc9c520
drm/amdgpu/pm: add gfx_off_control for yellow carp
...
This patch implements gfx_off_control.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:15 -04:00
Aaron Liu
647f007937
drm/amdgpu/pm: enable smu_hw_init for yellow carp
...
This patch is to enable smu_hw_init for yellow carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:15 -04:00
Aaron Liu
e44510e24e
drm/amdgpu/pm: add set_driver_table_location implementation for yellow carp
...
This patch adds set_driver_table_location implementation for yellow
carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:13 -04:00
Aaron Liu
94adc46fb0
drm/amdgpu/pm: set_pp_feature is unsupport for yellow carp
...
For yellow carp, SMU firmware just only supports get_pp_feature.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:13 -04:00
Aaron Liu
120a6db472
drm/amdgpu: add smu ip block for yellow carp(V3)
...
Yellow carp smu ip version: 13_0_1.
V2: rename smu_v13_0 to smu_v13_0_1.
V3: reuse smu_v13_0 with aldebaran.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:11 -04:00
Aaron Liu
b4bc9f10c7
drm/amd/pm: partially enable swsmu for yellow carp(V2)
...
This patch is to partially enable swSMU for yellow carp for the moment.
V2: rename smu_v13_0 to smu_v13_0_1.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:11 -04:00
Aaron Liu
f50740be5e
drm/amd/pm: add yellow_carp_ppt implementation(V3)
...
yellow_carp_ppt is swsmu layer 2 code for yellow carp.
V2: rename smu_v13_0 to smu_v13_0_1
V3: cleanup code.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:10 -04:00
Aaron Liu
20761d0a79
drm/amd/pm: add smu13 ip support for moment(V3)
...
For supporting yellow carp, we need to add smu13 ip
support for the moment.
V2: add smu_v13_0_1.c|h dedicated for apu.
V3: cleanup code.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:10 -04:00
Aaron Liu
e1aeab8a21
drm/amdgpu/pm: add smu v13.0.1 smc header for yellow carp (v2)
...
This patch is to add smu v13.0.1 smc header for yellow carp.
v2: squash in updates (Alex)
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:10 -04:00
Aaron Liu
52dfd6c47e
drm/amdgpu/pm: add smu v13.0.1 firmware header for yellow carp (V4)
...
This patch is to add smu v13.0.1 firmware header for yellow carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:09 -04:00
Aaron Liu
385bb92fdc
drm/admgpu/pm: add smu v13 driver interface header for yellow carp (v3)
...
This patch is to add smu v13 driver interface header for yellow carp.
v2: squash in updates (Alex)
v3: squash in v69.29.0 update (Alex)
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:09 -04:00
Gustavo A. R. Silva
fe9bb984b5
drm/amd/pm: Fix fall-through warning for Clang
...
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:03:04 -04:00
Lijo Lazar
9fd4781b58
drm/amd/pm: Use generic BACO function for smu11 ASICs
...
Remove ASIC specific functions for BACO support check. Use generic smu11
function instead.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:02:33 -04:00
Lijo Lazar
52a9fd7bc0
drm/amd/pm: Add VF check to BACO support check
...
For smuv11, check for VF also during BACO check.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:02:27 -04:00
Lijo Lazar
458020dd4f
drm/amd/pm: Read BIF STRAP also for BACO check
...
Avoid reading BIF STRAP each time for BACO capability. Read the STRAP
value while checking BACO capability in PPTable.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:02:22 -04:00
Lijo Lazar
ff05bb18e1
drm/amd/pm: Remove BACO check for aldebaran
...
BACO/MACO is not applicable for aldebaran. Remove the redundant check.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 16:02:13 -04:00
Sathishkumar S
30d95a37f4
drm/amdgpu: attr to control SS2.0 bias level (v2)
...
add sysfs attr to read/write smartshift bias level.
document smartshift_bias sysfs attr.
V2: add attr to amdgpu_device_attrs and use attr_update (Lijo)
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-06-04 12:40:00 -04:00