Commit b7cb9b91 authored by Maxime Ripard's avatar Maxime Ripard

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: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent f8c73f4f
...@@ -112,16 +112,23 @@ EXPORT_SYMBOL(sun4i_tcon_enable_vblank); ...@@ -112,16 +112,23 @@ EXPORT_SYMBOL(sun4i_tcon_enable_vblank);
void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel, void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel,
struct drm_encoder *encoder) struct drm_encoder *encoder)
{ {
u32 val;
if (!tcon->quirks->has_unknown_mux) if (!tcon->quirks->has_unknown_mux)
return; return;
if (channel != 1) if (channel != 1)
return; return;
if (encoder->encoder_type == DRM_MODE_ENCODER_TVDAC)
val = 1;
else
val = 0;
/* /*
* FIXME: Undocumented bits * 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); EXPORT_SYMBOL(sun4i_tcon_set_mux);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment