]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: rockchip: rga: Only set output CSC mode for RGB input
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Thu, 30 Apr 2020 16:42:45 +0000 (18:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:32 +0000 (13:07 +0200)
commitfcb5d11dd87fe5559e2428e362112e4e462f9216
treee31f634aff9cd335013f51a222dbbfec8ad61e17
parentf44d97c58c2c85f24ab7ab996101040a13315f10
media: rockchip: rga: Only set output CSC mode for RGB input

[ Upstream commit 0f879bab72f47e8ba2421a984e7acfa763d3e84e ]

Setting the output CSC mode is required for a YUV output, but must not
be set when the input is also YUV. Doing this (as tested with a YUV420P
to YUV420P conversion) results in wrong colors.

Adapt the logic to only set the output CSC mode when the output is YUV and
the input is RGB. Also add a comment to clarify the rationale.

Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/rockchip/rga/rga-hw.c