summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_encoders.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/kms: update duallink checks for DCE6Alex Deucher2012-03-211-2/+4
| | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix hdmi duallink checksAlex Deucher2012-03-081-4/+2
| | | | | | | | | | | | | All pre-SI chips are limited to 165 Mhz for single link. Code in question will be re-enabled when SI support is added. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44755 https://bugzilla.kernel.org/show_bug.cgi?id=42887 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: refine TMDS dual link checksAlex Deucher2012-01-241-0/+77
| | | | | | | | | | | | | HDMI 1.3 defines single link clocks up to 340 Mhz. Refine the current dual link checks to only enable dual link for DVI > 165 Mhz or HDMI > 340 Mhz if the hw supports HDMI 1.3 (DCE3+). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44755 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_idAlex Deucher2011-12-071-4/+3
| | | | | | | | | Seems like something got mis-merged here. Noticed by kallisti5 on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: move atom encoder setup to a new fileAlex Deucher2011-11-011-2180/+2
| | | | | | | | | Leave the common code in radeon_encoders.c and move the atom specific code to atombios_encoders.c. This matches legacy encoder setup and crtc setup. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: check for DP MST mode in a few more places (v2)Alex Deucher2011-11-011-11/+9
| | | | | | | | | DP MST is DP multi-stream support, part of DP 1.2. v2: switch to a helper macro as suggested by Michel. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: rework encoder dpmsAlex Deucher2011-11-011-152/+186
| | | | | | | | The existing function was getting too big and complex. Break it down into a more manageable set of functions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rework DP bridge checksAlex Deucher2011-11-011-5/+6
| | | | | | | | Return the encoder id rather than a boolean. This is needed for differentiate between multiple DP bridge chips. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/DCE4.1: fix Select_CrtcSource EncodeMode setting for DP ↵Alex Deucher2011-10-181-1/+11
| | | | | | | | | | | | bridges (v2) Settings in this table reflect the physical panel/connector rather than the internal dig encoding. v2: fix typo for DRM_MODE_CONNECTOR_VGA case. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/DCE4.1: fix dig encoder to transmitter mappingAlex Deucher2011-10-181-4/+9
| | | | | | | | llano has fully routeable dig encoders similar to DCE3.2 while ontario has a hardcoded mapping similar to DCE4.0. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1Alex Deucher2011-10-061-3/+6
| | | | | | | | | | | | | | The encoders are supposedly fully routeable, but changing the mapping doesn't always seem to take. Using a hardcoded mapping is much more reliable. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41366 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix DDIA enable on some rs690 systemsAlex Deucher2011-09-231-1/+8
| | | | | | | | | | | DVOOutputControl checks the value of of bios scratch reg 3 on some tables and assumes the encoder is already enabled if the DFP2_ACTIVE bit is set. Clear that bit so the table sets the DDIA enable bit properly. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix regression is handling >2 heads on cedar/caicosAlex Deucher2011-08-121-0/+3
| | | | | | | | | Need to add support for 4 crtcs when setting the possible crtcs for the encoders. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add missing param for dce3.2 DP transmitter setupAlex Deucher2011-06-201-2/+3
| | | | | | | | This is used during phy init to set up the phy for DP. This may fix DP problems on DCE3.2 cards. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: fix duallink on some early DCE3.2 cardsAlex Deucher2011-06-201-1/+5
| | | | | | | | | | | | | | | Certain revisions of the vbios on DCE3.2 cards have a bug in the transmitter control table which prevents duallink from being enabled properly on some cards. The action switch statement jumps to the wrong offset for the OUTPUT_ENABLE action. The fix is to use the ENABLE action rather than the OUTPUT_ENABLE action on the affected cards. In fixed version of the vbios, both actions jump to the same offset, so the change should be safe. Reported-and-tested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: set DP link config properly for DP bridgesAlex Deucher2011-06-171-1/+2
| | | | | | | DP clock and lanes were not set properly for DP bridges. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: issue blank/unblank commands for ext encodersAlex Deucher2011-06-171-11/+14
| | | | | | | Required for DPMS on some systems. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix support for DDC on dp bridgesAlex Deucher2011-06-171-0/+12
| | | | | | | | Need to set up the bridge for DDC prior to the i2c over aux transaction. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add support for load detection on dp bridgesAlex Deucher2011-06-171-1/+48
| | | | | | | dp to vga bridges for example. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rework atombios_get_encoder_mode()Alex Deucher2011-06-171-14/+9
| | | | | | | | This should give us more reliable results if the table is called before an active device is set. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: fix PHY initAlex Deucher2011-06-051-6/+11
| | | | | | | | | | | | | | The PHY was not initialized correctly after ac89af1e1010640db072416c786f97391b85790f since the function bailed early as an encoder was not assigned. The encoder isn't necessary for PHY init so just assign to 0 for init so that the table is executed. Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com> Tested-by: Ari Savolainen <ari.m.savolainen@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: move dig phy init out of modesettingAlex Deucher2011-05-241-9/+59
| | | | | | | | It only needs to be called once at startup, not for every modeset. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rewrite DP handlingAlex Deucher2011-05-201-1/+3
| | | | | | | | | | - reorganize the functions based on use - clean up function naming - rework link training to better match what we use internally - add initial support for DP 1.2 (no MST yet) Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: add support for setting DP panel modeAlex Deucher2011-05-201-8/+11
| | | | | | | Required for proper operation with DP bridges. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: handle DP bridgesAlex Deucher2011-05-201-2/+3
| | | | | | | | | Fusion hardware often has DP to VGA/LVDS/TMDS bridges to handle non-DP encoders. Internally we treat them mostly like DP. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add some dp encoder/connector helper funcsAlex Deucher2011-05-201-0/+23
| | | | | | | Used for dp1.2 support and for dp bridges. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: make sure eDP panel is on for modesettingAlex Deucher2011-05-201-1/+7
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix eDP panel power functionAlex Deucher2011-05-201-5/+19
| | | | | | | need to wait for the panel to power up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: adjust eDP handling (v2)Alex Deucher2011-05-201-1/+2
| | | | | | | | | | eDP is usually used as an LVDS replacement, so treat it more like LVDS from the user perspective. v2: encoder mode is always DP for eDP. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix up DP clock programming on DCE4/5Alex Deucher2011-05-201-3/+8
| | | | | | | | | | | | | | | | In DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock, depending on the asic. The crtc virtual pixel clock is derived from the DP ref clock. - DCE4: PPLL or ext clock - DCE5: DCPLL or ext clock Setting ATOM_PPLL_INVALID will cause SetPixelClock to skip PPLL/DCPLL programming and only program the DP DTO for the crtc virtual pixel clock. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: properly handle bpc >8 in atom command tablesAlex Deucher2011-05-201-3/+67
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: DCE4.1 DIG encoders are fully routeable just like DCE3.2Alex Deucher2011-05-201-8/+5
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: remove some underscan leftoversAlex Deucher2011-04-281-4/+0
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: atombios big endian fixesCédric Cano2011-02-141-2/+2
| | | | | | | | agd5f: additional cleanups/fixes Signed-off-by: Cédric Cano <ccano@interfaceconcept.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix interlaced modes on dce4+Alex Deucher2011-02-141-5/+15
| | | | | | | | | | | | | | | | | | - set scaler table clears the interleave bit, need to reset it in encoder quirks, this was already done for pre-dce4. - remove the interleave settings from set_base() functions this is now handled in the encoder quirks functions, and isn't technically part of the display base setup. - rename evergreen_do_set_base() to dce4_do_set_base() since it's used on both evergreen and NI asics. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28182 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: Fix wrong boolean operatorStefan Weil2011-01-311-1/+1
| | | | | | | | | | | | | | This error is reported by cppcheck: drivers/gpu/drm/radeon/radeon_encoders.c:1066: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead? It looks like cppcheck is correct, so fix this. No test was run. Cc: David Airlie <airlied@linux.ie> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: only enable HDMI mode if radeon audio is enabledAlex Deucher2011-01-271-3/+3
| | | | | | | | | | | Force DVI mode if the user specifies radeon.audio=0. The driver doesn't handle HDMI mode properly in some cases. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27731 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: only enable hdmi features if the monitor supports audioAlex Deucher2011-01-101-3/+3
| | | | | | | | This avoids some issues in the current hdmi audio code for monitors without audio. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: parse DCE5 encoder caps when setting up encodersAlex Deucher2011-01-071-1/+5
| | | | | | | Needed to tell which DIG encoders are HBR2 capable for DP 1.2. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: dvo dpms updates for DCE5Alex Deucher2011-01-071-1/+15
| | | | | | | | The DVOOutputControl table was removed for DCE5. DVOEncoderControl now handles everything. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: dac dpms updates for DCE5Alex Deucher2011-01-071-6/+22
| | | | | | | | The DAC1OutputControl table was removed for DCE5. DAC1EncoderControl now handles everything. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: DCE5 atom dig encoder updatesAlex Deucher2011-01-071-5/+26
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: DCE5 atom transmitter control updatesAlex Deucher2011-01-071-5/+14
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: clean up ASIC_IS_DCE41() macroAlex Deucher2011-01-071-3/+3
| | | | | | | only fusion asics are dce4.1 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix DCE4.1 dig routing (v2)Alex Deucher2010-12-211-29/+25
| | | | | | | | | | | | Works more like DCE4.0 despite what the docs say. This fixes blank screen issues when changing crtc routing due to incorrect crtc to dig mapping. v2: only two DIGx blocks, routing is hardcoded based on link. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Add support for external encoders on fusion APUsAlex Deucher2010-11-231-3/+51
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: atom changes for DCE4.1 devicesAlex Deucher2010-11-231-4/+21
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: add proper external encoders supportAlex Deucher2010-11-181-0/+183
| | | | | | | | | These are external encoder chips connected via DVO or DP. The actual external encoder programming is handled by the kms encoder functions for primary encoder. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: cleanup and unify DVO handlingAlex Deucher2010-11-181-44/+46
| | | | | | | Handle all the various asic family specific things for DVO. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: properly power up/down the eDP panel as needed (v4)Alex Deucher2010-11-181-0/+50
| | | | | | | | | | | | | | | | | | The eDP panel must be powered up for aux transactions, so power it up for detect and mode probe functions, otherwise power it up or down based on dpms. v2: - only mess with eDP panel on DCE4+ - only mess with eDP panel on eDP connectors, not all DP connectors v3: - be extra careful to only mess with eDP panels on eDP connectors v4: - avoid possible null derefernce if a connector has not been assigned to the encoder Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud