linux_dsm_epyc7002/drivers/media/video/s5p-fimc
Sylwester Nawrocki dafb9c70ab [media] s5p-fimc: Add support for alpha component configuration
On Exynos SoCs the FIMC IP allows to configure globally the alpha
component of all pixels for V4L2_PIX_FMT_RGB32, V4L2_PIX_FMT_RGB555
and V4L2_PIX_FMT_RGB444 image formats. This patch adds a v4l2 control
in order to let the applications control the alpha component value.

The alpha value range depends on the pixel format, for RGB32 it's
0..255 (8-bits), for RGB555 - 0..1 (1-bit) and for RGB444 - 0..15
(4-bits). The v4l2 control range is always 0..255 and the alpha
component data width is determined by currently set format on the
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE buffer queue. The applications
need to match the alpha channel value range and the pixel format
since the driver will clamp the alpha component. Depending on
fourcc the valid alpha bits are:

 - V4L2_PIX_FMT_RGB555  [0]
 - V4L2_PIX_FMT_RGB444  [3:0]
 - V4L2_PIX_FMT_RGB32   [7:0]

When switching to a pixel format with smaller alpha component width
the currently set alpha value will be clamped to maximum value valid
for current format. When switching to a format with wider alpha the
alpha value remains unchanged.

The variant description data structure is extended with a new entry
so an additional control is created only where really supported by
the hardware.

V4L2_PIX_FMT_RGB555 and V4L2_PIX_FMT_RGB444 formats are only valid
for V4L2_BUF_TYPE_VIDEO_CAPTURE buffer queue.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30 14:06:14 -02:00
..
fimc-capture.c [media] s5p-fimc: Add support for alpha component configuration 2011-12-30 14:06:14 -02:00
fimc-core.c [media] s5p-fimc: Add support for alpha component configuration 2011-12-30 14:06:14 -02:00
fimc-core.h [media] s5p-fimc: Add support for alpha component configuration 2011-12-30 14:06:14 -02:00
fimc-mdevice.c [media] s5p-fimc: Fail driver probing when sensor configuration is wrong 2011-11-24 21:03:18 -02:00
fimc-mdevice.h [media] s5p-fimc: Add the media device driver 2011-09-06 17:35:52 -03:00
fimc-reg.c [media] s5p-fimc: Add support for alpha component configuration 2011-12-30 14:06:14 -02:00
Makefile [media] s5p-fimc: Add the media device driver 2011-09-06 17:35:52 -03:00
mipi-csis.c [media] s5p-csis: Rework the system suspend/resume helpers 2011-09-06 15:09:37 -03:00
mipi-csis.h [media] v4l: Add v4l2 subdev driver for S5P/EXYNOS4 MIPI-CSI receivers 2011-05-20 11:32:43 -03:00
regs-fimc.h [media] s5p-fimc: Add support for alpha component configuration 2011-12-30 14:06:14 -02:00