Alex Deucher
a119f87b86
Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)"
...
On some boards the rpm interface apparently does not work at all
leading to the fan not spinning or spinning at strange speeds.
Revert this for now to fix 5.10, 5.11. The follow on patch
fixes this properly for 5.12.
This reverts commit 8d6e65adc2 .
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1408
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2021-01-28 13:40:24 -05:00
Evan Quan
e75a9db3c5
drm/amd/pm: bump Sienna Cichlid smu_driver_if version to match latest pmfw
...
This can suppress the annoying but unharmful prompts.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:01 -05:00
Xiaomeng Hou
fe96eb197e
drm/amd/pm: update the smu v11.5 smc header for vangogh
...
Add new PMFW message to notify RLC engine status.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Lazar Lijo <Lijo.Lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-10 16:41:50 -05:00
Evan Quan
88dfd5d5c8
drm/amd/pm: new SMC message for 2nd usb2.0 port workaround
...
The workaround is needed by sienna cichlid.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-10 16:41:49 -05:00
Evan Quan
a7e660e526
drm/amd/pm: expose the firmware_capability from firmware_info table
...
That will help to determine whether 2ND_USB20_PORT workaround is
needed for Sienna Cichlid.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-10 16:41:49 -05:00
Evan Quan
ac7804bb99
drm/amd/pm: correct the gpo control for sienna cichlid
...
New SMC message was introduced for gpo control on sienna cichlid.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-10 16:41:49 -05:00
Changfeng
f6f75ebdc0
drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven
...
When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that
it can't be able to switch to mak gpu clk during compute workload.
It needs to update WORKLOAD_PPLIB setting to fix this issue.
Signed-off-by: Changfeng <Changfeng.Zhu@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 >
2020-12-08 23:06:15 -05:00
Tao Zhou
3755ff54c5
drm/amd/pm: update driver if version for dimgrey_cavefish
...
Per PMFW 59.16.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-08 23:05:21 -05:00
Alex Deucher
e408f2ba43
drm/amdgpu/swsmu: add metrics enums for voltage
...
To be used in subsequent patches.
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-02 17:37:17 -05:00
Lee Jones
e0ef04b8d0
drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s prototype to shared header
...
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:4403:5: warning: no previous prototype for ‘vega20_hwmgr_init’ [-Wmissing-prototypes]
4403 | int vega20_hwmgr_init(struct pp_hwmgr *hwmgr)
| ^~~~~~~~~~~~~~~~~
Cc: Evan Quan <evan.quan@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:45 -05:00
Lee Jones
4cbcfd60d5
drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header
...
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:2862:5: warning: no previous prototype for ‘vega12_hwmgr_init’ [-Wmissing-prototypes]
2862 | int vega12_hwmgr_init(struct pp_hwmgr *hwmgr)
| ^~~~~~~~~~~~~~~~~
Cc: Evan Quan <evan.quan@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:45 -05:00
Lee Jones
7731653f83
drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header
...
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5696:5: warning: no previous prototype for ‘smu7_init_function_pointers’ [-Wmissing-prototypes]
5696 | int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Cc: Evan Quan <evan.quan@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:44 -05:00
Lee Jones
874f1c3f9e
drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused
...
They are used by some source files which include pp_thermal.h, but not all.
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Evan Quan <evan.quan@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:44 -05:00
Lee Jones
04d7b8fe82
drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header
...
Fixes the following W=1 kernel build warning(s):
Cc: Evan Quan <evan.quan@amd.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:44 -05:00
Lee Jones
75a8661ef4
drm/amd/pm/inc/smu_v11_0: Mark 'smu11_thermal_policy' as __maybe_unused
...
It's used in some, but not all source files which include 'smu_v11_0.h'.
Fixes the following W=1 kernel build warning(s):
In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c:36:
drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v11_0.h:61:43: warning: ‘smu11_thermal_policy’ defined but not used [-Wunused-const-variable=]
61 | static const struct smu_temperature_range smu11_thermal_policy[] =
| ^~~~~~~~~~~~~~~~~~~~
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 16:04:43 -05:00
Jiansong Chen
d503d8b81d
drm/amd/pm: update driver if version for navy_flounder
...
It's in accordance with pmfw 65.18.0 for navy_flounder.
Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-01 15:58:46 -05:00
Colin Ian King
beaff108e1
drm/amd/powerplay: fix spelling mistake "smu_state_memroy_block" -> "smu_state_memory_block"
...
The struct name smu_state_memroy_block contains a spelling mistake, rename
it to smu_state_memory_block
Fixes: 8554e67d6e ("drm/amd/powerplay: implement power_dpm_state sys interface for SMU11")
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-24 12:09:54 -05:00
Likun Gao
34d903d1a2
drm/amd/pm: update driver if file for sienna cichlid
...
Update driver if file for sienna cichlid.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-16 12:18:10 -05:00
Xiaojian Du
c98ee89736
drm/amd/pm: add the fine grain tuning function for vangogh
...
This patch is to add the fine grain tuning function for vangogh.
This function uses the pp_od_clk_voltage sysfs file to configure the min
and max value of gfx clock frequency or restore the default value.
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
instantly
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: 1400Mhz
OD_RANGE:
SCLK: 200MHz 1400MHz
2)use "s" -- set command to configure the min or max sclk frequency
$ echo "s 0 600" > pp_od_clk_voltage
$ echo "s 1 1000" > pp_od_clk_voltage
$ echo "c" > pp_od_clk_voltage
$ cat pp_od_clk_voltage
OD_SCLK:
0: 600Mhz
1: 1000Mhz
OD_RANGE:
SCLK: 200MHz 1400MHz
3)use "r" -- reset command to restore the min and max sclk frequency
$ echo "r" > pp_od_clk_voltage
$ cat pp_od_clk_voltage
OD_SCLK:
0: 200Mhz
1: 1400Mhz
OD_RANGE:
SCLK: 200MHz 1400MHz
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-16 12:17:53 -05:00
Tao Zhou
7a4894072f
drm/amd/pm: update driver if version for dimgrey_cavefish
...
Per PMFW 59.13.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 17:29:46 -05:00
Prike Liang
8279bb4ec7
drm/amd/pm: add gfx_state_change_set() for rn gfx power switch (v2)
...
The gfx_state_change_set() funtion can support set GFX power
change status to D0/D3.
v2: make sure to register callback (Alex)
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 17:29:45 -05:00
Prike Liang
d90a53d65a
drm/amdgpu: add amdgpu_gfx_state_change_set() set gfx power change entry (v2)
...
The new amdgpu_gfx_state_change_set() funtion can support set GFX power
change status to D0/D3.
v2: squash in warning fix (Alex)
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 17:29:45 -05:00
Xiaojian Du
349a328988
drm/amd/pm: update the swSMU headers for vangogh
...
This patch is to update the swSMU headers for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 00:12:51 -05:00
Xiaojian Du
fd253334a2
drm/amd/pm: add the interface to dump smu metrics table for vangogh
...
This patch is to add the interface to dump smu metrics table for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-11-13 00:12:32 -05:00
Evan Quan
e6bd6890e8
drm/amd/pm: perform SMC reset on suspend/hibernation
...
So that the succeeding resume can be performed based on
a clean state.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Tested-by: Sandeep Raghuraman <sandy.8925@gmail.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 01:00:43 -04:00
Xiaojian Du
10f279cbd7
drm/amd/pm: remove some redundant smu message mapping for vangogh
...
This patch is to remove some redundant smu message mapping for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:58:26 -04:00
Xiaojian Du
ea8ca1febd
drm/amd/pm: update the smu v11.5 driver interface header for vangogh
...
This patch is to update the smu v11.5 driver interface header for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:58:12 -04:00
Xiaojian Du
80abc31ebe
drm/amd/pm: add new smc message mapping for vangogh
...
This patch is to add new smc message mapping for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:58:01 -04:00
Xiaojian Du
767e2451e5
drm/amd/pm: update the smu v11.5 firmware header for vangogh
...
This patch is to update the smu v11.5 firmware header for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:57:55 -04:00
Xiaojian Du
1dd13b4518
drm/amd/pm: update the smu v11.5 smc header for vangogh
...
This patch is to update the smu v11.5 smc header for vangogh.
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-30 00:57:48 -04:00
Evan Quan
dba1953168
drm/amd/pm: correct Polaris DIDT configurations
...
Correct Polaris DIDT enablement.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 11:59:16 -04:00
Evan Quan
d8b61d5a0d
drm/amd/pm: correct Polaris powertune table setup
...
Correct powertune table setup for Polaris.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 11:59:10 -04:00
Evan Quan
a8588b8bb3
drm/amd/pm: correct VR shared rail info
...
Add VR shared rail info.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 11:58:57 -04:00
Evan Quan
8f0804c6b7
drm/amd/pm: add edc leakage controller setting
...
Enable edc controller table setting.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 11:58:45 -04:00
Evan Quan
9610a3bfde
drm/amd/pm: setup zero rpm parameters for polaris10
...
Only if the ZeroRPM feature is supported.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 11:58:39 -04:00
Tao Zhou
34c0631bbd
drm/amd/pm: update driver if version for dimgrey_cavefish
...
Per PMFW 59.9.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-26 13:27:08 -04:00
Likun Gao
1dc3c5a95b
drm/amd/pm: update driver if file for sienna cichlid
...
Update driver if file for sienna cichlid.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-21 16:14:40 -04:00
Kevin Wang
e9073b4362
drm/amd/swsmu: add missing feature map for sienna_cichlid
...
it will cause smu sysfs node of "pp_features" show error.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-16 14:44:44 -04:00
Evan Quan
76c71f00d7
drm/amd/pm: properly setting GPO feature on UMD pstate entering/exiting
...
Disable/enable the GPO feature on UMD pstate entering/exiting.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-15 12:21:17 -04:00
Evan Quan
7d92c1fd11
drm/amd/pm: populate the bootup LCLK frequency
...
As for other clock domains.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-15 12:20:31 -04:00
Tao Zhou
4da6783908
drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
...
Per PMFW 59.7.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:48 -04:00
Tao Zhou
7dc2ef4e70
drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish(v2)
...
Per PMFW 59.5.0.
v2: refine subject and commit message, fix typo
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:31 -04:00
Tao Zhou
4ccc957f15
drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
...
Update driver if version from 0x5 to 0x6 for dimgrey_cavefish, per PMFW 59.04.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:29 -04:00
Tao Zhou
e8afbddfa1
drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
...
Update driver if version from 0x4 to 0x5 for dimgrey_cavefish, per PMFW 59.02.0.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:02:09 -04:00
Tao Zhou
4ed032bd13
drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
...
Update driver if version according to PMFW with version 0x003B0100.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:51 -04:00
Tao Zhou
db1f8a8fb2
drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2)
...
Reuse sienna_cichlid pp table for dimgrey_cavefish.
v2: update related comment.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:07 -04:00
Tao Zhou
10e0d9ebb0
drm/amdgpu/swsmu: increase size for smu fw_name string
...
A longer chip name needs more space.
v2: define macro for the length of smu fw name
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-12 14:01:02 -04:00
Alex Deucher
75145aab7a
drm/amdgpu/swsmu: clean up a bunch of stale interfaces
...
These were leftover from the initial implementation, but
never used. Drop them.
Reviewed-by: Evan Quan <evan.quan@amd.com >
Noticed-by: Ryan Taylor <ryan.taylor@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-09 14:51:04 -04:00
Gustavo A. R. Silva
89c785bb1a
drm/amd/pm: Replace one-element array with flexible-array in struct phm_samu_clock_voltage_dependency_table
...
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].
Refactor the code according to the use of a flexible-array member in
struct phm_samu_clock_voltage_dependency_table, instead of a one-element array,
and use the struct_size() helper to calculate the size for the allocation.
Also, save some heap space as the original code is multiplying
table->numEntries by sizeof(struct phm_samu_clock_voltage_dependency_table)
when it should have been multiplied it by
sizeof(struct phm_samu_clock_voltage_dependency_record) instead.
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays
Build-tested-by: kernel test robot <lkp@intel.com >
Link: https://lore.kernel.org/lkml/5f7c5d3a.ryM4GmZr3e0JeZy+%25lkp@intel.com/
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-09 14:43:30 -04:00
Gustavo A. R. Silva
aa8d10a10f
drm/amd/pm: Replace one-element array with flexible-array in struct phm_cac_leakage_table
...
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].
Refactor the code according to the use of a flexible-array member in
struct phm_cac_leakage_table, instead of a one-element array,
and use the struct_size() helper to calculate the size for the allocation.
Also, save some heap space as the original code is multiplying
table->ucNumEntries by sizeof(struct phm_cac_leakage_table) when it
should have been multiplied it by sizeof(struct phm_cac_leakage_record)
instead.
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays
Build-tested-by: kernel test robot <lkp@intel.com >
Link: https://lore.kernel.org/lkml/5f7c5d38.iT%2FQTjN+659XUDo5%25lkp@intel.com/
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-09 14:43:30 -04:00