media: staging: rkisp1: allow quantization setting by userspace on the isp source pad
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Thu, 27 Aug 2020 19:46:11 +0000 (21:46 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:23:02 +0000 (10:23 +0200)
commit6616726907418ec5550674c468998b4cd96cb54a
treefeab136fb0aac499b9451413f1a1a7c36f84a1eb
parent62aacfa9bf93f94f6949338e0c7a2ed4c4bd2c2a
media: staging: rkisp1: allow quantization setting by userspace on the isp source pad

The isp entity has hardware support to force full range quantization
for YUV formats. Use the subdev CSC API to allow userspace to set the
quantization for YUV formats on the isp entity.

- The flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION is set for
YUV formats during enumeration of the isp formats on the source pad.
- The full quantization is set on YUV formats if userspace asks it
on the isp entity using the flag V4L2_MBUS_FRAMEFMT_SET_CSC.

On the capture and the resizer, the quantization is read-only
and always set to the default quantization.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkisp1/TODO
drivers/staging/media/rkisp1/rkisp1-capture.c
drivers/staging/media/rkisp1/rkisp1-isp.c