]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Tue, 3 Sep 2019 20:11:41 +0000 (17:11 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commitc00ee3822809f2a03638996a3e32b22b9fc0ee37
treef6281fd5f28f7fb2377949eb9416b7c9d82fb554
parent0deb1f08114599d4cd16e91fe486bc051b457167
media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support

BugLink: https://bugs.launchpad.net/bugs/1862227
commit 39034bb0c26b76a2c3abc54aa28c185f18b40c2f upstream.

Commit da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad
op get_fmt") converted a former ov6650_g_fmt() video operation callback
to an ov6650_get_fmt() pad operation callback.  However, the converted
function disregards a format->which flag that pad operations should
obey and always returns active frame format settings.

That can be fixed by always responding to V4L2_SUBDEV_FORMAT_TRY with
-EINVAL, or providing the response from a pad config argument, likely
updated by a former user call to V4L2_SUBDEV_FORMAT_TRY .set_fmt().
Since implementation of the latter is trivial, go for it.

Fixes: da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad op get_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+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/i2c/ov6650.c