]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov6650: Fix crop rectangle affected by set format
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Sun, 3 May 2020 22:06:18 +0000 (00:06 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 18:32:48 +0000 (19:32 +0100)
commitc43d1f74c5da877f20e881da5bdd7ce05abefafe
tree49b8d22bcd2ade157c8b008dc130f01f72cb96dd
parent5ef0717615fbd363fd7a4c806e4a4d8c28ad71c8
media: ov6650: Fix crop rectangle affected by set format

According to subdevice interface specification found in V4L2 API
documentation, set format pad operations should not affect image
geometry set in preceding image processing steps. Unfortunately, that
requirement is not respected by the driver implementation of set format
as it was not the case when that code was still implementing a pair of
now obsolete .s_mbus_fmt() / .try_mbus_fmt() video operations before
they have been merged and reused as an implementation of .set_fmt() pad
operation by commit abddb29d8cbd ("[media] v4l2: replace try_mbus_fmt
by set_fmt").

Exclude non-compliant crop rectangle adjustments from set format try,
as well as a call to .set_selection() from set format active processing
path, so only frame scaling is applied as needed and crop rectangle is
no longer modified.

[Sakari Ailus: Rebase on subdev state patches]

Fixes: abddb29d8cbd ("[media] v4l2: replace try_mbus_fmt by set_fmt")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov6650.c