History log of /drivers/gpu/drm/radeon/radeon_encoders.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b2681ba271c9f5bb66cb0d8ceeaa215fcd218d8 20-Mar-2012 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: update duallink checks for DCE6

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
38aa4a568ba4c3ccba83e862a01e3e60e3b811ee 08-Mar-2012 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: fix hdmi duallink checks

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
9aa59993e226af94088adaee993eb8cfd33ae295 20-Jan-2012 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: refine TMDS dual link checks

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
dc87cd5c264cb587f16459285565830689ecf7a7 03-Dec-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
3f03ced88087923863aa96a5773072ef2417bbed 30-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: move atom encoder setup to a new file

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
996d5c59006cd970dd3a9007aa1f76532909bae2 26-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: check for DP MST mode in a few more places (v2)

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
c41384f8279f6eeecfe186976f67c2a513f3c81b 26-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms/atom: rework encoder dpms

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
1d33e1fc8dcce667a70387b666a8b6f60153d90f 31-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: rework DP bridge checks

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
a4863ca93ccc52a83e7fbfc068b411b7faa03805 13-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms/DCE4.1: fix Select_CrtcSource EncodeMode setting for DP 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>
/drivers/gpu/drm/radeon/radeon_encoders.c
3a6dea31453a101bd5e9e9c89a79f4fcb6b0342e 13-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms/DCE4.1: fix dig encoder to transmitter mapping

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
cb7cf41961fe10773c491c75ae73539ad4bbed66 06-Oct-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
fdfc61594e6de21c23f955818ef78bcab9bafe40 22-Sep-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: fix DDIA enable on some rs690 systems

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
33ae1827d6c3c79c5957536ec29d5a8780623147 11-Aug-2011 Alex Deucher <alexander.deucher@amd.com> drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
74d074eecbb4778e5f5ee7d59399da971682c532 17-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add missing param for dce3.2 DP transmitter setup

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
8323fa6ba313ae2664420ec34d56a7fb0bbbe525 17-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
11b0a5b89adbfaf4e7d31f2482f49471dd983692 16-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: set DP link config properly for DP bridges

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
d6c669528a5367aaa5f4e712acef990b7148aee8 13-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: issue blank/unblank commands for ext encoders

Required for DPMS on some systems.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
591a10e16c2a43f6f2ea5f307ab2a5afecfb9ed9 13-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix support for DDC on dp bridges

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
d629a3ceb4fc1ab5aab737b964100d114aba1173 13-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add support for load detection on dp bridges

dp to vga bridges for example.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
fbb87773655e7b0292756f9533c3fc21aca0797f 13-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: rework atombios_get_encoder_mode()

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
f3aeceac61b6e2f3167717ea1793472108e47564 03-Jun-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: fix PHY init

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
ac89af1e1010640db072416c786f97391b85790f 22-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: move dig phy init out of modesetting

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
224d94b1445e2a836cd3790ff29f1866c052de4d 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: rewrite DP handling

- 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>
/drivers/gpu/drm/radeon/radeon_encoders.c
558e27db8f6a5e364dc6a88087f886049ac17e70 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: add support for setting DP panel mode

Required for proper operation with DP bridges.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
eac4dff6d3edc0aea1941db16c03ae19aa628a3c 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: handle DP bridges

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
d7fa8bb385d71c0c0c563a063a0f574adc532585 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add some dp encoder/connector helper funcs

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
4e633939fe39a98824a0c590a6c1e30559071100 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: make sure eDP panel is on for modesetting

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
2dafb74d63d3f79d0357ff19bf7691c22b034926 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix eDP panel power function

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
3a5f4a21c5708479a9334c8a8268f300aea2c628 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: adjust eDP handling (v2)

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
86a94defe2b88380c28547d7053633b26a397d42 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix up DP clock programming on DCE4/5

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
df271bec805b42527d864777ed035fcbb42e76c0 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: properly handle bpc >8 in atom command tables

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
96b3bef8c1d20b3f0087a26313296bf476930380 20-May-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: DCE4.1 DIG encoders are fully routeable just like DCE3.2

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
cb49ba0bb18632faa7c5ce1dcb095eaa70821c1d 27-Apr-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: remove some underscan leftovers

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
4589433c57bd34b7e49068549e07a43c8d41e39d 12-Feb-2011 Cédric Cano <ccano@interfaceconcept.com> drm/radeon/kms: atombios big endian fixes

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
c9417bdd4c6b1b92a21608c07e83afa419c7bb62 06-Feb-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix interlaced modes on dce4+

