summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_atombios.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/atombios: declare connector convert tables as staticMichele Curti2014-10-011-3/+3
| | | | | | | | | | | The tables: * supported_devices_connector_convert * supported_devices_connector_object_id_convert * object_connector_convert are used in redeon_atombios.c only, so declare them as static. Signed-off-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dpm: set the thermal type properly for special configsAlex Deucher2014-09-091-7/+19
| | | | | | | | | On systems with special thermal configurations make sure we make note of the thermal setup. This is required for proper firmware configuration on these systems. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: add connector quirk for fujitsu boardAlex Deucher2014-09-081-0/+7
| | | | | | | | | | Vbios connector table lists non-existent VGA port. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83184 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon/atom: add new voltage fetch function for hawaiiAlex Deucher2014-08-051-0/+35
| | | | | | | | Some hawaii boards use a different method for fetching the voltage information from the vbios. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: load the lm63 driver for an lm64 thermal chip.Alex Deucher2014-08-051-2/+2
| | | | | | | Looks like the lm63 driver supports the lm64 as well. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon/dpm: add support for SVI2 voltage for SIAlex Deucher2014-08-051-0/+44
| | | | | | | Some newer boards use SVI2 for voltage control rather than GPIO. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: adjust default dispclk on DCE6 (v2)Alex Deucher2014-07-011-1/+9
| | | | | | | | | | | | Set the default to 600Mhz if it's not set in the bios, and bump the default to 600Mhz if it's lower than that. This fixes display issues with certain 4k DP monitors when using 5.4 Ghz DP clocks. v2: fix typo. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/DCE4+: clear bios scratch dpms bit (v2)Alex Deucher2014-01-291-0/+4
| | | | | | | | | | | | | | The BlankCrtc table in some DCE8 boards has some logic shortcuts for the vbios when this bit is set. Clear it for driver use. v2: fix typo Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73420 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* Merge branch 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux into ↵Dave Airlie2014-01-221-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next Here's the vblank timestamp pull request you wanted. I addressed the few bugs that Mario pointed out and added the r-bs. As it has been a while since I made the changes, I gave it a quick spin on a few different i915 machines. Fortunately everything still seems to be fine. * 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux: drm/i915: Add a kludge for DSL incrementing too late and ISR not working drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos() drm: Pass 'flags' from the caller to .get_scanout_position() drm: Fix vblank timestamping constants for interlaced modes drm/i915: Fix scanoutpos calculations for interlaced modes drm: Change {pixel,line,frame}dur_ns from s64 to int drm: Use crtc_clock in drm_calc_timestamping_constants() drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings() drm: Simplify the math in drm_calc_timestamping_constants() drm: Improve drm_calc_timestamping_constants() documentation drm/i915: Call drm_calc_timestamping_constants() earlier drm/i915: Kill hwmode save/restore drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos() drm: Pass the display mode to drm_calc_timestamping_constants()
| * drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings()Ville Syrjälä2014-01-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | crtc_clock is now supposed to be the actual pixel clock corresponding to the other crtc_ timing values. Populate crtc_clock appropriately in radeon_atom_get_tv_timings(). This was the only obvious place where we frob with the crtc_ timigns directly instead of calling drm_mode_set_crtcinfo() which would also update crtc_clock. Reviewed-by: mario.kleiner.de@gmail.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* | drm/radeon: fix endian handling in radeon_atom_init_mc_reg_tableAlex Deucher2014-01-201-5/+7
| | | | | | | | | | | | | | Need to swap the data for big endian. Notcied by sylware in IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: handle ss percentage divider properlyAlex Deucher2014-01-201-0/+7
|/ | | | | | | It's either 100 or 1000 depending on the flags in the table. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drivers: gpu: Move prototype declarations to header file radeon_mode.h from ↵Rashika Kheria2014-01-071-5/+0
| | | | | | | | | | | | | | | | radeon_atombios.c and radeon_combios.c Move prototype declarations of functions radeon_get_encoder_enum() and radeon_link_encoder_connector() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/radeon_encoders.c: drivers/gpu/drm/radeon/radeon_encoders.c:86:1: warning: no previous prototype for ‘radeon_get_encoder_enum’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_encoders.c:162:1: warning: no previous prototype for ‘radeon_link_encoder_connector’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drivers: gpu: Move prototype declaration to header file radeon_mode.hRashika Kheria2014-01-071-12/+0
| | | | | | | | | | | | | | Move prototype declaration of functions radeon_add_atom_connector() and radeon_add_legacy_connector() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warning in drm/radeon/radeon_connectors.c: drivers/gpu/drm/radeon/radeon_connectors.c:1588:1: warning: no previous prototype for ‘radeon_add_atom_connector’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_connectors.c:2020:1: warning: no previous prototype for ‘radeon_add_legacy_connector’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in fetching mpll paramsAlex Deucher2013-12-021-1/+1
| | | | | | | | Copy-paste typo. Value should be 0-2, not 0-1. Noticed-by: Sylvain BERTRAND <sylware@legeek.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: additional gcc fixes for radeon_atombios.cAlex Deucher2013-09-201-23/+43
| | | | | | | | | | | | | | | 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. Fix up spread spectrum tables. 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: gcc fixes for radeon_atombios.cAlex Deucher2013-08-301-14/+28
| | | | | | | | | | | | | | 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: fix handling of variable sized arrays for router objectsAlex Deucher2013-08-301-3/+6
| | | | | | | | | | | | | | | | | | | The table has the following format: typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT //usSrcDstTableOffset pointing to this structure { UCHAR ucNumberOfSrc; USHORT usSrcObjectID[1]; UCHAR ucNumberOfDst; USHORT usDstObjectID[1]; }ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT; usSrcObjectID[] and usDstObjectID[] are variably sized, so we can't access them directly. Use pointers and update the offset appropriately when accessing the Dst members. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix LCD record parsingAlex Deucher2013-08-301-1/+3
| | | | | | | | | | If the LCD table contains an EDID record, properly account for the edid size when walking through the records. This should fix error messages about unknown LCD records. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: check firmware overrides for mclk/sclk ssAlex Deucher2013-08-301-0/+9
| | | | | | | | | | Check the overrides in the firmware info table before enabling spread spectrum on the engine or memory clocks. Some boards may have valid spread spectrum tables, but shouldn't necessarily have it enabled. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: add dpm support for CI dGPUs (v2)Alex Deucher2013-08-301-1/+1
| | | | | | | | | | | | | | | 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>
* drm/radeon: add support for thermal controller on KB/KVAlex Deucher2013-08-301-0/+5
| | | | | | No support for reading temperature back yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/cik: implement some more atom helpers for DPMAlex Deucher2013-08-301-0/+115
| | | | | | Required for DPM on CIK. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/atom: fix fb when fetching engine paramsAlex Deucher2013-07-291-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>
* drm/radeon/dpm/atom: fix broken gcc harderAlex Deucher2013-07-171-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>
* drm/radeon/dpm/atom: restructure logic to work around a compiler bugAndre Heider2013-07-171-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>
* drm/radeon/dpm: fix atom vram table parsingAlex Deucher2013-07-171-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>
* drm/radeon: fix an endian bug in atom table parsingAlex Deucher2013-07-171-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: set default clocks for SI when DPM is disabledAlex Deucher2013-07-051-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>
* drm/radeon: fix endian bug in radeon_atom_get_mclk_range_table()Alex Deucher2013-07-031-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in radeon_atom_init_mc_reg_table()Alex Deucher2013-07-011-1/+2
| | | | | | | Bad pointer math. Fixes hangs in state transitions with BTC+ asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table()Alex Deucher2013-07-011-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix endian issues in atombios dpm codeAlex Deucher2013-06-271-5/+5
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/atom: fix voltage table parsingAlex Deucher2013-06-271-150/+170
| | | | | | The arrays items are variable sized. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in atom voltage table handling (si+)Alex Deucher2013-06-271-2/+2
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix typo in atom voltage table handling (6xx-ni)Alex Deucher2013-06-271-4/+4
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update radeon_atombios_get_default_voltages for mvddAlex Deucher2013-06-271-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>
* drm/radeon/dpm: validate voltages against dispclk requirementsAlex Deucher2013-06-271-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>
* drm/radeon: add atom get leakage vddc functionAlex Deucher2013-06-271-0/+7
| | | | | | Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update radeon_atom_get_voltage_table() for SIAlex Deucher2013-06-271-25/+65
| | | | | | SI uses a new atom table revision. 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-21/+50
| | | | | | SI uses a new atom table. Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/atom: add helper to calcuate mpll paramsAlex Deucher2013-06-271-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>
* drm/radeon/kms: add dpm support for rv6xx (v3)Alex Deucher2013-06-271-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>
* drm/radeon/kms: add atom helper functions for dpm (v3)Alex Deucher2013-06-271-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>
* drm/radeon: update radeon_atom_get_clock_dividers for CIKAlex Deucher2013-06-261-1/+19
| | | | | | | CIK uses a slightly different variant of the table structs and params. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update radeon_atom_get_clock_dividers() for SIAlex Deucher2013-06-261-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>
* drm/radeon: add SS override support for KB/KVAlex Deucher2013-06-261-0/+17
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: update power state parsing for CIAlex Deucher2013-06-261-0/+10
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: handle the integrated thermal controller on CIAlex Deucher2013-06-261-0/+6
| | | | | | No support for reading the temperature yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix handling of v6 power tablesAlex Deucher2013-05-021-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
OpenPOWER on IntegriCloud