linux/drivers/gpu/drm/mediatek
Bibby Hsieh 7216436420 drm/mediatek: set mt8173 dithering function
Some panels only accept bpc (bit per color) 6-bit.
But, the default bpc in mt8173 display data path is 8-bit.
If we didn't enable dithering function to convert bpc,
display cannot show the smooth grayscale image.

In mt8173, the dithering function in OD (OverDrive) and
GAMMA module, we have to config them with
connector->display_mode.bpc when CRTC initial.

1. Clear the default value at *_DITHER_5 and *_DITHER_7 register.
2. Calculate the LSB_ERR_SHIFT bits and ADD_LSHIFT bits two values.
i.e. Input bpc of OD is 10 bits, we assume the bpc of panel is 6-bit,
so, we need to set 4-bit to LSB_ERR_SHIFT and ADD_LSHIFT bits respectively.
3. Then, set the OD or GAMMA to dithering mode depends on path-1 or path-2.

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-11 10:52:23 +02:00
..
Kconfig MT8173 HDMI support 2016-06-24 13:16:07 +10:00
Makefile drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_cec.c drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_cec.h drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_disp_ovl.c drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_disp_rdma.c drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_dpi_regs.h drm/mediatek: Add DPI sub driver 2016-05-06 17:47:38 +02:00
mtk_dpi.c drm/mediatek: mtk_dpi: remove invalid error message 2016-06-01 16:09:54 +02:00
mtk_drm_crtc.c drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_drm_crtc.h drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_drm_ddp_comp.c drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_drm_ddp_comp.h drm/mediatek: set mt8173 dithering function 2016-08-11 10:52:23 +02:00
mtk_drm_ddp.c
mtk_drm_ddp.h
mtk_drm_drv.c drm: Don't call drm_dev_set_unique from platform drivers 2016-06-21 21:43:41 +02:00
mtk_drm_drv.h drm/mediatek: Add DPI sub driver 2016-05-06 17:47:38 +02:00
mtk_drm_fb.c drm: mediatek: fixup drm_gem_object_lookup API change 2016-05-18 19:16:16 +02:00
mtk_drm_fb.h
mtk_drm_gem.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
mtk_drm_gem.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
mtk_drm_plane.c drm: Deal with rotation in drm_plane_helper_check_update() 2016-06-17 16:41:25 +02:00
mtk_drm_plane.h
mtk_dsi.c drm: mediatek: Rely on the default ->best_encoder() behavior 2016-06-09 08:43:26 +02:00
mtk_hdmi_ddc.c drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_hdmi_regs.h drm/mediatek: enable hdmi output control bit 2016-06-16 16:30:38 +02:00
mtk_hdmi.c ASoC: Add private data for HDMI CODEC callbacks 2016-07-05 09:57:23 +10:00
mtk_hdmi.h drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00
mtk_mipi_tx.c drm/mediatek/mtk_mipi_tx: checking the wrong variable 2016-07-12 14:47:04 +02:00
mtk_mt8173_hdmi_phy.c drm/mediatek: Add HDMI support 2016-06-16 16:30:38 +02:00