Skip to content
Commit 69e39d40 authored by Guilherme Alcarde Gallo's avatar Guilherme Alcarde Gallo Committed by Mauro Carvalho Chehab
Browse files

media: vimc: Implement get/set selection in sink



Add support for the sink pad of scaler subdevice to respond
VIDIOC_G_SELECTION and VIDIOC_S_SELECTION ioctls with the following
targets: V4L2_SEL_TGT_COMPOSE_BOUNDS and V4L2_SEL_TGT_CROP.

* Add new const struct crop_rect_default to initialize subdev scaler
  properly.
* Make changes in sink pad format reflect to the crop rectangle. E.g.
  changing the frame format to a smaller size one can make the former
  crop rectangle selects a non existing frame area. To solve this
  situation the crop rectangle is clamped to the frame boundaries.
* Clamp crop rectangle respecting the sink bounds during set_selection
  ioctl.

Co-developed-by: default avatarDanilo Figueiredo Rocha <drocha.figueiredo@gmail.com>

Signed-off-by: default avatarGuilherme Alcarde Gallo <gagallo7@gmail.com>
Signed-off-by: default avatarDanilo Figueiredo Rocha <drocha.figueiredo@gmail.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 94010145
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment