Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/sun4i: lvds: Invert the LVDS polarity

The LVDS controller can invert the polarity / lanes of the LVDS output.
The default polarity causes some issues on some panels.

However, U-Boot has always used the opposite polarity without any reported
issue, and the only currently supported LVDS panel in-tree (the TBS A711)
seems to be able to work with both settings.

Let's just use the same polarity than U-Boot to be more consistent and
hopefully support all the panels.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Cc: Ondrej Jirman <megous@megous.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200704133803.37330-1-maxime@cerno.tech

+1 -3
+1 -3
drivers/gpu/drm/sun4i/sun4i_tcon.c
··· 474 474 SUN4I_TCON0_BASIC2_V_TOTAL(mode->crtc_vtotal * 2) | 475 475 SUN4I_TCON0_BASIC2_V_BACKPORCH(bp)); 476 476 477 - reg = SUN4I_TCON0_LVDS_IF_CLK_SEL_TCON0 | 478 - SUN4I_TCON0_LVDS_IF_DATA_POL_NORMAL | 479 - SUN4I_TCON0_LVDS_IF_CLK_POL_NORMAL; 477 + reg = SUN4I_TCON0_LVDS_IF_CLK_SEL_TCON0; 480 478 if (sun4i_tcon_get_pixel_depth(encoder) == 24) 481 479 reg |= SUN4I_TCON0_LVDS_IF_BITWIDTH_24BITS; 482 480 else