]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
media: ov6650: Fix crop rectangle alignment not passed back
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Tue, 3 Sep 2019 20:11:38 +0000 (17:11 -0300)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 14:14:57 +0000 (08:14 -0600)
commit7d1763774d8ffd85aa75c688e4a765c172654af7
tree589d5c764c493945902166dc525735baa3e116c3
parent7f94f2a8d4213740552058663fae11071bf16ac5
media: ov6650: Fix crop rectangle alignment not passed back

BugLink: https://bugs.launchpad.net/bugs/1858428
[ Upstream commit 7b188d6ba27a131e7934a51a14ece331c0491f18 ]

Commit 4f996594ceaf ("[media] v4l2: make vidioc_s_crop const")
introduced a writable copy of constified user requested crop rectangle
in order to be able to perform hardware alignments on it.  Later
on, commit 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video
ops") replaced s_crop() video operation using that const argument with
set_selection() pad operation which had a corresponding argument not
constified, however the original behavior of the driver was not
restored.  Since that time, any hardware alignment applied on a user
requested crop rectangle is not passed back to the user calling
.set_selection() as it should be.

Fix the issue by dropping the copy and replacing all references to it
with references to the crop rectangle embedded in the user argument.

Fixes: 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops")
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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/media/i2c/ov6650.c