- 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>
/drivers/gpu/drm/radeon/radeon_encoders.c
e468e0017b656841b661e57a948c3b858d58b959 28-Jan-2011 Stefan Weil <weil@mail.berlios.de> drm/radeon: Fix wrong boolean operator

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
9453d621186426500aa50049dfa0a8b15c86201d 25-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: only enable HDMI mode if radeon audio is enabled

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
c268cd36cc8fd543f58aee0392c78bb92e54edcb 17-Dec-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: only enable hdmi features if the monitor supports audio

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
36868bda88b92ce8a9aa8b3ee2e0d1e0de09cc19 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: parse DCE5 encoder caps when setting up encoders

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
d07f4e83506712f31ad661415ea28d536a70a939 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: dvo dpms updates for DCE5

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
69c74525c26a1b71116d9bd3a136bf1314a3e8cd 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: dac dpms updates for DCE5

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
badbb57b93adda990b4e2420ddfdf834504a217e 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: DCE5 atom dig encoder updates

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
a001182af807e2e0e1eb497dc5418d1220406d9b 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: DCE5 atom transmitter control updates

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
633b91643f50779897bcab5e50d08a4fe4ba9f13 07-Jan-2011 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: clean up ASIC_IS_DCE41() macro

only fusion asics are dce4.1

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
b61c99de8e7905916d1508ba7c9a9c08656e169d 17-Dec-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix DCE4.1 dig routing (v2)

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
bf982ebf22d5d84dd4a2a8d8f1a11f75920020a7 22-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: Add support for external encoders on fusion APUs

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
4e8c65a1f9ee1a976d95c1d5d2027761aba2f1c3 22-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: atom changes for DCE4.1 devices

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
3e4b99828d1c8abefefd37474503605c811c1b51 16-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: add proper external encoders support

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
99999aaa091bdb3e16b5eed22f3a9a567f84f0fe 16-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: cleanup and unify DVO handling

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
8b834852d705af75ba942b040ca28533329ff13c 17-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: properly power up/down the eDP panel as needed (v4)

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>
/drivers/gpu/drm/radeon/radeon_encoders.c
c7a71fc761551dc8be8543f14a90d08cda4e77f9 17-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: set sane defaults in atombios_get_encoder_mode()

If there was no connector mapped to the encoder, atombios_get_encoder_mode()
returned 0 which is the id for DP. Return something sane instead based on
the encoder id. This avoids hitting the DP paths on non-DP encoders.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
ba251bde9ab8bdce8fbd3f60dbb71b36cc4c9adf 16-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: turn the backlight off explicitly for dpms

Seems some newer systems require this explicitly.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
fb939dfcf2a3a70357000617799925b6a11f9348 08-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add support for clock/data path routers

This is a follow on to:
26b5bc986423cf3887e09188cb662ed651c5374d
(drm/radeon/kms: add support for router objects)

That patch added support for systems that use a mux to control
the ddc line routing between the connectors. This patch adds
support for systems that use a mux to control the encoder
clock and data path routing to the connectors.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=31339

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
a0ae5864d42b41c411368bd689462bf063c029c8 02-Nov-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: don't disable shared encoders on pre-DCE3 display blocks

The A/B links aren't independantly useable on these blocks so when
we disable the encoders, make sure to only disable the encoder when
there is no connector using it.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=18564

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
ba032a58d1f320039e7850fb6e8651695c1aa571 04-Oct-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: rework spread spectrum handling

This patch reworks spread spectrum handling to enable it
properly on lvds and DP/eDP links. It also fixes several
bugs in the old spread spectrum code.

- Use the ss recommended reference divider if available
when calculating the pll
- Use the proper ss command tables on pre-DCE3 asics
- Avoid reading past the end of the ss info tables
- Enable ss on evergreen asics (lvds, dp, tmds)
- Enable ss on DP/eDP links

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
d033af87e2a215a57ac2bbc47e0d7a544f2afcc4 20-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: set encoder type to DVI for HDMI on evergreen

Fixes the pink line that shows up with some hdmi monitors. This
will need to be revisited when audio support is added.

Fixes:
http://bugs.freedesktop.org/show_bug.cgi?id=27452

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
4aab97e818c255a1bc25bb981f121a7992c6b290 13-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: clean up dig atom handling

This allows the tables to be run in some additional cases
where the connector info isn't necessary.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
e13b2ac1c46b9194ea9f44904760d3d49669529b 13-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: DCE3/4 transmitter fixes

