summaryrefslogtreecommitdiff
path: root/drivers/media/platform/imx8/Kconfig
diff options
context:
space:
mode:
authorZhengyu Shen <zhengyu.shen_1@nxp.com>2017-09-18 14:34:52 -0500
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 16:02:44 +0800
commite1959f24366934edae84da2834958e1a38f6de4c (patch)
tree42e797a13991cab8942fc130ca39e857b21552ea /drivers/media/platform/imx8/Kconfig
parent219d54332a09e8d8741c1e1982f5eae56099de85 (diff)
mxc-jpeg: Add v4l2 driver for i.MX8 CAST IP JPEG Encoder/Decoder
This IP is present in i.MX 8QuadMax and i.MX 8DualX/8DualXPlus/8QuadXPlus application processors. The mxc-jpeg driver creates two v4l2 file handles in /dev, one for the decoder, and one for the encoder, which can be used by v4l2 programs. The multi-planar buffers API is used. Baseline and extended sequential jpeg decoding is supported. Progressive jpeg decoding is not supported by the IP. Supports encode and decode of various formats: YUV444, YUV422, YUV420, RGB, ARGB, Gray YUV420 is the only multi-planar format supported. Minimum resolution is 64 x 64, maximum 8192 x 8192. The alignment requirements for the resolution depend on the format, multiple of 16 resolutions should work for all formats. Special workarounds are made in the driver to support NV12 1080p. When decoding, the driver detects image resolution and pixel format from the jpeg stream, parsing the jpeg markers. The mxc-jpeg driver was tested to work with gstreamer & NXP gst plugins for jpeg encoder/decoder. The IP has 4 slots available for context switching, but only slot 0 was fully tested to work. Context switching is not used by the driver. Each driver instance (context) allocates a slot for itself, but this is postponed util device_run, to allow unlimited opens. The driver submits jobs to the IP by setting up a descriptor for the used slot, and then validating it. The encoder has an additional descriptor for the configuration phase. The driver expects FRM_DONE interrupt from IP to mark the job as finished. The decoder IP has some limitations regarding the component ID's, but the driver works around this by replacing them in the jpeg stream. A module parameter is available for debug purpose: jpeg_tracing The v4l2-compliance basic tests are passing on decoder/encoder nodes. The driver builds fine as builtin or module. Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Signed-off-by: Zhengyu Shen <zhengyu.shen_1@nxp.com> Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>, Frank Li <Frank.Li@nxp.com> Reviewed-by: Robert Chiras <robert.chiras@nxp.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> Reviewed-by: Sandor Yu <sandor.yu@nxp.com> (cherry picked from commit 4450ab9207122e885c4b3ad877db3f8163e9ce7f)
Diffstat (limited to 'drivers/media/platform/imx8/Kconfig')
-rw-r--r--drivers/media/platform/imx8/Kconfig13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/platform/imx8/Kconfig b/drivers/media/platform/imx8/Kconfig
new file mode 100644
index 000000000000..1418ff45e194
--- /dev/null
+++ b/drivers/media/platform/imx8/Kconfig
@@ -0,0 +1,13 @@
+if VIDEO_MX8_CAPTURE
+menu "IMX8 Camera ISI/MIPI Features support"
+
+config IMX8_JPEG
+ tristate "IMX8 JPEG Encoder/Decoder"
+ depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+ select V4L2_MEM2MEM_DEV
+ select VIDEOBUF2_DMA_CONTIG
+ default y
+
+endmenu
+endif #VIDEO_MX8_CAPTURE
+