]> git.baikalelectronics.ru Git - 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)
commitd95e7bb2dda4af9e0ff2fe4c925a7d62ee2debfa
tree18c51ea3a049dd27e2a770436653e38a1a377783
parentd70b56ebcbd54e5b4c97010277fdb0ce1d97ef9a
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