- INIT action takes the actual connector type id, not the enum id
- some evergreen cards have the ENABLE_OUTPUT/DISABLE_OUTPUT actions

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
5137ee940c3e593ae5578a7a12a604eb8f239ac0 13-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: rework encoder handling

On most newer asics, digital encoders have two links each
and they can be used independantly. As such, treat them as
separate encoders otherwise the individual links will not
get programmed properly at modeset time.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
430f70d59da643f1aa7c9cf3493423a76550b110 04-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: only expose underscan on avivo chips

R4xx also uses the atom add connector function, but underscan is only
supported on avivo chips.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
5b1714d386a2f0c0d270e3abe1ac39ad1b0ba010 04-Aug-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: enable underscan option for digital connectors

This connector attribute allows you to enable or disable underscan
on a digital output to compensate for panels that automatically
overscan (e.g., many HDMI TVs). Valid values for the attribute are:

off - forces underscan off
on - forces underscan on
auto - enables underscan if an HDMI TV is connected, off otherwise

default value is auto.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
d9fdaafbe912a34ef06ed569c6606fe2811f325b 02-Aug-2010 Dave Airlie <airlied@redhat.com> drm/radeon/kms: move a bunch of modesetting debug to correct debug usage.

This migrates a bunch of DRM_DEBUG->DRM_DEBUG_KMS so we can get more modesetting related info without all the other ioctl handling easily.

Also the PM code moves to DRM_DEBUG_DRIVER mostly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
a5f798ce2b9de4b14c46cb68d58c488dc1b8e215 10-Jun-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix DP after DPMS cycle

The transmitter needs to be enabled before the link is trained.

Reported-By: Lars Doelle <lars.doelle@on-line.de>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
05ea893c46805b2981ea8ba6df881e3d65edd63b 19-May-2010 Dave Airlie <airlied@redhat.com> Merge remote branch 'anholt/drm-intel-next' into drm-next

* anholt/drm-intel-next: (515 commits)
drm/i915: Fix out of tree builds
drm/i915: move fence lru to struct drm_i915_fence_reg
drm/i915: don't allow tiling changes on pinned buffers v2
drm/i915: Be extra careful about A/D matching for multifunction SDVO
drm/i915: Fix DDC bus selection for multifunction SDVO
drm/i915: cleanup mode setting before unmapping registers
drm/i915: Make fbc control wrapper functions
drm/i915: Wait for the GPU whilst shrinking, if truly desperate.
drm/i915: Use spatio-temporal dithering on PCH
[MTD] Remove zero-length files mtdbdi.c and internal.ho
pata_pcmcia / ide-cs: Fix bad hashes for Transcend and kingston IDs
libata: Fix several inaccuracies in developer's guide
slub: Fix bad boundary check in init_kmem_cache_nodes()
raid6: fix recovery performance regression
KEYS: call_sbin_request_key() must write lock keyrings before modifying them
KEYS: Use RCU dereference wrappers in keyring key type code
KEYS: find_keyring_by_name() can gain access to a freed keyring
ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice)
ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582
ALSA: take tu->qlock with irqs disabled
...
03214bd5c6e59c83703238227254deef8810513d 16-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/pm: move pm state update to crtc functions

crtcs are what we ultimately care about wrt to pm.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
8bf3aae6214792a5f758fb6f82cf25a98ac8e5a0 08-May-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix copy pasto in disable encoders patch

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
aa9613916a461027fdade8661177660db0975806 07-May-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: disable the encoders in encoder_disable

Previously we just set them to dpms off. This should save
additional power.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
3515387ba90ef2c38602f4d52c4d5ec5fc95ae5c 30-Apr-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix panel scaling adjusted mode setup

This should duplicate exactly what the ddx does for both
legacy and avivo.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
c6f8505e4627ba8ca46cbcb602ad82e7f17a7122 23-Apr-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/evergreen: No EnableYUV table

DCE4 cards don't have an EnableYUV table.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
d3a67a43b0460bae3e2ac14092497833344ac10d 13-Apr-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: disable the tv encoder when tv/cv is not in use

Switching between TV and VGA caused VGA to break on some systems
since the TV encoder was left enabled when VGA was used.

fixes fdo bug 25520.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
b317a9ce2259e64258a802a5ca70dec45ac15dda 15-Apr-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0

Got broken during the evergreen merge.
Fixes fdo bug 27001.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
affd858907aae7bf7d7d7fa02ff19f35de2ff1d8 06-Apr-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: clean up atom dac handling

