[PATCH v8 0/6] Add support for MT8196 video encoder
From: Irui Wang
Date: Mon Sep 14 2026 - 03:44:49 EST
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/20260423073345.27402-1-irui.wang@xxxxxxxxxxxx/
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/20260302035244.8994-1-irui.wang@xxxxxxxxxxxx/
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/20250814085642.17343-1-kyrie.wu@xxxxxxxxxxxx/
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
--
2.55.0.windows.3