Alex Deucher
65d437b83b
drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x
...
It has been confirmed that the SMU metrics table should always reflect
the current fan speed even in manual mode.
Fixes: 3033e9f1c2de ("drm/amdgpu/swsmu: handle manual fan readback on SMU11")
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 14:08:03 -04:00
Kenneth Feng
e72d98445d
drm/amd/pm: fix the wrong fan speed in fan1_input
...
fix the wrong fan speed in fan1_input when the fan control mode is manual.
the fan speed value is not correct when we set manual mode to fan1_enalbe - 1.
since the fan speed in the metrics table always reflects the real fan speed,we
can fetch the fan speed for both auto and manual mode.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Likun Gao <Likun.Gao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 14:07:43 -04:00
Alex Deucher
10105d0c97
drm/amdgpu/swsmu: drop smu i2c bus on navi1x
...
Stop registering the SMU i2c bus on navi1x. This leads to instability
issues when userspace processes mess with the bus and also seems to
cause display stability issues in some cases.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1314
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1341
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2020-10-27 14:06:54 -04:00
Alex Deucher
19cc89dcb9
drm/amdgpu/swsmu: drop smu i2c bus on navi1x
...
Stop registering the SMU i2c bus on navi1x. This leads to instability
issues when userspace processes mess with the bus and also seems to
cause display stability issues in some cases.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1314
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1341
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 12:01:40 -04:00
Christian König
923e15d634
drm/amdgpu: drop mem_global_referenced
...
Not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-27 12:01:35 -04:00
Huang Rui
c345c89b64
drm/amdgpu: add vangogh apu flag
...
This patch is to add vangogh apu flag to support more kickers that
belongs vangogh series.
Signed-off-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-10-27 12:01:29 -04:00
Evan Quan
191a3c0479
drm/amdgpu: enable MULTI_MON_PP_MCLK_SWITCH DC feature at default
...
With this, for multiple monitors in sync(e.g. with the same model),
mclk switching will be allowed. That helps saving some idle power on
some ASICs(e.g. Polaris).
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-27 12:01:23 -04:00
Evan Quan
a2475e624e
drm/amd/display: correct asic type check V2
...
Check chip family also to avoid wrong identification.
V2: use the correct macro without AMDGPU prefix
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-27 12:01:16 -04:00
Evan Quan
b1878847ac
drm/amd/pm: drop redundant display setting
...
As this is already performed in smu7_set_power_state_tasks().
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 12:00:52 -04:00
Evan Quan
62ff83a4f6
drm/amd/pm: reconfigure smc on display vbitimeout setting change
...
Reconfigure smc display settings on vbitimeout change.
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 12:00:47 -04:00
Evan Quan
d49873c93f
drm/amd/pm: correct the mclk switching setting
...
Correct the mclk switching setting for multiple displays.
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 12:00:41 -04:00
Evan Quan
b03fd3e7e6
drm/amd/pm: enable Polaris watermark table setting
...
Enable watermark table setting 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 12:00:34 -04:00
Evan Quan
690cdc2635
drm/amd/pm: fulfill the Polaris implementation for get_clock_by_type_with_latency()
...
Fulfill Polaris get_clock_by_type_with_latency().
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 12:00:28 -04:00
Evan Quan
db6f5c7f95
drm/amd/pm: correct vddc_dep_on_dal_pwrl setup
...
Correct Polaris10 setup.
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 12:00:21 -04:00
Evan Quan
9182fefcb8
drm/amd/pm: correct SMC sclk/mclk boot level setup
...
Correct Polaris smc boot level setup.
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 12:00:15 -04:00
Evan Quan
8f97e221d6
drm/amd/pm: correct pcie spc cap setup
...
Correct Polaris10 pcie spc cap 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 12:00:09 -04:00
Evan Quan
ba4601feba
drm/amd/pm: correct clk/voltage dependence setup
...
Correct Polaris10 clk/voltage dependence setup.
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 12:00:03 -04:00
Evan Quan
be56f22b62
drm/amd/pm: correct the way to get the highest vddc
...
Populate the correct highest vddc setting on 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:57 -04:00
Evan Quan
d765129a71
drm/amd/pm: correct sclk/mclk dpm enablement
...
Correct Polaris10 sclk/mclk dpm 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:51 -04:00
Evan Quan
baa495f764
drm/amd/pm: correct smc voltage controller setup
...
Correct Polaris10 smc voltage controller setup.
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:45 -04:00
Evan Quan
326d0ff7aa
drm/amd/pm: correct platformcaps setup
...
Correct Polaris10 platformcaps setup.
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:39 -04:00
Evan Quan
55411d1623
drm/amd/pm: correct VRconfig setting
...
Correct Polaris VRconfig 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:59:34 -04:00
Evan Quan
a6d8a6eb3e
drm/amd/pm: correct vddc phase control setting
...
Correct Polaris10 vddc phase control.
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:28 -04:00
Evan Quan
b23dbd603b
drm/amd/pm: correct avfs fuse settings
...
Correct Polaris10 avfs fuse 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:59:22 -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
f6638d0e6f
drm/amd/pm: correct the checks for sclk/mclk SS support
...
Correct sclk/mclk SS support checks.
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:03 -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
5f92b48cf6
drm/amd/pm: add mc register table initialization
...
Add mc register table initialization.
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:51 -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
Evan Quan
c420418f1d
drm/amd/pm: correct polaris10 clock stretcher data table setting
...
By using the saved copy of ro_range_maximum and ro_range_minimum.
Correct the setting for "LdoRefSel".
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:33 -04:00
Evan Quan
a90e6fbe47
drm/amd/pm: correct the settings for ro range minimum and maximum
...
Make the settings more precise.
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:27 -04:00
Evan Quan
029479acca
drm/amd/pm: drop redundant efuse mask calculations
...
By moving that in atomfw_read_efuse().
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:21 -04:00
Evan Quan
555440822b
drm/amd/pm: optimize AC timing programming
...
Programming AC Timing Parameters is only dependent on MCLK.
No need to nest loop for each SCLK DPM level.
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:15 -04:00
Evan Quan
18973c6ec4
drm/amd/powerplay: separate Polaris fan table setup from Tonga
...
Instead of sharing the fan table setup with Tonga, Polaris has
its own fan table setup.
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:08 -04:00
Evan Quan
8c23cc29d5
drm/amd/pm: add PWR_CKS_CNTL setting
...
This is for some special Polaris10 ASICs.
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:01 -04:00
Evan Quan
92995254af
drm/amdgpu: correct CG_ACLK_CNTL setting
...
Correct polaris CG_ACLK_CNTL 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:57:55 -04:00
Evan Quan
7f95a2e01c
drm/amd/pm: drop arb table first byte workaround
...
As this is not needed 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:57:48 -04:00
Evan Quan
e9016fc2ad
drm/amd/pm: add pptable VRHotLevel setting
...
Add missing VRHotLevel 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:57:42 -04:00
Evan Quan
3a9f6bb21d
drm/amd/pm: correct the BootLinkLevel setup
...
Set the BootLinkLevel as the max level.
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:57:36 -04:00
Evan Quan
a193d97741
drm/amd/pm: correct the ACPI table setup V2
...
Correct the setting for "ActivityLevel".
V2: rich the comment
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:57:28 -04:00
Evan Quan
0232af1cea
drm/amd/pm: correct mclk table setup
...
Correct the settings for "StutterEnable" and "EnabledForActivity".
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:57:21 -04:00
Evan Quan
374b0781a0
drm/amd/pm: correct sclk table setup
...
Correct Polaris10 sclk table setup.
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:57:15 -04:00
Evan Quan
8849fe64f6
drm/amd/pm: correct vddci table setup
...
Make sure the settings are applied only when voltage
controlled by gpio.
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:57:09 -04:00
Evan Quan
3df9931b06
drm/amd/pm: populate smc samu table
...
Add missing smc samu table setup.
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:57:03 -04:00
Evan Quan
10efb75b58
drm/amd/pm: populate smc vddc table
...
Add missing vddc table setup.
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:56:57 -04:00
Evan Quan
73275181f6
drm/amd/pm: correct the checks for polaris kickers
...
By defining new Macros.
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:56:42 -04:00
Takashi Iwai
bcc3775dcf
drm/amd/display: Clean up debug macros
...
This patch simplifies the ASSERT*() and BREAK_TO_DEBUGGER() macros:
- Move the dependency check of CONFIG_KGDB into Kconfig
- Unify the kgdb_breakpoint() call
- Drop the non-existing CONFIG_HAVE_KGDB
Also align the behavior of ASSERT() macro in both cases with and
without CONFIG_DEBUG_KERNEL_DC.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-26 17:19:30 -04:00
Takashi Iwai
8b7dc1fe1a
drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally
...
ASSERT_CRITICAL() invokes kgdb_breakpoint() whenever either
CONFIG_KGDB or CONFIG_HAVE_KGDB is set. This, however, may lead to a
kernel panic when no kdb stuff is attached, since the
kgdb_breakpoint() call issues INT3. It's nothing but a surprise for
normal end-users.
For avoiding the pitfall, make the kgdb_breakpoint() call only when
CONFIG_DEBUG_KERNEL_DC is set.
https://bugzilla.opensuse.org/show_bug.cgi?id=1177973
Cc: <stable@vger.kernel.org >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-10-26 17:19:15 -04:00