- make sure legacy dac1 has an enc priv
- remove unused num var
- no need for extra tv_dac var in atom dac functions

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
fb668c2fed628179c7aa409a0de39a2b96bed18c 31-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/evergreen: get DP working

Need to enable the VID stream after link training

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
9f998ad7e92a1653b6b396b1278e75560a8be519 30-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)

Some systems have LCD* rather than DFP* device tags in the bios
for eDP connectors; notably the new apple iMac. This fixes
things up so eDP connectors with either tag will work.

v2: fix typo

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
d9c9fe3622d15e7e84121ffedef60f4080ab4f03 29-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: minor fixes to transmitter setup

- 8 lane links are not valid for DP
- remove unused num var

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
a084e6ee6e64a76f1a9665d527203cdab7d6048f 18-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: make sure tables are valid (v2)

Check that atom cmd and data tables are valid
before using them.

(v2)
- fix some whitespace errors noticed by Rafał Miłecki
- check a few more cases

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
2cd6218cb8043ef4360b561e726cd081f8a380cc 08-Mar-2010 Rafał Miłecki <zajec5@gmail.com> drm/radeon/kms: clean assigning HDMI blocks to encoders

We almost always used first HDMI block for first encoder and second for sencod.
Exception was KLDSCP_LVTMA. Analyzing code picking DIG encoder shows the same
behaviour. It shows HDMI block are related to DIGs, which relation we now use.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
267364ac17f6474c69b03034340f769b22f46105 08-Mar-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: further spread spectrum fixes

Adjust modeset ordering to fix spread spectrum.
The spread spectrum command table relies on the
crtc routing to already be set in order to work
properly on some asics.

Should fix fdo bug 25741.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
bcc1c2a1d22974215e39dc87ce746ba9a39223e5 12-Jan-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx)

This adds initial Evergreen KMS support, it doesn't include
any acceleration features or interrupt handling yet.

Major changes are DCE4 handling for PLLs for the > 2 crtcs.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
c913e23a145ae07b6f9f88aae8cd5ad06b5729ff 22-Dec-2009 Rafał Miłecki <zajec5@gmail.com> drm/radeon/kms: add dynamic engine reclocking (V9)

V2: reorganize functions, fix modesetting calls
V3: rebase patch, use radeon's workqueue
V4: enable on tested chipsets only, request VBLANK IRQs
V5: enable PM on older hardware (IRQs, mode_fixup, dpms)
V6: use separate dynpm module parameter
V7: drop RADEON_ prefix, set minimum mode for dpms off
V8: update legacy encoder call, fix order in rs600 IRQ
V9: update compute_clocks call in legacy, not only DPMS_OFF

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
9ae4786712166638a8daed902886ef400e88ab24 02-Feb-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: add a helper function to get the radeon connector priv

This is used in a lot of places in the atom encoder code.

While here fix the spelling of crtc_source_params.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
f28cf33945cc112f8ee835512b7440905dc29ad2 28-Jan-2010 Dave Airlie <airlied@redhat.com> drm/kms/radeon: pick digitial encoders smarter. (v3)

booting a Lenovo W500 with LVDS + DP outputs showed up a TODO we had
on our list, to pick a correct digital encoder block. The LVTMA
encoder requires the second digital encoder, all others can use any
encoder at all.

This fixes the digital encoder selection logic to enable LVDS/DP combos
to work okay.

V2: fix silly addition of connector dig_block and cleanup the other
places in the code that pick the encoder.

V3: rename to dig_encoder and clean up further - also fix
the picking algorithm.

tested on Lenovo W500 + desktop 3650 cards.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
43c33ed87d0f1b900a6a3014db556ecc7f4a989b 29-Jan-2010 Dave Airlie <airlied@linux.ie> drm/radeon/kms: use active device to pick connector for encoder

On the W500 we have UNIPHY routed to both DVI and DP, this seems
to always pick the DVI connector which means link training fails.

Switch to using active device to pick the connector, this seems
like it should be safe from a code review, and it fixes things
a bit more here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
196c58d21fc47fbabab6a98e23e5a6335f717e44 07-Jan-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add support for eDP (embedded DisplayPort)

This is displayport used for internal connections such
as laptop panels and systems with integrated monitors.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
a5899fcc189e9357873ddf26d5e6e7e6ff84c2f4 07-Jan-2010 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix typo in atom connector type handling

Also remove the problematic enums that were unused
remnants from the ddx.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
310a82c8c5fc431913fe34a17251118e71c2c876 17-Dec-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix legacy rmx

