drm/mediatek: dpi: Add YUV422 output support
authorBo-Chen Chen <rex-bc.chen@mediatek.com>
Tue, 5 Jul 2022 10:25:26 +0000 (18:25 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Wed, 6 Jul 2022 14:22:10 +0000 (22:22 +0800)
commitb992131aac655ac451d4078d83c5a3b4a28ea802
tree0b1a7b3eaf0d608d99c5000f099f3b8b65acc416
parent091e5e004e697a758358195bb774d3d3cd12414f
drm/mediatek: dpi: Add YUV422 output support

Dp_intf supports YUV422 as output format. In MT8195 Chrome project,
YUV422 output format is used for 4K resolution.

To support this, it is also needed to support color format transfer.
Color format transfer is a new feature for both dpi and dpintf of MT8195.

The input format could be RGB888 and output format for dp_intf should be
YUV422. Therefore, we add a mtk_dpi_matrix_sel() helper to update the
DPI_MATRIX_SET register depending on the color format.

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220705102530.1344-2-rex-bc.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dpi.c
drivers/gpu/drm/mediatek/mtk_dpi_regs.h