Skip to content

Add support for mt2701 JPEG ENC support

Xia Jiang linux-arm-kernel linux-devicetree linux-media linux-mediatek lkml 15 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest posting 2/229 patches 4 repliesIn review
  2. v12 posting 1/20 of 29 patches 0 repliesSuperseded
  3. v1128 patches 2 repliesSuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v1028 patches4 repliesSuperseded
v9 posting 3/318 patches25 repliesSuperseded
v9 posting 2/30 of 18 patches0 repliesSuperseded
v9 posting 1/318 patches0 repliesSuperseded
v814 patches26 repliesSuperseded
v711 patches6 repliesSuperseded
v65 patches2 repliesSuperseded
v55 patches1 replySuperseded
v45 patches11 repliesSuperseded
v35 patches3 repliesSuperseded
v25 patches2 repliesSuperseded
v15 patches2 repliesSuperseded

Changes in v12 from the cover letter

- add the relied patch(https://lore.kernel.org/linux-arm-kernel/[email protected]/) to this series
- fix the compile warnings of patch 29/29

Patches in v12 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29media: platform: Improve subscribe event flow for bug fixingdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+2 -20 replies
2/29media: platform: Improve queue set up flow for bug fixingdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+7 -00 replies
3/29media: platform: Improve getting and requesting irq flow for bug fixingdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+2 -50 replies
4/29media: platform: Change the fixed device node number to unfixed valuedrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+1 -10 replies
5/29media: platform: Improve power on and power off flowdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+6 -210 replies
6/29media: platform: Delete the resetting hardware flow in the system PM opsdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+0 -20 replies
7/29media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resumedrivers/media/v4l2-core/v4l2-mem2mem.c include/media/v4l2-mem2mem.h+63 -05 replies
8/29media: platform: Improve the implementation of the system PM opsdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+8 -100 replies
9/29media: platform: Add mechanism to handle jpeg hardware's locking updrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+29 -00 replies
10/29media: platform: Cancel the last frame handling flowdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+2 -440 replies
11/29media: platform: Delete zeroing the reserved fieldsdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+0 -50 replies
12/29media: platform: Stylistic changes for improving code qualitydrivers/media/platform/mtk-jpeg/mtk_jpeg_core.h drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h+13 -130 replies
13/29media: platform: Use generic rounding helpersdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.c drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.h+15 -390 replies
14/29media: platform: Change MTK_JPEG_COMP_MAX macro definition locationdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.h drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h+2 -10 replies
15/29media: platform: Delete redundant code and add annotation for an enumdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+8 -150 replies
16/29media: platform: Delete vidioc_s_selection ioctl of jpeg decdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+0 -220 replies
17/29media: platform: Change the maximum width and height supported by JPEG decdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+2 -20 replies
18/29media: platform: Refactor mtk_jpeg_try_fmt_mplane()drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+16 -330 replies
19/29media: platform: Refactor mtk_jpeg_find_format()drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+34 -330 replies
20/29media: platform: Redefinition of mtk_jpeg_q_data structuredrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+57 -640 replies
21/29media: platform: Change the colorspace of jpeg to the fixed valuedrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+12 -120 replies
22/29media: platform: Refactor mtk_jpeg_set_default_params()drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c+2 -100 replies
23/29media: platform: Change the call functions of getting/enable/disable the jpeg's clockdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+23 -130 replies
24/29media: dt-bindings: Add jpeg enc device tree node documentDocumentation/devicetree/bindings/media/mediatek-jpeg-encoder.txt+35 -00 replies
25/29arm: dts: mt2701: Add jpeg enc device tree nodearch/arm/boot/dts/mt2701.dtsi+13 -02 replies
26/29media: platform: Rename jpeg dec file namedrivers/media/platform/mtk-jpeg/Makefile drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_hw.c +4 more+7 -70 replies
27/29media: platform: Rename existing functions/defines/variablesdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h drivers/media/platform/mtk-jpeg/mtk_jpeg_dec_hw.h+97 -920 replies
28/29media: platform: Using the variant structure to contain the varability between dec and encdrivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h+104 -450 replies
29/29media: platform: Add jpeg enc featuredrivers/media/platform/mtk-jpeg/Makefile drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h +2 more+611 -40 replies

Reviews trailers per patch

All 29 patches have a Reviewed-by or Acked-by.

PatchTomasz FigaRob HerringAdrian RatiuHans Verkuil
1/29R-b
2/29R-b
3/29R-b
4/29R-b
5/29R-b
6/29R-b
7/29R-b T-b R-b
8/29R-b
9/29R-b
10/29R-b
11/29R-b
12/29R-b
13/29R-b
14/29R-b
15/29R-b
16/29R-b
17/29R-b
18/29R-b
19/29R-b
20/29R-b
21/29R-b
22/29R-b
23/29R-b
24/29R-b R-b
25/29R-b
26/29R-b
27/29R-b
28/29R-b
29/29R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v12 thread

Cover letter [PATCH v12 00/29] Add support for mt2701 JPEG ENC support

This patchset add support for mt2701 JPEG ENC support.

This is the compliance test result for jpeg dec and enc.

The JPEG dec log:
------------------------------------------------------------
v4l2-compliance -d /dev/video0
v4l2-compliance SHA: 78e4b293f654df1f273bbc6b1213511f53a2a465, 32 bits, 32-bit time_t

Compliance test for mtk-jpeg-dec device /dev/video0:

Driver Info:

        Driver name      : mtk-jpeg-dec
        Card type        : mtk-jpeg-dec
        Bus info         : platform:15004000.jpegdec
        Driver version   : 5.8.0
        Capabilities     : 0x84204000

Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Detected JPEG Decoder

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

test invalid ioctls: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK
test Scaling: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)

