summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/ci_dpm.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/ci add comment to document intentionally unreachable codeNicholas Mc Guire2016-07-291-1/+4
| | | | | | | | | | | | | commit d967be9b80a5 ("drm/radeon/ci: disable needless sclk changes") introduces an unreachable if(C != C) conditional code section flagged by coccinelle script bad_conditional.cocci: Add a comment to make it clear that this is intentional. Fixes: d967be9b80a5 ("drm/radeon/ci: disable needless sclk changes") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix indentation.Jérome Glisse2016-03-161-21/+21
| | | | | | | | | | | I hate doing this but it hurts my eyes to go over code that does not comply with indentation rules. Only thing that is not only space change is in atom.c all other files are space indentation issues. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: silence a harmless PCC warningAlex Deucher2015-07-161-1/+1
| | | | | | | This has been a source of confusion. Make it debug only. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon/ci: implement get_current_sclk/mclkAlex Deucher2015-03-191-0/+14
| | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: comment out some currently unused ci dpm codeAlex Deucher2015-01-221-0/+4
| | | | | | Keep it around for reference. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: bind fan control on CI cards to hwmon interface (v2)Oleg Chernovskiy2015-01-221-10/+43
| | | | | | | | | | | | | | | | | | | | This adds a possibility to control fan on CI parts via exported hwmon variables. Note that automatic ucode fan management pauses if you choose to enable manual fan control. Use with caution! v2: agd5f: fix formatting, squash in: minor fix for pwm1_enable exposed value Track smc control in addition to fan mode This fixes pwm1_enable being constantly set to 1 because of enabled smc control also handle the case where smc fan control is disabled. Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: enable smc fan control on CIAlex Deucher2014-12-031-1/+0
| | | | | | | | | | | This seems to work well on CI boards after fixing the last few bugs noticed by Chernovsky Oleg. On boards with a high default fan speed this should reduce fan noise. Manual fan control is not enabled yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix copy paste typos in fan control for si/ciAlex Deucher2014-12-031-3/+3
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: disable needless sclk changesAlex Deucher2014-11-201-1/+1
| | | | | | | | The current code always reprogrammed the sclk levels, but we don't currently handle disp sclk requirements so just skip it. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: force pcie level before sclk and mclkAlex Deucher2014-11-201-17/+17
| | | | | | Preferred ordering. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: use different smc command for pcie dpmAlex Deucher2014-11-201-2/+10
| | | | | | | Use unforce levels rather than enable mask instruction. This is the preferred method. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: apply disp voltage changes before clk changesAlex Deucher2014-11-201-2/+2
| | | | | | Apply voltage changes for displays before changing clocks. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix PCC debugging message for CI DPMAlex Deucher2014-11-201-1/+1
| | | | | | Add missing newline and print the bad gpio shift. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: add thermal dpm support for CIAlex Deucher2014-11-201-0/+27
| | | | | | Not currently used. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: add smc fan control for CI (v2)Alex Deucher2014-11-201-1/+344
| | | | | | | | | | | | | Enable smc fan control for CI boards. Should reduce the fan noise on systems with a higher default fan profile. v2: disable by default, add additional fan setup, rpm control bug: https://bugs.freedesktop.org/show_bug.cgi?id=73338 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: set power control in ci dpm enableAlex Deucher2014-11-121-5/+6
| | | | | | Necessary for poper operation. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: powertune fixes for hawaiiAlex Deucher2014-11-121-8/+9
| | | | | | | - bapm is not available on hawaii - update pt defaults Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix dpm mc init for certain hawaii boardsAlex Deucher2014-11-121-0/+94
| | | | | | Needs special overrides for certain vram configurations. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: set bootup pcie level to max for ci dpmAlex Deucher2014-11-121-1/+1
| | | | | | | Avoids problems when re-loading the driver. Does not affect power saving when dpm is enabled. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix default dpm state setupAlex Deucher2014-11-121-3/+5
| | | | | | Only enable the first levels for mclk and sclk. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: workaround a hw bug in bonaire pcie dpmAlex Deucher2014-11-121-3/+8
| | | | | | Some boards get stuck in pcie x1 otherwise. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix mclk vddc configuration for cards for hawaiiAlex Deucher2014-11-121-0/+8
| | | | | | Need to use vddc0 for vdcc1 for certain hawaii configurations. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix sclk DS enablementAlex Deucher2014-11-121-0/+2
| | | | | | Only enable it for levels 0 and 1. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix activity settings for sclk and mclk for CIAlex Deucher2014-11-121-2/+3
| | | | | | Only need to be enabled on the first level. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: improve mclk param calcuations for ci dpmAlex Deucher2014-11-121-3/+3
| | | | | | Properly take into account the post divider. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix dram timing for certain hawaii boardsAlex Deucher2014-11-121-0/+29
| | | | | | Certain memory configurations need a fix. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: switch force state commands for CIAlex Deucher2014-11-121-18/+5
| | | | | | Use the preferred SMC commands for forcing state on CI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/ci: handle gpio controlled dpm features properlyAlex Deucher2014-11-121-0/+51
| | | | | | | Certain feature enablement depends on entries in the atom gpio pin table. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in CI dpm disableAlex Deucher2014-11-121-1/+1
| | | | | | | Need to disable DS, not enable it when disabling dpm. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: rework CI dpm thermal setupAlex Deucher2014-11-121-20/+50
| | | | | | In preparation for fan control. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: reduce sparse false positive warningsMichele Curti2014-10-161-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>
* drm/radeon/ci: add uvd/vce info to dpm debugfs outputAlex Deucher2014-10-031-0/+4
| | | | | | Track whether UVD or VCE are enabled in debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: drop clk/voltage dependency filters for CIAlex Deucher2014-10-011-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>
* drm/radeon: Add missing lines to ci_set_thermal_temperature_rangeOleg Chernovskiy2014-08-151-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
* drm/radeon/dpm: handle voltage info fetching on hawaiiAlex Deucher2014-08-051-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
* drm/radeon: fix typo in ci_stop_dpm()Alex Deucher2014-07-101-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
* drm/radeon: re-enable mclk dpm on R7 260X asicsAlex Deucher2014-04-171-2/+6
| | | | | | | If the new mc ucode is available. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: update CI DPM powertune settingsAlex Deucher2014-04-171-12/+13
| | | | | | As per internal recommendations. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: disable mclk dpm on R7 260XAlex Deucher2014-04-171-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
* drm/radeon/cik: enable/disable vce cg when encoding v2Alex Deucher2014-02-181-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>
* drm/radeon: enable vce dpm on CIAlex Deucher2014-02-181-0/+1
| | | | | | | VCE dpm dynamically adjusts the uvd clocks on demand. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add vce dpm support for CIAlex Deucher2014-02-181-10/+40
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: move platform caps fetching to a separate functionAlex Deucher2014-02-181-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>
* drm/radeon/dpm: make some functions static for CIAlex Deucher2014-01-071-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>
* drm/radeon/pm: move pm handling into the asic specific codeAlex Deucher2013-12-241-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>
* drm/radeon/dpm: switch on new late_enable callbackAlex Deucher2013-12-241-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>
* drm/radeon/dpm: add late_enable for CIAlex Deucher2013-12-241-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>
* drm/radeon/cik: drop cg_update from dpm codeAlex Deucher2013-12-241-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>
* drm/radeon: add hawaii dpm supportAlex Deucher2013-11-081-11/+47
| | | | | | | This updates the CI dpm (dynamic power management) support for hawaii. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tablesAlex Deucher2013-09-231-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>
OpenPOWER on IntegriCloud