summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rv770_dpm.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/dpm: Reenabling SS on CaymanAlexandre Demers2014-07-101-6/+0
| | | | | | | | | | | | It reverts commit c745fe611ca42295c9d91d8e305d27983e9132ef now that Cayman is stable since VDDCI fix. Spread spectrum was not the culprit. This depends on b0880e87c1fd038b84498944f52e52c3e86ebe59 (drm/radeon/dpm: fix vddci setup typo on cayman). Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* Merge branch 'drm-next-3.15' of ↵Dave Airlie2014-02-271-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~deathsimple/linux into drm-next So this is the initial pull request for radeon drm-next 3.15. Highlights: - VCE bringup including DPM support - Few cleanups for the ring handling code * 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux: drm/radeon: cleanup false positive lockup handling drm/radeon: drop radeon_ring_force_activity drm/radeon: drop drivers copy of the rptr drm/radeon/cik: enable/disable vce cg when encoding v2 drm/radeon: add support for vce 2.0 clock gating drm/radeon/dpm: properly enable/disable vce when vce pg is enabled drm/radeon/dpm: enable dynamic vce state switching v2 drm/radeon: add vce dpm support for KV/KB drm/radeon: enable vce dpm on CI drm/radeon: add vce dpm support for CI drm/radeon: fill in set_vce_clocks for CIK asics drm/radeon/dpm: fetch vce states from the vbios drm/radeon/dpm: fill in some initial vce infrastructure drm/radeon/dpm: move platform caps fetching to a separate function drm/radeon: add callback for setting vce clocks drm/radeon: add VCE version parsing and checking drm/radeon: add VCE ring query drm/radeon: initial VCE support v4 drm/radeon: fix CP semaphores on CIK
| * drm/radeon/dpm: move platform caps fetching to a separate functionAlex Deucher2014-02-181-3/+4
| | | | | | | | | | | | | | It's needed by by both the asic specific functions and the extended table parser. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon/dpm: reduce r7xx vblank mclk threshold to 200Alex Deucher2014-02-181-8/+1
|/ | | | | | | | | | | Most laptops seems to have a vblank period of less than 300 and mclk switching works fine. Drop the quirk and set the default threshold to 200. bug: https://bugzilla.kernel.org/show_bug.cgi?id=70701 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: use stored max_vddc rather than looking it upAlex Deucher2014-02-061-3/+2
| | | | | | | 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>
* drm/radeon/dpm: disable mclk switching on desktop RV770Alex Deucher2014-01-201-0/+6
| | | | | | | | | | | | | Mclk switching doesn't seem to work reliably on these cards. Most RV770 boards specify the same mclk for all performance levels anyway so in most cases, this has no affect. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73067 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: add query to fetch the max engine clock (v2)Alex Deucher2014-01-201-8/+6
| | | | | | | | | | | This is needed for reporting the max GPU engine clock in OpenCL. This just reports the max possible engine clock, it does not take into account current conditions that may limit that clock. v2: fix query number for merge with 3.13 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Merge branch 'drm-intel-next' of ↵Dave Airlie2014-01-201-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~danvet/drm-intel into drm-next drm-intel-next-2014-01-10: - final bits for runtime D3 on Haswell from Paul (now enabled fully) - parse the backlight modulation freq information in the VBT from Jani (but not yet used) - more watermark improvements from Ville for ilk-ivb and bdw - bugfixes for fastboot from Jesse - watermark fix for i830M (but not yet everything) - vlv vga hotplug w/a (Imre) - piles of other small improvements, cleanups and fixes all over Note that the pull request includes a backmerge of the last drm-fixes pulled into Linus' tree - things where getting a bit too messy. So the shortlog also contains a bunch of patches from Linus tree. Please yell if you want me to frob it for you a bit. * 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel: (609 commits) drm/i915/bdw: make sure south port interrupts are enabled properly v2 drm/i915: Include more information in disabled hotplug interrupt warning drm/i915: Only complain about a rogue hotplug IRQ after disabling drm/i915: Only WARN about a stuck hotplug irq ONCE drm/i915: s/hotplugt_status_gen4/hotplug_status_g4x/
| * drm/radeon/dpm: disable ss on CaymanAlex Deucher2013-12-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Spread spectrum seems to cause hangs when dynamic clock switching is enabled. Disable it for now. This does not affect performance or the amount of power saved. Tracked down by Martin Andersson. bug: https://bugs.freedesktop.org/show_bug.cgi?id=69723 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon/dpm: switch on new late_enable callbackAlex Deucher2013-12-241-17/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | drm/radeon/dpm: add late_enable for rv7xx-NIAlex Deucher2013-12-241-0/+22
|/ | | | | | | Make sure interrupts are enabled before we enable thermal interrupts. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: rework auto performance level enableAlex Deucher2013-09-151-6/+0
| | | | | | | | | | | | | 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>
* drm/radeon/dpm: fix fallback for empty UVD clocksAlex Deucher2013-09-111-3/+7
| | | | | | | | | | | | | Some older 6xx-7xx boards didn't always fill in the UVD clocks properly in the UVD power states. This leads to the driver trying to set a 0 clock which results in slow or broken UVD playback. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69120 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeonn: gcc fixes for rv7xx/eg/btc dpmAlex Deucher2013-08-301-2/+3
| | | | | | | | | | | | | | 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>
* drm/radeon/dpm: add reclocking quirk for ASUS K70AFAlex Deucher2013-08-301-1/+9
| | | | | | | | The LCD has a relatively short vblank time (216us), but the card is able to reclock memory fine in that time. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reported-by: normalrawr@gmail.com
* drm/radeon/dpm: fix spread spectrum setup (v2)Alex Deucher2013-08-071-13/+17
| | | | | | | | | | | | | | | | | | 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>
* drm/radeon/dpm: adjust thermal protection requirementsAlex Deucher2013-08-071-2/+1
| | | | | | | | 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>
* drm/radeon: add a module parameter to disable aspmAlex Deucher2013-07-171-6/+8
| | | | | | | Can cause hangs when enabled in certain motherboards. Set radeon.aspm=0 to disable aspm. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: implement vblank_too_short callback for 7xxAlex Deucher2013-07-081-0/+11
| | | | | | | 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>
* drm/radeon/dpm: fix display_gap programming on rv7xxAlex Deucher2013-07-081-2/+2
| | | | | | | | | | | Check the driver state rather than the register as the crtc registers may not be enabled yet. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=60510 https://bugs.freedesktop.org/show_bug.cgi?id=66651 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: implement force performance levels for 7xx/eg/btcAlex Deucher2013-07-051-7/+24
| | | | | | Allows you to limit the selected power levels via sysfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: fix compilation with certain versions of gccMike Lothian2013-07-021-0/+1
| | | | | | Add #include <linux/seq_file.h> to *_dpm.c files Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: add debugfs support for 7xx/evergreen/btcAlex Deucher2013-07-011-0/+30
| | | | | | | This allows you to look at the current DPM state via debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: fix typo in setting uvd clockAlex Deucher2013-06-271-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* add dpm_set_power_state failure output (7xx-ni)Alex Deucher2013-06-271-1/+3
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: add dpm_set_power_state failure output (7xx-ni)Alex Deucher2013-06-271-5/+15
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: add dpm_enable failure output (7xx-ni)Alex Deucher2013-06-271-5/+12
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm/r7xx: properly catch errors in dpm setupAlex Deucher2013-06-271-15/+39
| | | | | | | We weren't properly catching errors in dpm_enable() and dpm_set_power_state(). Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update radeon_atombios_get_default_voltages for mvddAlex Deucher2013-06-271-2/+2
| | | | | | Add a way to look up the bootup mvdd. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update radeon_atom_is_voltage_gpio() for SIAlex Deucher2013-06-271-2/+2
| | | | | | SI uses a new atom table. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm/rv7xx: restructure codeAlex Deucher2013-06-271-36/+41
| | | | | | Needed to properly handle dynamic state adjustment. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: fixup dynamic state adjust for btc (v2)Alex Deucher2013-06-271-0/+10
| | | | | | | | | 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>
* drm/radeon: add dpm UVD handling for evergreen/btc asicsAlex Deucher2013-06-271-13/+17
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add dpm UVD handling for r7xx asicsAlex Deucher2013-06-271-0/+34
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: add dpm support for evergreen (v4)Alex Deucher2013-06-271-8/+37
| | | | | | | | | | | | | | | | | This adds dpm support for evergreen 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, rename ulv struct v3: fix thermal interrupt check notices by Jerome v4: fix state enable Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: add dpm support for rv7xx (v4)Alex Deucher2013-06-271-0/+2337
This adds dpm support for rv7xx asics. This includes: - clockgating - dynamic engine clock scaling - dynamic memory clock scaling - dynamic voltage scaling - dynamic pcie gen1/gen2 switching Set radeon.dpm=1 to enable. v2: reduce stack usage v3: fix 64 bit div v4: fix state enable Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud