diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-05-27 18:09:28 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-06-01 09:49:57 +0200 |
commit | b7cb9b9143bc249d494020b55a57acef36d26682 (patch) | |
tree | ed248997518bc907d60777650e21c6efb2fcf81f /drivers/gpu/drm/sun4i | |
parent | f8c73f4f027b11d1f5d3bebd9077b5a748ef2a02 (diff) |
drm/sun4i: tcon: Switch mux on only for composite
Even though that mux is undocumented, it seems like it needs to be set to 1
when using composite, and 0 when using HDMI.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/sun4i')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_tcon.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 36e25f417dc3..28da61ac9bab 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -112,16 +112,23 @@ EXPORT_SYMBOL(sun4i_tcon_enable_vblank); void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel, struct drm_encoder *encoder) { + u32 val; + if (!tcon->quirks->has_unknown_mux) return; if (channel != 1) return; + if (encoder->encoder_type == DRM_MODE_ENCODER_TVDAC) + val = 1; + else + val = 0; + /* * FIXME: Undocumented bits */ - regmap_write(tcon->regs, SUN4I_TCON_MUX_CTRL_REG, 1); + regmap_write(tcon->regs, SUN4I_TCON_MUX_CTRL_REG, val); } EXPORT_SYMBOL(sun4i_tcon_set_mux); |