drm/sun4i: tcon: Add dithering support for RGB565/RGB666 LCD panels
authorJonathan Liu <net147@gmail.com>
Fri, 7 Sep 2018 04:19:45 +0000 (12:19 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 7 Sep 2018 11:23:07 +0000 (13:23 +0200)
commitf11adcecbd5f2495be7b64bcd7537515c25c7dcd
treee87a0022723d20db9baaeb3098e53a1ce454a586
parent5869d90b28a6e1a64268d6f76c17617a9ac62b31
drm/sun4i: tcon: Add dithering support for RGB565/RGB666 LCD panels

The hardware supports dithering on TCON channel 0 which is used for LCD
panels.

Dithering is a method of approximating a color from a mixture of other
colors when the required color isn't available. It reduces color
banding artifacts that can be observed when displaying gradients
(e.g. grayscale gradients). This may occur when the image that needs
to be displayed is 24-bit but the LCD panel is a lower bit depth and
does not perform dithering on its own.

Signed-off-by: Jonathan Liu <net147@gmail.com>
[wens@csie.org: check display_info.bpc first; handle LVDS and MIPI DSI]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180907041948.19913-4-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_tcon.c