This makes 640x480 on my R100 work again, both
in aspect and centered mode.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
edc664e314d5dadc326cfc15a536fe906d652204 17-Dec-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: fill in proper defines for digital setup

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
dafc3bd515d6079406986f7748b48adb3c7170f2 11-Oct-2009 Christian Koenig <deathsimple@vodafone.de> drm/radeon/kms: HDMI support for R600 KMS

Adding basic HDMI support for R600 KMS, ported from radeonhd ddx.

[airlied:- checkpatch cleanups]
Signed-off-by: Christian Koenig <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
58682f107ad5178e47a45af3af1851442d05d7fc 25-Nov-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: do dp link training at dpms on time not mode set.

This moves the radeon DP link training call to happen when we
dpms on the encoder not when we set the mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
5801ead6bd6bddf5505d6eab55f84d8ee8106cd8 24-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: add support for DP modesetting

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
f92a8b6758bdc0f277c4f42aa7d736a205ac9ded 24-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: handle dp sinks in atom encoder/transmitter tables

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
1a66c95a64c9ae0bc8382254f544b24b23f498ec 21-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: DP fixes and cleanup from the ddx

- dpcp -> dpcd
- fix up dig encoder routing
- aux transaction table takes delay in 10 usec units

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
746c1aa4d100f7441423050f34be79f401fbf7d4 07-Dec-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: initial radeon displayport porting

This is enough to retrieve EDID and DPCP.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
50dafba685c0f12c23d315820370b32d9ba64db7 01-Dec-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: call correct atom table for digital output dpms.

found while working on displayport.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
32f48ffea91008a27b99aab7a68a3443559d83fb 30-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix LVDS setup on r4xx

R4xx mobility chips use atombios, which does not store
the LVDS_GEN_CNTL parameter setup like combios. Rather,
it's configured in LVDSEncoderControl. As such,
LVDS_GEN_CNTL is set wrong when on resume. Call
LVDSEncoderControl to set it properly.

Should fix fdo bug 25336

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
1f3b6a45f0805690269a7a9d265cbbc2f15b6c6e 13-Oct-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: add support for encoder cloning.

The RN50 really needs this since its a single crtc card,
however other gpus may benefit from it as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
80297e87bc9728a6ce559063fc4c117eba1f955a 12-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: rework scaler handling

Keep requested scaler type in radeon_encoder
and the actual scaler type used in radeon_crtc.
This prevents us from enabling the scaler when it's
not required (i.e., the requested mode is the native
mode). Also, always set the adjusted mode equal
to the native mode for lvds.

Should fix:
https://bugzilla.redhat.com/show_bug.cgi?id=522271

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
f95a9f0b05d22cffc46fbd2d065b260f8405e43f 05-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom/dce3: call transmitter init on mode set

Generally this is done at post, but might not always be done
with softboot or for connectors on docking stations.

Could probably be done once when the driver loads/resumes
rather than on each mode set.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
4170a6c1bc106d7fcf94f5842224ac4dac61006b 05-Nov-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom/dce3: fix up usPixelClock calculation for Transmitter tables

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
ceefedd8e8a80b743fa0b6d6b1992be7029a9efb 14-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: fix tv-out

D1MODE_INTERLEAVE_EN was getting set in some cases
in the encoder quirks function due to the changes in
5a9bcacc0a56f0d9577494e834519480018a6cc3

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
0294cf4f7f895ddcf284b1ce7cf27a2c9d7106f7 15-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: fix connector edid handling

Based partly on a patch from
Christian Koenig <deathsimple@vodafone.de>

- fix several memory leaks in radeon_connector->edid handling
- store edid in radeon_connector->edid in detect() or get_modes()
- switch hdmi detect code to use radeon_connector->edid
- add support for oem boards multiple connectors that share
a ddc line.
- short circuit lvds_detect() if have a stored edid

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
8c2a6d730400e14bf28ccfa11b9bbf453db775ec 14-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: move active_device setup into encoder fixup()

radeon_encoder->active_device defines the active routing
between the encoder and connector. The encoder fixup and
dpms functions need to know the active_device to function
properly. Setting active_device in the prepare hook was
too late in some cases.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
fb06ca8f8c61dfd7cbfa2092756577ff78a26dcd 12-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: properly handle mode id with native mode changes

drm modes are objects with indentifiers. Make sure to preserve
the mode id when copying mode params.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
de2103e452ec7f2db5db7c44279735688608381d 09-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: use drm_mode directly for panel modes

