From: Philipp Zabel Date: Fri, 18 Jul 2014 10:22:41 +0000 (-0300) Subject: [media] coda: lock capture frame size to output frame size when streaming X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91b5841e24d1ebefd62f03ff790755ae0f379627;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] coda: lock capture frame size to output frame size when streaming As soon as the output queue is streaming, let try_fmt on the capture side only allow the frame size that was set on the output side. Acked-by: Hans Verkuil Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 898eb3dbb8da..f1cf44a5aa3c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -719,6 +719,9 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv, f->fmt.pix.pixelformat); if (!codec) return -EINVAL; + + f->fmt.pix.width = q_data_src->width; + f->fmt.pix.height = q_data_src->height; } else { /* Otherwise determine codec by encoded format, if possible */ codec = coda_find_codec(ctx->dev, V4L2_PIX_FMT_YUV420,