Commit 4b9e3e8a authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mauro Carvalho Chehab

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

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: 59a63532 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 8d246e29
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment