media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'

[ Upstream commit 4b9e3e8af4 ]

There is likely a typo here. To be consistent, we should compare
'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'.

Instead of fixing the test, just remove it and copy 'fmt' unconditionally.

Fixes: 59a635327c ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Neil Armstrong <narmstrong@baylibre.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>
This commit is contained in:
Christophe JAILLET 2021-07-30 21:35:05 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель 2899243f27
Коммит b6100e1671
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -779,11 +779,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
* If the rotation parameter changes the OUTPUT frames
* parameters, take them in account
*/
if (fmt.width != ctx->out.pix_fmt.width ||
fmt.height != ctx->out.pix_fmt.width ||
fmt.bytesperline > ctx->out.pix_fmt.bytesperline ||
fmt.sizeimage > ctx->out.pix_fmt.sizeimage)
ctx->out.pix_fmt = fmt;
ctx->out.pix_fmt = fmt;
break;
}