[v4,0/3] Add V4L2 M2M Driver for E5010 JPEG Encoder

Message ID 20240205114239.924697-1-devarsht@ti.com (mailing list archive)
Headers
Series Add V4L2 M2M Driver for E5010 JPEG Encoder |

Message

Devarsh Thakkar Feb. 5, 2024, 11:42 a.m. UTC
  This adds support for V4L2 M2M based driver for E5010 JPEG Encoder
which is a stateful JPEG encoder from Imagination technologies
and is present in TI AM62A SoC.

v4l2-compliance test :
Link: https://gist.github.com/devarsht/867b1d646bca3f3877edb1f3638aae31

E5010 JPEG Encoder Manual tests :

Performance:
Link: https://gist.github.com/devarsht/63d835093195181866ae9a85de880d3c

Functionality:
Link: https://gist.github.com/devarsht/253e485e86661a3051e711f97ec3c5ac

Compression Quality:
Link: https://gist.github.com/devarsht/e16d8b73c8107ac78cc77ad79fd6299f

Multi Instance:
Link: https://gist.github.com/devarsht/58af9ccf822963d2bf8f0c2f4481438a

Link to previous series:
https://lore.kernel.org/all/20230816152210.4080779-1-devarsht@ti.com/

Diff w.r.t previous series (git range-diff) :
https://gist.github.com/devarsht/22a744d999080de6e813bcfb5a596272

Devarsh Thakkar (3):
  media: dt-bindings: Add Imagination E5010 JPEG Encoder
  media: jpeg: Add reference quantization and huffman tables
  media: imagination: Add E5010 JPEG Encoder driver

 .../bindings/media/img,e5010-jpeg-enc.yaml    |   75 +
 MAINTAINERS                                   |    7 +
 drivers/media/platform/Kconfig                |    1 +
 drivers/media/platform/Makefile               |    1 +
 drivers/media/platform/imagination/Kconfig    |   12 +
 drivers/media/platform/imagination/Makefile   |    3 +
 .../platform/imagination/e5010-core-regs.h    |  585 +++++++
 .../platform/imagination/e5010-jpeg-enc-hw.c  |  267 +++
 .../platform/imagination/e5010-jpeg-enc-hw.h  |   42 +
 .../platform/imagination/e5010-jpeg-enc.c     | 1552 +++++++++++++++++
 .../platform/imagination/e5010-jpeg-enc.h     |  169 ++
 .../platform/imagination/e5010-mmu-regs.h     |  311 ++++
 include/media/jpeg.h                          |    4 +
 include/media/jpeg_enc_reftables.h            |  112 ++
 14 files changed, 3141 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml
 create mode 100644 drivers/media/platform/imagination/Kconfig
 create mode 100644 drivers/media/platform/imagination/Makefile
 create mode 100644 drivers/media/platform/imagination/e5010-core-regs.h
 create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc-hw.c
 create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc-hw.h
 create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc.c
 create mode 100644 drivers/media/platform/imagination/e5010-jpeg-enc.h
 create mode 100644 drivers/media/platform/imagination/e5010-mmu-regs.h
 create mode 100644 include/media/jpeg_enc_reftables.h

---
Changelog:
V1->V2: 
No change (sending dt-binding and driver together)

V2->V3:
- Add DONOTMERGE patches for dts and defconfig
- Update driver with below changes :
  - Correct license headers
  - Use more generic name core instead of jasper for base registers
  - Add Comment for forward declarations
  - Simplify quantization table calculations
  - Use v4l2_apply_frmsize_constraints for updating framesize and remove
    unrequired functions
  - Place TODO at top of file and in commit message too
  - Use dev_err_probe helper in probe function
  - Fix return value checking for failure scenarios in probe function
  - Use v4l2_err/info/warn helpers instead of dev_err/info/warn helpers
  - Fix unexpected indentation
  - Correct commit message
- Update dt-bindings with below changes :
  - Add vendor specific compatible 
  - Fix commit title and message
  - Update reg names
  - Update clocks to 1
  - Fix dts example with proper naming

V3->V4:
- Use ti-specific compatible ti,am62a-jpeg-enc as secondary one in
  dt-binding
- Remove clock-names as only single clock in dt-binding
- Fix issue with default params setting
- Correct v4l2 error prints
- Simplify register write functions with single statement return values
- Remove unrequired error checks from get_queue()
- Drop explicit device_caps setting as it is already taken care by v4l2
  core
- Remove unrequired multiplanar checks and memset from s_fmt, g_fmt callback functions
- Fix try_fmt callback to not update the queues
- Remove unrequired contiguous format attribute from queue_init
- Use dynamic allocation for video_device and remove unrequired
  assignments in probe()
- Remove unrequired checks from queue_setup function
- Return queued buffers back if start_streaming fails
- Use ARRAY_SIZE in place of hard-coding
- Use huffman and quantization tables from reference header file