Alex Deucher
4f00d6d5ba
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: f6eb433954 ("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 17:43:28 -04:00
Maxime Ripard
58d043690d
drm/vc4: hdmi: Avoid sleeping in atomic context
...
When running the trigger hook, ALSA by default will take a spinlock, and
thus will run the trigger hook in atomic context.
However, our HDMI driver will send the infoframes as part of the trigger
hook, and part of that process is to wait for a bit to be cleared for up to
100ms. To be nicer to the system, that wait has some usleep_range that
interact poorly with the atomic context.
There's several ways we can fix this, but the more obvious one is to make
ALSA take a mutex instead by setting the nonatomic flag on the DAI link.
That doesn't work though, since now the cyclic callback installed by the
dmaengine helpers in ALSA will take a mutex, while that callback is run by
dmaengine's virt-chan code in a tasklet where sleeping is not allowed
either.
Given the delay we need to poll the bit for, changing the usleep_range for
a udelay and keep running it from a context where interrupts are disabled
is not really a good option either.
However, we can move the infoframe setup code in the hw_params hook, like
is usually done in other HDMI controllers, that isn't protected by a
spinlock and thus where we can sleep. Infoframes will be sent on a regular
basis anyway, and since hw_params is where the audio parameters that end up
in the infoframes are setup, this also makes a bit more sense.
Fixes: bb7d785688 ("drm/vc4: Add HDMI audio support")
Suggested-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: Mark Brown <broonie@kernel.org >
Reviewed-by: Takashi Iwai <tiwai@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201027101558.427256-1-maxime@cerno.tech
2020-10-27 22:34:27 +01:00
Arnd Bergmann
65b7da27d2
drm/tilcdc: avoid 'make W=2' build failure
...
The -Wmissing-field-initializer warning when building with W=2
turns into an error because tilcdc is built with -Werror:
drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 },
drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm", tilcdc_mm_show, 0 },
Add the missing field initializers to address the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Jyri Sarha <jsarha@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201026194110.3817470-1-arnd@kernel.org
2020-10-27 20:36:23 +02:00
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