[PATCH v13 11/14] drm/mediatek: dpi: Add YUV422 output support
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Tue Jun 21 05:11:41 PDT 2022
Il 21/06/22 13:37, Bo-Chen Chen ha scritto:
> 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 at baylibre.com>
> Signed-off-by: Bo-Chen Chen <rex-bc.chen at mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 34 ++++++++++++++++++++++++-
> drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 3 +++
> 2 files changed, 36 insertions(+), 1 deletion(-)
>
..snip..
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi_regs.h b/drivers/gpu/drm/mediatek/mtk_dpi_regs.h
> index 3a02fabe1662..65fce11316b7 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi_regs.h
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi_regs.h
> @@ -217,4 +217,7 @@
>
> #define EDGE_SEL_EN BIT(5)
> #define H_FRE_2N BIT(25)
> +
> +#define DPI_MATRIX_SET 0xB4
> +#define INT_MATRIX_SEL_MASK (0x1F << 0)
Please, change INT_MATRIX_SEL_MASK: that's GENMASK(4, 0).
After that,
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> #endif /* __MTK_DPI_REGS_H */
More information about the linux-arm-kernel
mailing list