Commit graph

19 commits

Author SHA1 Message Date
Alex Deucher b841ce7b41 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>
2013-08-07 17:37:10 -04:00
Alex Deucher fda837241f 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>
2013-08-07 17:37:09 -04:00
Alex Deucher a84301c65d drm/radeon/dpm: implement vblank_too_short callback for btc
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>
2013-07-08 17:40:52 -04:00
Alex Deucher 8b5e6b7f0e drm/radeon/dpm: implement force performance levels for 7xx/eg/btc
Allows you to limit the selected power levels via sysfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-05 18:09:30 -04:00
Alex Deucher 4b5c006ef2 drm/radeon/dpm: re-enable state transitions for BTC
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>
2013-07-01 16:04:02 -04:00
Alex Deucher 173dbb0ef6 add dpm_set_power_state failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:08 -04:00
Alex Deucher 72dd2c54ee drm/radeon/dpm: add dpm_set_power_state failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:07 -04:00
Alex Deucher fa4b5471bd drm/radeon/dpm: add dpm_enable failure output (7xx-ni)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:40:05 -04:00
Alex Deucher aafb3afa59 drm/radeon/dpm/btc: 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>
2013-06-27 19:16:46 -04:00
Alex Deucher 4489cd62e5 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>
2013-06-27 19:16:39 -04:00
Alex Deucher 58653abdd2 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>
2013-06-27 19:16:24 -04:00
Alex Deucher e8a9539fa0 drm/radeon/dpm: add pre/post_set_power_state callback (BTC)
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>
2013-06-27 19:16:19 -04:00
Alex Deucher 4cb3a02f88 drm/radeon/dpm/btc: restructure code
Needed to properly handle dynamic state adjustment.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:14 -04:00
Alex Deucher dbc3416024 drm/radeon/dpm/evergreen: restructure code
Needed to properly handle dynamic state adjustment.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:13 -04:00
Alex Deucher 5d77d77641 drm/radeon/dpm/rv7xx: restructure code
Needed to properly handle dynamic state adjustment.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:16:12 -04:00
Alex Deucher 69e0b57a91 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>
2013-06-27 19:16:10 -04:00
Alex Deucher d22b7e406a drm/radeon/dpm: fixup dynamic state adjust for btc (v2)
Use a dedicated copy of the current power state since
we may have to adjust it on the fly.

v2: fix up redundant state sets

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:15:53 -04:00
Alex Deucher f85392bcf9 drm/radeon: add dpm UVD handling for evergreen/btc asics
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:15:47 -04:00
Alex Deucher 6596afd48a drm/radeon/kms: add dpm support for btc (v3)
This adds dpm support for btc asics.  This includes:
- clockgating
- dynamic engine clock scaling
- dynamic memory clock scaling
- dynamic voltage scaling
- dynamic pcie gen1/gen2 switching (requires additional acpi support)

Set radeon.dpm=1 to enable.

v2: reduce stack usage
v3: attempt to fix state enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27 19:15:44 -04:00