]> git.baikalelectronics.ru Git - kernel.git/commit
media: cedrus: Propagate OUTPUT resolution to CAPTURE
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 18 Sep 2020 00:27:51 +0000 (02:27 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 09:20:05 +0000 (11:20 +0200)
commitb3363e1fccda1f5f1f207589a896a76212317503
tree95c0977970fb435003b84806c1ce83ee0133fecf
parent84eef49abd272e392973e3e119aff3208ff9b9d7
media: cedrus: Propagate OUTPUT resolution to CAPTURE

As per spec, the CAPTURE resolution should be automatically set based on
the OUTPUT resolution. This patch properly propagate width/height to the
capture when the OUTPUT format is set and override the user provided
width/height with configured OUTPUT resolution when the CAPTURE fmt is
updated.

This also prevents userspace from selecting a CAPTURE resolution that is
too small, avoiding kernel oops.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Tested-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/sunxi/cedrus/cedrus_video.c