aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/ci_dpm.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-10-16drm/radeon: reduce sparse false positive warningsMichele Curti1-0/+1
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>
2014-10-03drm/radeon/ci: add uvd/vce info to dpm debugfs outputAlex Deucher1-0/+4
Track whether UVD or VCE are enabled in debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-10-01drm/radeon/dpm: drop clk/voltage dependency filters for CIAlex Deucher1-26/+0
Not sure this was ever necessary for CI, was just done to be on the safe side. bug: https://bugs.freedesktop.org/show_bug.cgi?id=69721 Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-15drm/radeon: Add missing lines to ci_set_thermal_temperature_rangeOleg Chernovskiy1-0/+3
Properly set the thermal min and max temp on CI. Otherwise, we end up setting the thermal ranges to 0 on resume and end up in the lowest power state. Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-08-05drm/radeon/dpm: handle voltage info fetching on hawaiiAlex Deucher1-1/+12
Some hawaii cards use a different method to fetch the voltage info from the vbios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=74250 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-10drm/radeon: fix typo in ci_stop_dpm()Alex Deucher1-1/+1
Need to use the RREG32_SMC() accessor since the register is an smc indirect index. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-04-17drm/radeon: re-enable mclk dpm on R7 260X asicsAlex Deucher1-2/+6
If the new mc ucode is available. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-04-17drm/radeon: update CI DPM powertune settingsAlex Deucher1-12/+13
As per internal recommendations. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-17drm/radeon: disable mclk dpm on R7 260XAlex Deucher1-0/+4
Setting higher mclks seems to cause stability issues on some R7 260X boards. Disable it for now for stability until we find a proper fix. bug: https://bugs.freedesktop.org/show_bug.cgi?id=75992 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-02-18drm/radeon/cik: enable/disable vce cg when encoding v2Alex Deucher1-1/+8
Some of the vce clocks are automatic, others need to be manually enabled. For ease, just disable cg when vce is active. v2: rebased Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18drm/radeon: enable vce dpm on CIAlex Deucher1-0/+1
VCE dpm dynamically adjusts the uvd clocks on demand. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18drm/radeon: add vce dpm support for CIAlex Deucher1-10/+40
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18drm/radeon/dpm: move platform caps fetching to a separate functionAlex Deucher1-3/+6
It's needed by by both the asic specific functions and the extended table parser. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-01-07drm/radeon/dpm: make some functions static for CIAlex Deucher1-6/+6
Noticed by Rashika Kheria and cherry-picked from her larger patch set. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Rashika Kheria <rashika.kheria@gmail.com>
2013-12-24drm/radeon/pm: move pm handling into the asic specific codeAlex Deucher1-0/+6
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>
2013-12-24drm/radeon/dpm: switch on new late_enable callbackAlex Deucher1-21/+0
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>
2013-12-24drm/radeon/dpm: add late_enable for CIAlex Deucher1-0/+29
Make sure interrupts are enabled before we enable thermal interrupts. Also, don't powergate uvd until after the ring tests. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-12-24drm/radeon/cik: drop cg_update from dpm codeAlex Deucher1-36/+0
I'm not entirely sure this is required and it won't work with the dpm restructing anyway. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-08drm/radeon: add hawaii dpm supportAlex Deucher1-11/+47
This updates the CI dpm (dynamic power management) support for hawaii. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-23drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tablesAlex Deucher1-0/+26
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>
2013-09-15drm/radeon/dpm: rework auto performance level enableAlex Deucher1-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>
2013-09-05drm/radeon: protect ACPI calls with CONFIG_ACPIStephen Rothwell1-0/+4
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Alex Deucher <Alexander.Deucher@amd.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
2013-08-30drm/radeon/dpm: make sure dc performance level limits are valid (CI)Alex Deucher1-0/+6
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 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon: gcc fixes for ci dpmAlex Deucher1-2/+5
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>
2013-08-30drm/radeon/dpm: track uvd gated state for ciAlex Deucher1-0/+13
Track the current uvd gated state on CI to avoid unnecessary state changes when uvd is active. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon: enable uvd dpm on CIAlex Deucher1-0/+2
UVD dpm dynamically adjusts the uvd clocks on demand. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon: handle cg in CI dpm codeAlex Deucher1-0/+36
Clockgating needs to be disabled around certain parts of dpm setup otherwise the smc gets into a bad state and dpm doesn't work properly. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon/dpm: implement UVD powergating for CIAlex Deucher1-6/+1
Disable the UVD block when not in use to save power. The block is not actually powergated on CI, but we switch between UVD DPM (where the uvd clocks are adjusted on demand) and clocks off. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon/dpm: implement vblank_too_short callback for CIAlex Deucher1-1/+15
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-08-30drm/radeon/dpm: implement force performance level for CIAlex Deucher1-0/+153
Allows you to force the selected performance level via sysfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon/dpm: add debugfs support for CIAlex Deucher1-0/+11
This allows you to look at the current DPM state via debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-30drm/radeon: add dpm support for CI dGPUs (v2)Alex Deucher1-0/+5006
This adds dpm support for btc asics. This includes: - dynamic engine clock scaling - dynamic memory clock scaling - dynamic voltage scaling - dynamic pcie gen switching Set radeon.dpm=1 to enable. v2: remove unused radeon_atombios.c changes, make missing smc ucode non-fatal Signed-off-by: Alex Deucher <alexander.deucher@amd.com>