Skip to content

Add support for MT8196 video encoder

Irui Wang linux-arm-kernel linux-devicetree linux-media linux-mediatek lkml 7 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest6 patches 0 repliesNew
  2. v76 patches 0 repliesSuperseded
  3. v66 patches 3 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v56 patches3 repliesSuperseded
v46 patches6 repliesSuperseded
v26 patches6 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v8 from the cover letter

- Rebase the encoder series on the MT8196 decoder v6 series.
- Adapt patch 2 to the decoder v6 firmware-selection flow, retaining its generic selector and validation while supplying the encoder platform firmware initialization callback.
- Adapt patch 5 to the decoder v6 VCP teardown flow, retaining the complete teardown before adding the encoder firmware-device callback.
- Link to v7:
https://patchwork.linuxtv.org/project/linux-media/list/?series=26089

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6media: dt-bindings: mediatek,vcodec-encoder: Add MT8196Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml+22 -00 replies
2/6media: mediatek: encoder: Add new platform data membersdrivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h+35 -380 replies
3/6media: mediatek: encoder: Add a new encoder driver interfacedrivers/media/platform/mediatek/vcodec/encoder/Makefile drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c drivers/media/platform/mediatek/vcodec/encoder/venc/venc_common_if.c +1 more+680 -00 replies
4/6media: mediatek: encoder: Add support for common firmware interfacedrivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c drivers/media/platform/mediatek/vcodec/encoder/venc_ipi_msg.h +1 more+52 -130 replies
5/6media: mediatek: encoder: Add support for VCP encode processdrivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.c drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_priv.h +3 more+44 -80 replies
6/6media: mediatek: encoder: Add MT8196 encoder compatible datadrivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h+24 -00 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchRob Herring (Arm)Nicolas Dufresne
1/6R-b R-b
2/6
3/6R-b
4/6R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/6] Add support for MT8196 video encoder

This series adds support for the MT8196 video encoder.

Patch 1 adds the device-tree binding changes.
Patch 2 adds the new encoder platform data.
Patches 3 through 5 add a new encoder driver interface for VCP firmware. Patch 6 adds the MT8196 compatible data.

The v4l2-compliance result for the encoder is:

Total for mtk-vcodec-enc device /dev/video3: 47, Succeeded: 46,
Failed: 1, Warnings: 0

The one failed test is not caused by this series:

fail: v4l2-test-controls.cpp(1171):

        node->codec_mask & STATEFUL_ENCODER

test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL

This series depends on the MT8196 video decoder v6 series [1]. The decoder series retains the "Add MediaTek VCP remoteproc driver support" v4 prerequisite [2].

[1] https://patchwork.linuxtv.org/project/linux-media/list/?series=28000
[2] https://patchwork.kernel.org/series/1086068/

Changes in v8:
- Rebase the encoder series on the MT8196 decoder v6 series.
- Adapt patch 2 to the decoder v6 firmware-selection flow, retaining its generic selector and validation while supplying the encoder platform firmware initialization callback.
- Adapt patch 5 to the decoder v6 VCP teardown flow, retaining the complete teardown before adding the encoder firmware-device callback.
- Link to v7:
https://patchwork.linuxtv.org/project/linux-media/list/?series=26089

Changes in v7:
- Patch 2: Add new pdata members to remove device-tree parsing branches.
- Rebase the series on the decoder patch set.
- Link to v6:
https://patchwork.linuxtv.org/project/linux-media/cover/[email protected]/

Changes in v6:
- Move the device-tree binding changes to patch 1.
- Rebase the series on the decoder patch set.
- Link to v5:
https://patchwork.linuxtv.org/project/linux-media/cover/[email protected]/

Changes in v5:
- Rewrite the patch 5 commit subject.
- Add the else branch in patch 5.
- Link to v4:
https://patchwork.linuxtv.org/project/linux-media/list/?series=21757

Changes in v4:
- Rework the patch 3 commit message.
- Rework patch 5 with more details.
- Rebase the series on the decoder patch set.
- Link to v3:
https://patchwork.linuxtv.org/project/linux-media/cover/[email protected]/

Changes in v3:
- Add encoder rate-control buffer allocation failure handling.
- Add the mediatek,vcp property definition to the device-tree binding.

Changes in v2:
- Add support for the VCP encode process.
- Add the MT8196 encoder platform data.
- Rebase the encoder series on the decoder patch set.
- Address review comments from v1.

Irui Wang (6):
media: dt-bindings: mediatek,vcodec-encoder: Add MT8196
media: mediatek: encoder: Add new platform data members
media: mediatek: encoder: Add a new encoder driver interface
media: mediatek: encoder: Add support for common firmware interface
media: mediatek: encoder: Add support for VCP encode process
media: mediatek: encoder: Add MT8196 encoder compatible data

 .../media/mediatek,vcodec-encoder.yaml        |  22 +
 .../mediatek/vcodec/common/mtk_vcodec_fw.c    |   6 +
 .../mediatek/vcodec/common/mtk_vcodec_fw.h    |   1 +
 .../vcodec/common/mtk_vcodec_fw_priv.h        |   1 +
 .../vcodec/common/mtk_vcodec_fw_vcp.c         |   6 +
 .../platform/mediatek/vcodec/encoder/Makefile |   1 +
 .../mediatek/vcodec/encoder/mtk_vcodec_enc.c  |  24 +-
 .../vcodec/encoder/mtk_vcodec_enc_drv.c       |  63 +-
 .../vcodec/encoder/mtk_vcodec_enc_drv.h       |  15 +-
 .../vcodec/encoder/venc/venc_common_if.c      | 684 ++++++++++++++++++
 .../mediatek/vcodec/encoder/venc_drv_if.c     |   3 +-
 .../mediatek/vcodec/encoder/venc_drv_if.h     |   3 +
 .../mediatek/vcodec/encoder/venc_ipi_msg.h    |  26 +
 .../mediatek/vcodec/encoder/venc_vpu_if.c     |  47 +-
 14 files changed, 850 insertions(+), 52 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/encoder/venc/venc_common_if.c

base-commit: bf115aeef8fc70bc46b05733d0d3b77bd9e8af50

Signature · 1 line
2.55.0.windows.3