]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
media: cx25840: set_fmt operation should clamp out-of-range picture sizes
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Mon, 29 Apr 2019 16:16:56 +0000 (12:16 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 28 May 2019 19:56:44 +0000 (15:56 -0400)
commit65efeca0a6411139fc1956805f6334f3decc3c1b
tree18c51ea3a049dd27e2a770436653e38a1a377783
parente81a9076b4d60351bd574bc1c353793301427635
media: cx25840: set_fmt operation should clamp out-of-range picture sizes

According to V4L2 API set_fmt subdev operation should not return an error
on out-of-range picture sizes, the values should be clamped instead to the
supported range.

The cx25840 datasheet says that the chip is capable of scaling down the
picture width and height, respectively, 16 and 8 times.
These values agree with what the old implementation enforced.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/cx25840/cx25840-core.c