summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_atombios.c
AgeCommit message (Collapse)AuthorFilesLines
2013-08-31drm/radeon: add support for thermal controller on KB/KVAlex Deucher1-0/+5
No support for reading temperature back yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-31drm/radeon/cik: implement some more atom helpers for DPMAlex Deucher1-0/+115
Required for DPM on CIK. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-30drm/radeon/atom: fix fb when fetching engine paramsAlex Deucher1-1/+1
For correctness. The fb divider isn't actually used in any of the relevant dpm code. It's calculated from the other parameters. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-18drm/radeon/dpm/atom: fix broken gcc harderAlex Deucher1-3/+6
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-07-17drm/radeon/dpm/atom: restructure logic to work around a compiler bugAndre Heider1-2/+3
It seems gcc 4.8.1 generates bogus code for the old logic causing part of the function to get skipped. Fixes: 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-07-17drm/radeon/dpm: fix atom vram table parsingAlex Deucher1-16/+10
Parsing the table in incorrectly led to problems with certain asics with mclk switching. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-17drm/radeon: fix an endian bug in atom table parsingAlex Deucher1-1/+1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-06drm/radeon: set default clocks for SI when DPM is disabledAlex Deucher1-0/+4
Fix patching of vddc values for SI and enable manually forcing clocks to default levels as per NI. This improves the out of the box performance with SI asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-04drm/radeon: fix endian bug in radeon_atom_get_mclk_range_table()Alex Deucher1-1/+1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-01drm/radeon: fix typo in radeon_atom_init_mc_reg_table()Alex Deucher1-1/+2
Bad pointer math. Fixes hangs in state transitions with BTC+ asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-07-01drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table()Alex Deucher1-1/+1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: fix endian issues in atombios dpm codeAlex Deucher1-5/+5
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon/atom: fix voltage table parsingAlex Deucher1-150/+170
The arrays items are variable sized. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: fix typo in atom voltage table handling (si+)Alex Deucher1-2/+2
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: fix typo in atom voltage table handling (6xx-ni)Alex Deucher1-4/+4
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: update radeon_atombios_get_default_voltages for mvddAlex Deucher1-4/+7
Add a way to look up the bootup mvdd. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon/dpm: validate voltages against dispclk requirementsAlex Deucher1-0/+1
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-28drm/radeon: add atom get leakage vddc functionAlex Deucher1-0/+7
Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: update radeon_atom_get_voltage_table() for SIAlex Deucher1-25/+65
SI uses a new atom table revision. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon: update radeon_atom_is_voltage_gpio() for SIAlex Deucher1-21/+50
SI uses a new atom table. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-28drm/radeon/atom: add helper to calcuate mpll paramsAlex Deucher1-0/+51
There's a new table for calculating the memory pll parameters on SI. Required for SI DPM support. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon/kms: add dpm support for rv6xx (v3)Alex Deucher1-2/+2
This adds dpm support for rv6xx 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: remove duplicate line v3: fix thermal interrupt check noticed by Jerome Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2013-06-27drm/radeon/kms: add atom helper functions for dpm (v3)Alex Deucher1-7/+653
dpm needs access to atombios data and command tables for setup and calculation of a number of parameters. v2: endian fix v3: fix mc reg table bug Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon: update radeon_atom_get_clock_dividers for CIKAlex Deucher1-1/+19
CIK uses a slightly different variant of the table structs and params. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon: update radeon_atom_get_clock_dividers() for SIAlex Deucher1-1/+5
SI uses v5 of the command table and uses a different table for memory PLLs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon: add SS override support for KB/KVAlex Deucher1-0/+17
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon: update power state parsing for CIAlex Deucher1-0/+10
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-27drm/radeon: handle the integrated thermal controller on CIAlex Deucher1-0/+6
No support for reading the temperature yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-02drm/radeon: fix handling of v6 power tablesAlex Deucher1-6/+5
The code was mis-handling variable sized arrays. Reported-by: Sylvain BERTRAND <sylware@legeek.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-05-02drm/radeon: clarify family checks in pm table parsingAlex Deucher1-3/+3
We actually care about the chip family rather than the DCE version although functionally they are the same. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-02drm/radeon: fix possible segfault when parsing pm tablesAlex Deucher1-1/+9
If we have a empty power table, bail early and allocate the default power state. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=63865 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-24drm/radeon: fix endian bugs in radeon_atom_get_clock_dividers() (v3)Alex Deucher1-4/+2
v2: fix copy paste typo. v3: clarify new union member Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-09drm/radeon: add radeon_atom_get_clock_dividers helperChristian König1-0/+107
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-04Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-2/+13
Pull drm merge (part 1) from Dave Airlie: "So first of all my tree and uapi stuff has a conflict mess, its my fault as the nouveau stuff didn't hit -next as were trying to rebase regressions out of it before we merged. Highlights: - SH mobile modesetting driver and associated helpers - some DRM core documentation - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write combined pte writing, ilk rc6 support, - nouveau: major driver rework into a hw core driver, makes features like SLI a lot saner to implement, - psb: add eDP/DP support for Cedarview - radeon: 2 layer page tables, async VM pte updates, better PLL selection for > 2 screens, better ACPI interactions The rest is general grab bag of fixes. So why part 1? well I have the exynos pull req which came in a bit late but was waiting for me to do something they shouldn't have and it looks fairly safe, and David Howells has some more header cleanups he'd like me to pull, that seem like a good idea, but I'd like to get this merge out of the way so -next dosen't get blocked." Tons of conflicts mostly due to silly include line changes, but mostly mindless. A few other small semantic conflicts too, noted from Dave's pre-merged branch. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ...
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells1-2/+2
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
2012-09-20drm/radeon: implement bounds checking on thermal controller lookupAlex Deucher1-2/+9
Don't read past the end of the array if we encounter an unknown thermal controller. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-20drm/radeon: track whether the GPU controls the backlight (v2)Alex Deucher1-0/+4
A table in the vbios tells us whether the GPU backlight controller is used or not. If the bit is set, the GPU backlight controller is used; if it is not set, an off-chip backlight controller is used. v2: store all the firmware flags, not just BL control Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-20drm/radeon/kms: extend the Fujitsu D3003-S2 board connector quirk to cover ↵Tvrtko Ursulin1-1/+1
later silicon stepping There is a more recent APU stepping with a new PCI ID shipping in the same board by Fujitsu which needs the same quirk to correctly mark the back plane connectors. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2012-08-13drm/radeon: properly handle SS overrides on TN (v2)Alex Deucher1-12/+37
The IntegratedSystemInfo table changed versions on TN. Update the SS override lookup to handle it. v2: fix copy-paste typo. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-05-29drm/radeon: fix XFX quirkAlex Deucher1-1/+3
Only override the ddc bus if the connector doesn't have a valid one. The existing code overrode the ddc bus for all connectors even if it had ddc bus. Fixes ddc on another XFX card with the same pci ids that was broken by the quirk overwriting the correct ddc bus. Reported-by: Mehdi Aqadjani Memar <m.aqadjanimemar@student.ru.nl> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21drm/radeon/kms: update power table parsing for SIAlex Deucher1-0/+21
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21drm/radeon/kms/atom: add support for SI SetVoltage tableAlex Deucher1-6/+33
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21drm/radeon/kms: fix up atom HPD gpio parsing for DCE6Alex Deucher1-1/+3
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21drm/radeon/kms: upstream power table updatesAlex Deucher1-7/+7
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-20drm/radeon/kms: add connector quirk for Fujitsu D3003-S2 boardAlex Deucher1-0/+14
vbios lists DVI-I port as VGA and DVI-D. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47007 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-22drm/radeon/kms/atom: dpms bios scratch reg updatesAlex Deucher1-0/+3
dpms bits not used on DCE4+ Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-14drm/radeon/kms/atom: bios scratch reg handling updatesAlex Deucher1-0/+17
- Add missing DFP6 connection state handling - crtc routing bits not used on DCE4+ Noticed by sylware on phoronix. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-03drm/radeon/kms/atom: fix possible segfault in pm setupAlexander Müller1-1/+5
If we end up with no power states, don't look up current vddc. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44130 agd5f: fix patch formatting Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-23drm/radeon/kms/atom: unify i2c gpio table handlingAlex Deucher1-128/+86
Split the quirks and i2c_rec assignment into separate functions used by both radeon_lookup_i2c_gpio() and radeon_atombios_i2c_init(). This avoids duplicating code and cases where quirks were only added to one of the functions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-23drm/radeon/kms: fix up gpio i2c mask bits for r4xx for realAlex Deucher1-0/+12
Fixes i2c test failures when i2c_algo_bit.bit_test=1. The hw doesn't actually require a mask, so just set it to the default mask bits for r1xx-r4xx radeon ddc. I missed this part the first time through. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>