media: staging: media: Add support for the Allwinner A31 ISPSome Allwinner platforms come with an Image Signal Processor, whichsupports various features in order to enhance and transform datarece
media: staging: media: Add support for the Allwinner A31 ISPSome Allwinner platforms come with an Image Signal Processor, whichsupports various features in order to enhance and transform datareceived by image sensors into good-looking pictures. In most cases,the data is raw bayer, which gets internally converted to RGB andfinally YUV, which is what the hardware produces.This driver supports ISPs that are similar to the A31 ISP, which wasthe first standalone ISP found in Allwinner platforms. Simpler ISPblocks were found in the A10 and A20, where they are tied to a CSIcontroller. Newer generations of Allwinner SoCs (starting with theH6, H616, etc) come with a new camera subsystem and revised ISP.Even though these previous and next-generation ISPs are somewhatsimilar to the A31 ISP, they have enough significant differences tobe out of the scope of this driver.While the ISP supports many features, including 3A and manyenhancement blocks, this implementation is limited to the following:- V3s (V3/S3) platform support;- Bayer media bus formats as input;- Semi-planar YUV (NV12/NV21) as output;- Debayering with per-component gain and offset configuration;- 2D noise filtering with configurable coefficients.Since many features are missing from the associated uAPI, the driveris aimed to integrate staging until all features are properlydescribed.On the technical side, it uses the v4l2 and media controller APIs,with a video node for capture, a processor subdev and a video nodefor parameters submission. A specific uAPI structure and associatedv4l2 meta format are used to configure parameters of the supportedmodules.One particular thing about the hardware is that configuration formodule registers needs to be stored in a DMA buffer and gets copiedto actual registers by the hardware at the next vsync, when instructedby a flag. This is handled by the "state" mechanism in the driver.Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...