Total for mtk-jpeg-dec device /dev/video0: 45, Succeeded: 45, Failed: 0, Warnings: 0
------------------------------------------------------------

The JPEG enc log:

------------------------------------------------------------
v4l2-compliance -d /dev/video1
v4l2-compliance SHA: 78e4b293f654df1f273bbc6b1213511f53a2a465, 32 bits, 32-bit time_t

Compliance test for mtk-jpeg-enc device /dev/video1:

Driver Info:

        Driver name      : mtk-jpeg-enc
        Card type        : mtk-jpeg-enc
        Bus info         : platform:1500a000.jpegenc
        Driver version   : 5.8.0
        Capabilities     : 0x84204000

Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Detected JPEG Encoder

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second /dev/video1 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

test invalid ioctls: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 4 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)

Total for mtk-jpeg-enc device /dev/video1: 45, Succeeded: 45, Failed: 0, Warnings: 0
------------------------------------------------------------

Change compared to v11:
- add the relied patch(https://lore.kernel.org/linux-arm-kernel/[email protected]/) to this series
- fix the compile warnings of patch 29/29

Pi-Hsun Shih (1):
media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume

Xia Jiang (28):
media: platform: Improve subscribe event flow for bug fixing
media: platform: Improve queue set up flow for bug fixing
media: platform: Improve getting and requesting irq flow for bug
fixing
media: platform: Change the fixed device node number to unfixed value
media: platform: Improve power on and power off flow
media: platform: Delete the resetting hardware flow in the system PM
ops
media: platform: Improve the implementation of the system PM ops
media: platform: Add mechanism to handle jpeg hardware's locking up
media: platform: Cancel the last frame handling flow
media: platform: Delete zeroing the reserved fields
media: platform: Stylistic changes for improving code quality
media: platform: Use generic rounding helpers
media: platform: Change MTK_JPEG_COMP_MAX macro definition location
media: platform: Delete redundant code and add annotation for an enum
media: platform: Delete vidioc_s_selection ioctl of jpeg dec
media: platform: Change the maximum width and height supported by JPEG
dec
media: platform: Refactor mtk_jpeg_try_fmt_mplane()
media: platform: Refactor mtk_jpeg_find_format()
media: platform: Redefinition of mtk_jpeg_q_data structure
media: platform: Change the colorspace of jpeg to the fixed value
media: platform: Refactor mtk_jpeg_set_default_params()
media: platform: Change the call functions of getting/enable/disable
the jpeg's clock
media: dt-bindings: Add jpeg enc device tree node document
arm: dts: mt2701: Add jpeg enc device tree node
media: platform: Rename jpeg dec file name
media: platform: Rename existing functions/defines/variables
media: platform: Using the variant structure to contain the varability
between dec and enc
media: platform: Add jpeg enc feature

 .../bindings/media/mediatek-jpeg-encoder.txt  |  35 +
 arch/arm/boot/dts/mt2701.dtsi                 |  13 +
 drivers/media/platform/mtk-jpeg/Makefile      |   5 +-
 .../media/platform/mtk-jpeg/mtk_jpeg_core.c   | 930 ++++++++++++------
 .../media/platform/mtk-jpeg/mtk_jpeg_core.h   | 106 +-
 .../{mtk_jpeg_hw.c => mtk_jpeg_dec_hw.c}      |  10 +-
 .../{mtk_jpeg_hw.h => mtk_jpeg_dec_hw.h}      |  12 +-
 ...{mtk_jpeg_parse.c => mtk_jpeg_dec_parse.c} |   2 +-
 ...{mtk_jpeg_parse.h => mtk_jpeg_dec_parse.h} |   2 +-
 .../{mtk_jpeg_reg.h => mtk_jpeg_dec_reg.h}    |  19 +-
 .../media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c | 154 +++
 .../media/platform/mtk-jpeg/mtk_jpeg_enc_hw.h |  91 ++
 drivers/media/v4l2-core/v4l2-mem2mem.c        |  41 +
 include/media/v4l2-mem2mem.h                  |  22 +
 14 files changed, 1059 insertions(+), 383 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.txt
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_hw.c => mtk_jpeg_dec_hw.c} (98%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_hw.h => mtk_jpeg_dec_hw.h} (91%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_parse.c => mtk_jpeg_dec_parse.c} (98%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_parse.h => mtk_jpeg_dec_parse.h} (92%)
 rename drivers/media/platform/mtk-jpeg/{mtk_jpeg_reg.h => mtk_jpeg_dec_reg.h} (77%)
 create mode 100644 drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c
 create mode 100644 drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.h
Signature · 6 lines
2.18.0 

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek