History log of /drivers/gpu/drm/radeon/ni_dpm.c
Revision Date Author Comments
01467a9b5e7ec7b9e30768bee16ea5861665015b 14-Oct-2014 Michele Curti <michele.curti@gmail.com> drm/radeon: reduce sparse false positive warnings

include radeon_asic.h header file in the various xxx_dpm.c files
to reduce sparse false positive warnings. Not so great patch
in itself, but reducing warning count from 391 to 258 may help
to see real problems..

Signed-off-by: Michele Curti <michele.curti@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7bf05cc1628679756495f15c69cecc1fd31e7c78 23-Sep-2014 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: drop clk/voltage dependency filters for NI

No longer needed now that the underlying bug was fixed in
b0880e87c1fd038b84498944f52e52c3e86ebe59
(drm/radeon/dpm: fix vddci setup typo on cayman).

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=69721

Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Tested-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
b0880e87c1fd038b84498944f52e52c3e86ebe59 01-Jul-2014 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: fix vddci setup typo on cayman

We were using the vddc mask rather than the vddci mask.

Bug:
https://bugzilla.kernel.org/show_bug.cgi?id=79071

May also fix:
https://bugs.freedesktop.org/show_bug.cgi?id=69723

Noticed by: Dieter Nützel <Dieter@nuetzel-hh.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
21ed4947fdfe19b60a27b84162622e56439c7937 18-Feb-2014 Alex Deucher <alexander.deucher@amd.com> drm/radeon/ni: fix typo in dpm sq ramping setup

inverted logic.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
82f79cc54b6a67c0b17aff4fb5ed43155ff3f0ea 21-Aug-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: move platform caps fetching to a separate function

It's needed by by both the asic specific functions and the
extended table parser.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
299302294e109aec5e7f54ea61a9816c555c2106 30-Jan-2014 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: use stored max_vddc rather than looking it up

When we parse the power tables use the stored mac_vddc value
rather than lookig it up manually each time.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9f3f63f24c901cad831e78bbb738df61a1c4ff02 30-Jan-2014 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: use the driver state for dpm debugfs

For btc and newer, we may modify the power state depending
on the circumstances. Use the modified state rather than
the base state.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6c7bccea390853bdec5b76fe31fc50f3b36f75d5 18-Dec-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/pm: move pm handling into the asic specific code

We need more control over the ordering of dpm init with
respect to the rest of the asic. Specifically, the SMC
has to be initialized before the rlc and cg/pg. The pm
code currently initializes late in the driver, but we need
it to happen much earlier so move pm handling into the asic
specific callbacks.

This makes dpm more reliable and makes clockgating work
properly on CIK parts and should help on SI parts as well.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
e14cd2bbcb98541e199b7223f38d61527dfe45c9 19-Dec-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: switch on new late_enable callback

Right now it's called right after enable, but after
reworking the dpm init order, it will get called later
to accomodate loading the smc early, but enabling
thermal interrupts and block powergating later after
the ring tests are complete.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
d444af2dec2e3b9d10941aeabdbdb92fefe4183f 26-Nov-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: simplify state adjust logic for NI

This is based on a similar patch from Alexandre Demers.
While fixing up some warnings with that patch I saw some
additional cleanups that could be applied. This patch
simplifies the logic for patching the power state.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Alexandre Demers <alexandre.f.demers@gmail.com>
71473dbd66d4a61be4cd531ef96b4877f6ee3941 09-Nov-2013 Fabio Estevam <fabio.estevam@freescale.com> drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n

With CONFIG_ACPI=n the following build warning is seen:

drivers/gpu/drm/radeon/ni_dpm.c:3448:31: warning: unused variable 'eg_pi' [-Wunused-variable]

Move the definition of eg_pi inside the CONFIG_ACPI 'if' block.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
225b769d3ee96fd55ec19ea5ed3cb72bfff32ce5 21-Sep-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm/ni: filter clocks based on voltage/clk dep tables

filter out mclk and sclk levels higher than listed in the clk
voltage dependency tables. Supporting these clocks will require
additional driver tweaking that isn't supported yet.

See bug:
https://bugs.freedesktop.org/show_bug.cgi?id=68235

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1cd8b21aa22c4fe8835abe614da5fa989c66dca9 13-Sep-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: rework auto performance level enable

Calling force_performance_level() from set_power_state()
doesn't work on some asics because the current power
state pointer has not been properly updated at that point.
Move the calls to force_performance_level() out of the
asic specific set_power_state() functions and into
the main power state sequence.

Fixes dpm resume on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1ff60ddb84bb9ff6fa182710c4e08b66badf918c 30-Aug-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)

Check to make sure the dc limits are valid before using them.
Some systems may not have a dc limits table. In that case just
use the ac limits. This fixes hangs on systems when the power
state is changed when on battery (dc) due to invalid performance
state parameters.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=68708

v2: fix up limits in dpm_init()

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
1e05c4d918b9d08167773cdd6edb05dde0975b40 21-Aug-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon: gcc fixes for ni dpm

Newer versions of gcc seem to wander off into the
weeds when dealing with variable sizes arrays in
structs. Rather than indexing the arrays, use
pointer arithmetic.

See bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=66932
https://bugs.freedesktop.org/show_bug.cgi?id=66972
https://bugs.freedesktop.org/show_bug.cgi?id=66945

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1bd4cff651350380f9fb6847313cb78e84c03846 12-Aug-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: adjust the vblank time checks for eg, ni, si

According to the internal teams, we never hit the limit for
mclk switching on these asics, so we can disable the check.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
b841ce7b41ffbecf84285b381b3ac23f05256d31 01-Aug-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: fix spread spectrum setup (v2)

Need to check for engine and memory clock ss separately
and only enable dynamic ss if either of them are found.

This should fix systems which have a ss table, but do
not have entries for engine or memory. On those systems
we may enable dynamic spread spectrum without enabling
it on the engine or memory clocks which can lead to a
hang in some cases.

fixes some systems reported here:
https://bugs.freedesktop.org/show_bug.cgi?id=66963

v2: fix typo

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
fda837241f3680e5dc554c26e178c2deec7a039c 31-Jul-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: adjust thermal protection requirements

On rv770 and newer, clock gating is not required
for thermal protection. The only requirement is that
the design utilizes a thermal sensor.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
f86d0269b471d88c9c06da4972f9145f978a0e5a 29-Jul-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: fix forcing performance state to low on cayman

Need to program EnabledLevels to 1 to force the low state.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
76ad73e549ff39cbb235dae3a14902bb6ca12d53 08-Jul-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: implement vblank_too_short callback for cayman

Check if we can switch the mclk during the vblank time otherwise
we may get artifacts on the screen when the mclk changes.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
170a47f010182152bed6f44f3878dd0423df2b78 03-Jul-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: implement force performance level for cayman

Allows you to force a performance level via sysfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
bf0936e196ec21b604106578043d4c14831f99e7 02-Jul-2013 Mike Lothian <mike@fireburn.co.uk> drm/radeon/dpm: fix compilation with certain versions of gcc

Add #include <linux/seq_file.h> to *_dpm.c files

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
bdf0c4f07d5fbda79569a11116053bed44873c8a 28-Jun-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: add debugfs support for cayman

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7ad8d0687bb5030c3328bc7229a3183ce179ab25 01-Jul-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: re-enable state transitions for Cayman

Was disabled due to stability issues on certain boards
caused by the a bug in the parsing of the atom mc reg tables.
That's fixed now so re-enable.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
728cf6bb4d0d4723794dabf87b76efa3c36916ab 28-Jun-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/NI: fix TDP adjustment in set_power_state

Fixes hangs with DPM in some cases.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
d434e81e59aada1b68444e9a128d56ccc295f66a 15-May-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: fix UVD clock setting on cayman

The rv770 version was using the wrong power state type.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
71de795c6c3e72c820b0f1b06cd997acb16d3f62 14-May-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon: fix typo in ni_print_power_state

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
173dbb0ef6568f1da666ae846ecd5ce622076dbc 28-Jun-2013 Alex Deucher <alexander.deucher@amd.com> add dpm_set_power_state failure output (7xx-ni)

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
72dd2c54ee630701608c08fd85e0eaf75336e31c 28-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: add dpm_set_power_state failure output (7xx-ni)

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
fa4b5471bd6231d293a2de9ad016e39eb2c9c70e 28-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: add dpm_enable failure output (7xx-ni)

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
a9e61410921bcc1aa8f594ffa6301d5baba90f3b 25-Jun-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: add dpm support for SI (v7)

This adds dpm support for SI asics. This includes:
- dynamic engine clock scaling
- dynamic memory clock scaling
- dynamic voltage scaling
- dynamic pcie gen1/gen2/gen3 switching
- power containment
- shader power scaling

Set radeon.dpm=1 to enable.

v2: enable hainan support, rebase
v3: guard acpi stuff
v4: fix 64 bit math
v5: fix 64 bit div harder
v6: fix thermal interrupt check noticed by Jerome
v7: attempt fix state enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
79fb809a5dabf330dd0897b83162fc8e2f6ee9d9 26-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm/ni: properly catch errors in dpm setup

We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2abba66e7af70825734eaf9fdea37c97f9e7b6ff 25-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon: update radeon_atombios_get_default_voltages for mvdd

Add a way to look up the bootup mvdd. Required for DPM on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
4489cd62e5a2a4900422424457c6e8dca875056b 22-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: validate voltages against dispclk requirements

Validate the voltages against the voltage requirements of the
dispclk. We currently don't adjust the disp clock so it never
changes, but we need to filter out voltage levels that are too
low none the less.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
b253e4b359ee1bf25299a31337b7d95b21ab9cd9 22-Mar-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm/cayman: use new fixed point functions (v2)

Use the new fixed point functions for leakage
calculations on cayman.

v2: fix up 64 bit math

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
58653abdd22427f2b4f2ec9930cadcbeb8832a73 13-Feb-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon: update radeon_atom_is_voltage_gpio() for SI

SI uses a new atom table. Required for DPM on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
a5b91af2e2e36e6031296675cf0c060879268032 11-Feb-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon: add missing UVD clock set in cayman dpm code

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
fee3d744bf3a0484f2f3ece587cccdffe33f2a15 16-Jan-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm: add pre/post_set_power_state callback (cayman)

This properly implemented dynamic state adjustment by
using a working copy of the requested and current
power states.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
51a8de029b5fe5da0729ab544d423d07690501b5 16-Jan-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm/cayman: restructure code

Needed to properly handle dynamic state adjustment.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
4cb3a02f88e58a60c4ec28c2ffbed739d1db6aad 26-Jun-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/dpm/btc: restructure code

Needed to properly handle dynamic state adjustment.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
69e0b57a91adca2e3eb56ed4db39ab90f3ae1043 12-Apr-2013 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: add dpm support for cayman (v5)

This adds dpm support for cayman asics. This includes:
- clockgating
- dynamic engine clock scaling
- dynamic memory clock scaling
- dynamic voltage scaling
- dynamic pcie gen1/gen2 switching (requires additional acpi support)
- power containment
- shader power scaling

Set radeon.dpm=1 to enable.

v2: fold in tdp fix
v3: fix indentation
v4: fix 64 bit div
v5: attempt to fix state enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>