]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: imagination: Add E5010 JPEG Encoder driver
authorDevarsh Thakkar <devarsht@ti.com>
Tue, 18 Jun 2024 19:36:47 +0000 (01:06 +0530)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Jun 2024 09:05:06 +0000 (11:05 +0200)
commita1e2940458853d00c178c842c889e4ae3ef5eaec
tree4b2f306626953785e456c644f997f1ca81d151ed
parentdacd54eb2da6e3b5e2ba7ff1ce7286c323f24285
media: imagination: Add E5010 JPEG Encoder driver

This adds support for stateful V4L2 M2M based driver for Imagination E5010
JPEG Encoder [1] which supports baseline encoding with two different
quantization tables and compression ratio as demanded.

Support for both contiguous and non-contiguous YUV420 and YUV422 semiplanar
formats is added along with alignment restrictions as required by the
hardware.

System and runtime PM hooks are added in the driver along with v4l2 crop
and selection API support.
Minimum resolution supported is 64x64 and
Maximum resolution supported is 8192x8192.

All v4l2-compliance tests are passing [2] :
v4l2-compliance -s -f -a  -d /dev/video0 -e /dev/video1

Total for e5010 device /dev/video0: 79, Succeeded: 79, Failed: 0,
Warnings: 0

NOTE: video1 here is VIVID test pattern generator

Also tests [3] were run manually to verify below driver features:
 - Runtime Power Management
 - Multi-instance JPEG Encoding
 - DMABUF import, export support
 - NV12, NV21, NV16, NV61 video format support
 - Compression quality S_CTRL
 - Cropping support using S_SELECTION

Existing V4L2 M2M based JPEG drivers namely s5p-jpeg, imx-jpeg and rcar_jpu
were referred while making this.

TODO:
Add MMU and memory tiling support

[1]:  AM62A TRM (Section 7.6 is for JPEG Encoder) :
Link: https://www.ti.com/lit/pdf/spruj16
[2]: v4l2-compliance test :
Link: https://gist.github.com/devarsht/1f039c631ca953a57f405cfce1b69e49
[3]: E5010 JPEG Encoder Manual tests :

Performance:
Link: https://gist.github.com/devarsht/c40672944fd71c9a53ab55adbfd9e28b
Functionality:
Link: https://gist.github.com/devarsht/8e88fcaabff016bb2bac83d89c9d23ce
Compression Quality:
Link: https://gist.github.com/devarsht/cbcc7cd97e8c48ba1486caa2b7884655
Multi Instance:
Link: https://gist.github.com/devarsht/22c2fca08cd3441fb40f2c7a4cebc95a
Crop support:
Link: https://gist.github.com/devarsht/de6f5142f678bb1a5338abfd9f814abd
Runtime PM:
Link: https://gist.github.com/devarsht/70cd95d4440ddc678489d93885ddd4dd
Co-developed-by: David Huang <d-huang@ti.com>
Signed-off-by: David Huang <d-huang@ti.com>
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
MAINTAINERS
drivers/media/platform/Kconfig
drivers/media/platform/Makefile
drivers/media/platform/imagination/Kconfig [new file with mode: 0644]
drivers/media/platform/imagination/Makefile [new file with mode: 0644]
drivers/media/platform/imagination/e5010-core-regs.h [new file with mode: 0644]
drivers/media/platform/imagination/e5010-jpeg-enc-hw.c [new file with mode: 0644]
drivers/media/platform/imagination/e5010-jpeg-enc-hw.h [new file with mode: 0644]
drivers/media/platform/imagination/e5010-jpeg-enc.c [new file with mode: 0644]
drivers/media/platform/imagination/e5010-jpeg-enc.h [new file with mode: 0644]
drivers/media/platform/imagination/e5010-mmu-regs.h [new file with mode: 0644]