summaryrefslogtreecommitdiffstats
path: root/crypto/aes_ti.c
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2018-07-25 12:24:55 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-27 12:58:07 -0400
commit39dd23dc9d4c512954ec511d22d93ea854cf0265 (patch)
tree577996e117c6f916d64b565e429aa66c221bd836 /crypto/aes_ti.c
parent279b4b9aaa3d04ea8de960e39e54e38aafe93e62 (diff)
downloadlinux-39dd23dc9d4c512954ec511d22d93ea854cf0265.tar.bz2
media: imx274: add cropping support via SELECTION API
Currently this driver does not support cropping. The supported modes are the following, all capturing the entire area: - 3840x2160, 1:1 binning (native sensor resolution) - 1920x1080, 2:1 binning - 1280x720, 3:1 binning The VIDIOC_SUBDEV_S_FMT ioctl chooses among these 3 configurations the one that matches the requested format. Add cropping support via VIDIOC_SUBDEV_S_SELECTION: with target V4L2_SEL_TGT_CROP to choose the captured area, with V4L2_SEL_TGT_COMPOSE to choose the output resolution. To maintain backward compatibility we also allow setting the compose format via VIDIOC_SUBDEV_S_FMT. To obtain this, compose rect and output format are computed in the common helper function __imx274_change_compose(), which sets both to the same width/height values. Cropping also calls __imx274_change_compose() whenever cropping rect size changes in order to reset the compose rect (and output format size) for 1:1 binning. Also rename enum imx274_mode to imx274_binning (and its values from IMX274_MODE_BINNING_* to IMX274_BINNING_*). Without cropping, the two naming are equivalent. With cropping, the resolution could be different, e.g. using 2:1 binning mode to crop 1200x960 and output a 600x480 format. Using binning in the names avoids any misunderstanding. For the same reason, replace the 'size' field in struct imx274_frmfmt with 'bin_ratio'. [Sakari Ailus: Remove leftover condition in imx274_apply_trimming] Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'crypto/aes_ti.c')
0 files changed, 0 insertions, 0 deletions