]> git.itanic.dy.fi Git - linux-stable/commit
drm/meson: Fix OSD1 RGB to YCbCr coefficient
authorStuart Menefy <stuart.menefy@mathembedded.com>
Thu, 8 Sep 2022 15:52:43 +0000 (16:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:14:03 +0000 (14:14 +0200)
commitca52cf493f970bcb66859552076c4a3bd5eaeaad
tree7b3dfa12b2e103d33030e01477e1b319926d37dc
parente681b2df3ad42708662315664f8acf3069104227
drm/meson: Fix OSD1 RGB to YCbCr coefficient

[ Upstream commit 6463d3930ba5b6addcfc8f80a4543976a2fc7656 ]

VPP_WRAP_OSD1_MATRIX_COEF22.Coeff22 is documented as being bits 0-12,
not 16-28.

Without this the output tends to have a pink hue, changing it results
in better color accuracy.

The vendor kernel doesn't use this register. However the code which
sets VIU2_OSD1_MATRIX_COEF22 also uses bits 0-12. There is a slightly
different style of registers for configuring some of the other matrices,
which do use bits 16-28 for this coefficient, but those have names
ending in MATRIX_COEF22_30, and this is not one of those.

Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com>
Fixes: 728883948b0d ("drm/meson: Add G12A Support for VIU setup")
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220908155243.687143-1-stuart.menefy@mathembedded.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/meson/meson_viu.c