]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx: imx-mipi-csis: Add output format
authorJacopo Mondi <jacopo@jmondi.org>
Mon, 21 Feb 2022 17:47:27 +0000 (18:47 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 23 Feb 2022 07:53:08 +0000 (08:53 +0100)
commit97b494375a9456e5dac1a1de800ccd2df8d01d00
treedd578c3cc4deb3d188bf56f39f8c2cf7d8614815
parent9c6d0af1c4d88cbe98178bbb905d82eef104c951
media: imx: imx-mipi-csis: Add output format

Due to how pixel components are transmitted on the CSI-2 serial bus
and how they are deserialized by the CSI-2 receiver, the component
ordering might change and the image formats on the sink and source pads
of the receiver should reflect it.

For RGB24, in example, the component ordering on the wire as described by
the CSI-2 specification matches the BGR888 format, while once
deserialized by the CSIS receiver it matches the RGB888 format.

Add an additional .output field to struct csis_pix_format to allow
propagating the correct format to the source pad after a format
configuration on the sink.

The change is only relevant for RGB24 but paves the way for further
format translations in future.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/imx/imx-mipi-csis.c