This reduces the number of mode format conversions needed
and makes native panel mode support cleaner.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
5a9bcacc0a56f0d9577494e834519480018a6cc3 08-Oct-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms/atom: rework crtc modeset

- clean up tv timing handling
- unify SetCRTC_Timing and SetCRTC_UsingDTDTiming

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
dfee5614e4d83a32cef9193a8b19bc1d8900f93d 02-Oct-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: respect single crtc cards, only create one crtc. (v2)

Also add single crtc for RN50 chips.

changes in v2:
fix vblank init to respect single crtc flag
fix r100 mode bandwidth to respect single crtc flag

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
445282db9e815e7f5e82761c3c971dc9ea988d85 09-Sep-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: add initial connector properties

This adds:
coherent mode: TMDS coherent mode for atom cards.
scaling mode: LVDS scaler mode
load detect: DAC load detection, DVI-I, VGA, TV
tmds pll: legacy TMDS pll selection
tv standard: TV standard selection.

for later: other TV ones? dvi subconnector selection using std prop

[contains fixes pointed out on dri-devel for atom bios mixups
by Michel]

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
705af9c7a8bcb9c8752a73be9ca356acb5c7688c 10-Sep-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: pull in latest quirks and fixes from ddx

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
60d15f551abdbc5fef70d85f55aac1e85950bf59 08-Sep-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: re-apply 2007d633d639c896396e4c4b53b38068f3831307

Got accidently reverted by c93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
/drivers/gpu/drm/radeon/radeon_encoders.c
f641e51e7469cc3a8115a3bd70b4526d566b1c60 08-Sep-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: lower debugging on dpms events.

Lower the debugging on encoders when getting DPMS events.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
4ce001abafafe77e5dd943d1480fc9f87894e96f 13-Aug-2009 Dave Airlie <airlied@redhat.com> drm/radeon/kms: add initial radeon tv-out support.

This ports the tv-out code from the DDX to KMS.

adds a radeon.tv module option, radeon.tv=0 to disable tv

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
c93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac 13-Jul-2009 Jerome Glisse <jglisse@redhat.com> drm/radeon/kms: fix bandwidth computation on avivo hardware

Fix bandwidth computation and crtc priority in memory controller
so that crtc memory request are fullfill in time to avoid display
artifact.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
2007d633d639c896396e4c4b53b38068f3831307 08-Jul-2009 Alex Deucher <alexdeucher@gmail.com> drm/radeon/kms: get lvds info for DIG LVTMA and UNIPHY encoders

Noticed by Rafał Miłecki on dri-devel. On r6xx/r7xx hardware, laptop
panels can be driven by KLDSCP_LVTMA or UNIPHY.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c
771fe6b912fca54f03e8a72eb63058b582775362 05-Jun-2009 Jerome Glisse <jglisse@redhat.com> drm/radeon: introduce kernel modesetting for radeon hardware

Add kernel modesetting support to radeon driver, use the ttm memory
manager to manage memory and DRM/GEM to provide userspace API.
In order to avoid backward compatibility issue and to allow clean
design and code the radeon kernel modesetting use different code path
than old radeon/drm driver.

When kernel modesetting is enabled the IOCTL of radeon/drm
driver are considered as invalid and an error message is printed
in the log and they return failure.

KMS enabled userspace will use new API to talk with the radeon/drm
driver. The new API provide functions to create/destroy/share/mmap
buffer object which are then managed by the kernel memory manager
(here TTM). In order to submit command to the GPU the userspace
provide a buffer holding the command stream, along this buffer
userspace have to provide a list of buffer object used by the
command stream. The kernel radeon driver will then place buffer
in GPU accessible memory and will update command stream to reflect
the position of the different buffers.

The kernel will also perform security check on command stream
provided by the user, we want to catch and forbid any illegal use
of the GPU such as DMA into random system memory or into memory
not owned by the process supplying the command stream. This part
of the code is still incomplete and this why we propose that patch
as a staging driver addition, future security might forbid current
experimental userspace to run.

This code support the following hardware : R1XX,R2XX,R3XX,R4XX,R5XX
(radeon up to X1950). Works is underway to provide support for R6XX,
R7XX and newer hardware (radeon from HD2XXX to HD4XXX).

Authors:
Jerome Glisse <jglisse@redhat.com>
Dave Airlie <airlied@redhat.com>
Alex Deucher <alexdeucher@gmail.com>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/gpu/drm/radeon/radeon_encoders.c