From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Janusz Krzysztofik <jmkrzyszt@gmail.com>
Subject: [RFC PATCH 1/5] media: ov6650: Fix V4L2_SEL_FLAG_KEEP_CONFIG handling
Date: Sun, 26 May 2019 22:47:54 +0200 [thread overview]
Message-ID: <20190526204758.1904-2-jmkrzyszt@gmail.com> (raw)
In-Reply-To: <20190526204758.1904-1-jmkrzyszt@gmail.com>
This flag is now ignored - output frame size is affected by new crop
settings regardless of the flag value. Fix it.
Since keeping output frame size untouched while applying new crop
settings is not supported, simply return results of .get_selection() if
V4L2_SEL_FLAG_KEEP_CONFIG is passed to .set_selection().
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
---
drivers/media/i2c/ov6650.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c
index c728f718716b..1b02479b616f 100644
--- a/drivers/media/i2c/ov6650.c
+++ b/drivers/media/i2c/ov6650.c
@@ -484,6 +484,10 @@ static int ov6650_set_selection(struct v4l2_subdev *sd,
sel->target != V4L2_SEL_TGT_CROP)
return -EINVAL;
+ /* No support for changing crop rectangle with frame size preserved */
+ if (sel->flags & V4L2_SEL_FLAG_KEEP_CONFIG)
+ return ov6650_get_selection(sd, cfg, sel);
+
v4l_bound_align_image(&sel->r.width, 2, W_CIF, 1,
&sel->r.height, 2, H_CIF, 1, 0);
v4l_bound_align_image(&sel->r.left, DEF_HSTRT << 1,
--
2.21.0
next prev parent reply other threads:[~2019-05-26 20:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-26 20:47 [RFC PATCH 0/5] media: ov6650: V4L2 subdev compliance fixes Janusz Krzysztofik
2019-05-26 20:47 ` Janusz Krzysztofik [this message]
2019-05-26 20:47 ` [RFC PATCH 2/5] media: ov6650: Refactor ov6650_s_fmt() helper Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 3/5] media: ov6650: Fix active crop rectangle affected by .set_fmt() Janusz Krzysztofik
2019-05-26 20:47 ` [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop Janusz Krzysztofik
2019-05-31 11:42 ` Sakari Ailus
2019-05-31 17:56 ` Janusz Krzysztofik
2019-06-01 22:37 ` Sakari Ailus
2019-06-02 9:58 ` Janusz Krzysztofik
2019-06-02 20:36 ` Sakari Ailus
2019-05-26 20:47 ` [RFC PATCH 5/5] media: ov6650: Add .init_cfg() pad operation callback Janusz Krzysztofik
2019-06-01 22:29 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190526204758.1904-2-jmkrzyszt@gmail.com \
--to=jmkrzyszt@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox