linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] media: imx274: cleanups, improvements and SELECTION API support
@ 2018-07-05 14:38 Luca Ceresoli
  2018-07-05 14:38 ` [PATCH v5 1/2] media: imx274: use regmap_bulk_write to write multybyte registers Luca Ceresoli
  2018-07-05 14:38 ` [PATCH v5 2/2] media: imx274: add cropping support via SELECTION API Luca Ceresoli
  0 siblings, 2 replies; 5+ messages in thread
From: Luca Ceresoli @ 2018-07-05 14:38 UTC (permalink / raw)
  To: linux-media
  Cc: Luca Ceresoli, Sakari Ailus, Leon Luo, Mauro Carvalho Chehab,
	linux-kernel

Hi,

this patchset introduces cropping support for the Sony IMX274 sensor
using the SELECTION API.

Changes since v4:

 - remove most of the preliminary cleanup patches that are now on the
   linuxtv master branch
 - the V4L2_SEL_FLAG_GE and V4L2_SEL_FLAG_LE flags are not honored
 - the prepare_reg() helper function is gone, replaced by a simpler
   approach to write a multibyte register

Patch 1 introduces a helper to greatly simplify the code to write a
multibyte register.

Patch 2 implements the set_selection pad operation for cropping
(V4L2_SEL_TGT_CROP) and binning (V4L2_SEL_TGT_COMPOSE).

Usage examples:

 * Capture the entire 4K area, downscaled to 1080p with 2:1 binning:
   media-ctl -V '"IMX274":0[crop:(0,0)/3840x2160]'
   media-ctl -V '"IMX274":0[compose:(0,0)/1920x1080]'

 * Capture the central 1080p area (no binning):
   media-ctl -V '"IMX274":0[crop:(960,540)/1920x1080]'
   (this also sets the compose and fmt rects to 1920x1080)

Regards,
Luca


Luca Ceresoli (2):
  media: imx274: use regmap_bulk_write to write multybyte registers
  media: imx274: add cropping support via SELECTION API

 drivers/media/i2c/imx274.c | 567 +++++++++++++++++++++++++++++++++------------
 1 file changed, 413 insertions(+), 154 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-24 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 14:38 [PATCH v5 0/2] media: imx274: cleanups, improvements and SELECTION API support Luca Ceresoli
2018-07-05 14:38 ` [PATCH v5 1/2] media: imx274: use regmap_bulk_write to write multybyte registers Luca Ceresoli
2018-07-13 18:46   ` kbuild test robot
2018-07-05 14:38 ` [PATCH v5 2/2] media: imx274: add cropping support via SELECTION API Luca Ceresoli
2018-07-24 14:22   ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).