[PATCH v4 0/8] Enable video decoder & encoder for MT8189

Kyrie Wu posted 8 patches 3 months, 3 weeks ago
There is a newer version of this series
.../media/mediatek,vcodec-encoder.yaml        |  2 ++
.../media/mediatek,vcodec-subdev-decoder.yaml |  1 +
.../vcodec/decoder/mtk_vcodec_dec_drv.c       |  9 +++++-
.../vcodec/decoder/mtk_vcodec_dec_drv.h       |  1 +
.../vcodec/decoder/mtk_vcodec_dec_stateless.c |  4 +++
.../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 32 ++++++++++++-------
.../vcodec/encoder/mtk_vcodec_enc_drv.c       | 14 ++++++++
7 files changed, 50 insertions(+), 13 deletions(-)
[PATCH v4 0/8] Enable video decoder & encoder for MT8189
Posted by Kyrie Wu 3 months, 3 weeks ago
This series have the follow changing:
Firstly add mt8189 video decoder compatible, profile and level to support
MT8189 kernel driver.
Secondly fix some bugs, including vp 4K profile2 and media device node
number bug.
Lastly, add mt8189 video encoder compatible.

This series has been tested with MT8189 tast test.
Encoding and decoding worked for this chip.

Patches 1-2 Add decoder compatible.
Patches 3 Add profile and level supporting.
Patches 4 Add core-only VP9 decoding supporting.
Patches 5-6 fix some bugs.
Patches 7-8 Adds encoder compatible.

---
H264 test results:
./fluster.py run -d GStreamer-H.264-V4L2SL-Gst1.0 -j1 -t 90
     JVT-AVC_V1       94/135

v4l2-compliance test results:
Compliance test for mtk-vcodec-enc device /dev/video2:
Total for mtk-vcodec-enc device /dev/video2: 47, Succeeded: 46, Failed: 1, Warnings: 0
Compliance test for mtk-vcodec-dec device /dev/video3:
Total for mtk-vcodec-dec device /dev/video3: 48, Succeeded: 48, Failed: 0, Warnings: 0

scp upstream link:
https://patchwork.kernel.org/project/linux-mediatek/patch/20250811015922.32680-1-huayu.zong@mediatek.com/

Changes compared with v3:
--add reviewer to commit messages
--Rebased on top of the latest media tree

Changes compared with v2:
--add H264 fluster test results
--reorder compatible string for dt-bindings

Changes compared with v1:
--add v4l2-compliance test results
--add scp upstream link
--add HW difference discriptions for dt-bindings commit messages

This series patches dependent on:
[1]
https://patchwork.linuxtv.org/project/linux-media/cover/20250510075357.11761-1-yunfei.dong@mediatek.com/
[2]
https://patchwork.linuxtv.org/project/linux-media/cover/20250814085642.17343-1-kyrie.wu@mediatek.com/

Kyrie Wu (8):
  dt-bindings: media: mediatek: decoder: Add MT8189
    mediatek,vcodec-decoder
  media: mediatek: vcodec: add decoder compatible to support MT8189
  media: mediatek: vcodec: add profile and level supporting for MT8189
  media: mediatek: vcodec: Add core-only VP9 decoding support for MT8189
  media: mediatek: vcodec: fix vp9 4096x2176 fail for profile2
  media: mediatek: vcodec: fix media device node number
  dt-bindings: media: Add MT8189 mediatek,vcodec-encoder
  media: mediatek: encoder: Add MT8189 encoder compatible data

 .../media/mediatek,vcodec-encoder.yaml        |  2 ++
 .../media/mediatek,vcodec-subdev-decoder.yaml |  1 +
 .../vcodec/decoder/mtk_vcodec_dec_drv.c       |  9 +++++-
 .../vcodec/decoder/mtk_vcodec_dec_drv.h       |  1 +
 .../vcodec/decoder/mtk_vcodec_dec_stateless.c |  4 +++
 .../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 32 ++++++++++++-------
 .../vcodec/encoder/mtk_vcodec_enc_drv.c       | 14 ++++++++
 7 files changed, 50 insertions(+), 13 deletions(-)

-- 
2.45.2
Re: [PATCH v4 0/8] Enable video decoder & encoder for MT8189
Posted by Nicolas Dufresne 3 months, 3 weeks ago
Hi,

Le jeudi 16 octobre 2025 à 14:07 +0800, Kyrie Wu a écrit :
> This series have the follow changing:
> Firstly add mt8189 video decoder compatible, profile and level to support
> MT8189 kernel driver.
> Secondly fix some bugs, including vp 4K profile2 and media device node
> number bug.
> Lastly, add mt8189 video encoder compatible.
> 
> This series has been tested with MT8189 tast test.
> Encoding and decoding worked for this chip.
> 
> Patches 1-2 Add decoder compatible.
> Patches 3 Add profile and level supporting.
> Patches 4 Add core-only VP9 decoding supporting.
> Patches 5-6 fix some bugs.
> Patches 7-8 Adds encoder compatible.
> 
> ---
> H264 test results:
> ./fluster.py run -d GStreamer-H.264-V4L2SL-Gst1.0 -j1 -t 90
>      JVT-AVC_V1       94/135

Your set indicates that this SoC supports more then H.264, any reason to omit
other codecs ? Also, why not -j2, does it mean concurrent decoding is broken ?
> 
> v4l2-compliance test results:
> Compliance test for mtk-vcodec-enc device /dev/video2:
> Total for mtk-vcodec-enc device /dev/video2: 47, Succeeded: 46, Failed: 1, Warnings: 0
> Compliance test for mtk-vcodec-dec device /dev/video3:
> Total for mtk-vcodec-dec device /dev/video3: 48, Succeeded: 48, Failed: 0, Warnings: 0
> 
> scp upstream link:
> https://patchwork.kernel.org/project/linux-mediatek/patch/20250811015922.32680-1-huayu.zong@mediatek.com/
> 
> Changes compared with v3:
> --add reviewer to commit messages
> --Rebased on top of the latest media tree
> 
> Changes compared with v2:
> --add H264 fluster test results
> --reorder compatible string for dt-bindings
> 
> Changes compared with v1:
> --add v4l2-compliance test results
> --add scp upstream link
> --add HW difference discriptions for dt-bindings commit messages
> 
> This series patches dependent on:
> [1]
> https://patchwork.linuxtv.org/project/linux-media/cover/20250510075357.11761-1-yunfei.dong@mediatek.com/
> [2]
> https://patchwork.linuxtv.org/project/linux-media/cover/20250814085642.17343-1-kyrie.wu@mediatek.com/

It could be nice to quote the subjects, so we can decide to open the links or
not. I suppose you opted for sending the DTS separately, I don't have the HW,
but if my chances someone wanted to test that, he's need a these, can you link
them please ?

Nicolas

> 
> Kyrie Wu (8):
>   dt-bindings: media: mediatek: decoder: Add MT8189
>     mediatek,vcodec-decoder
>   media: mediatek: vcodec: add decoder compatible to support MT8189
>   media: mediatek: vcodec: add profile and level supporting for MT8189
>   media: mediatek: vcodec: Add core-only VP9 decoding support for MT8189
>   media: mediatek: vcodec: fix vp9 4096x2176 fail for profile2
>   media: mediatek: vcodec: fix media device node number
>   dt-bindings: media: Add MT8189 mediatek,vcodec-encoder
>   media: mediatek: encoder: Add MT8189 encoder compatible data
> 
>  .../media/mediatek,vcodec-encoder.yaml        |  2 ++
>  .../media/mediatek,vcodec-subdev-decoder.yaml |  1 +
>  .../vcodec/decoder/mtk_vcodec_dec_drv.c       |  9 +++++-
>  .../vcodec/decoder/mtk_vcodec_dec_drv.h       |  1 +
>  .../vcodec/decoder/mtk_vcodec_dec_stateless.c |  4 +++
>  .../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 32 ++++++++++++-------
>  .../vcodec/encoder/mtk_vcodec_enc_drv.c       | 14 ++++++++
>  7 files changed, 50 insertions(+), 13 deletions(-)
Re: [PATCH v4 0/8] Enable video decoder & encoder for MT8189
Posted by Kyrie Wu (吴晗) 3 months, 2 weeks ago
On Thu, 2025-10-16 at 10:42 -0400, Nicolas Dufresne wrote:
> Hi,
> 
> Le jeudi 16 octobre 2025 à 14:07 +0800, Kyrie Wu a écrit :
> > This series have the follow changing:
> > Firstly add mt8189 video decoder compatible, profile and level to
> > support
> > MT8189 kernel driver.
> > Secondly fix some bugs, including vp 4K profile2 and media device
> > node
> > number bug.
> > Lastly, add mt8189 video encoder compatible.
> > 
> > This series has been tested with MT8189 tast test.
> > Encoding and decoding worked for this chip.
> > 
> > Patches 1-2 Add decoder compatible.
> > Patches 3 Add profile and level supporting.
> > Patches 4 Add core-only VP9 decoding supporting.
> > Patches 5-6 fix some bugs.
> > Patches 7-8 Adds encoder compatible.
> > 
> > ---
> > H264 test results:
> > ./fluster.py run -d GStreamer-H.264-V4L2SL-Gst1.0 -j1 -t 90
> >      JVT-AVC_V1       94/135
> 
> Your set indicates that this SoC supports more then H.264, any reason
> to omit
> other codecs ? Also, why not -j2, does it mean concurrent decoding is
> broken ?
Dear Nicolas,

I will update the H264 and vp9 concurrent decoding test results in the
next version.

Thanks.
> > 
> > v4l2-compliance test results:
> > Compliance test for mtk-vcodec-enc device /dev/video2:
> > Total for mtk-vcodec-enc device /dev/video2: 47, Succeeded: 46,
> > Failed: 1, Warnings: 0
> > Compliance test for mtk-vcodec-dec device /dev/video3:
> > Total for mtk-vcodec-dec device /dev/video3: 48, Succeeded: 48,
> > Failed: 0, Warnings: 0
> > 
> > scp upstream link:
> > 
https://patchwork.kernel.org/project/linux-mediatek/patch/20250811015922.32680-1-huayu.zong@mediatek.com/
> > 
> > Changes compared with v3:
> > --add reviewer to commit messages
> > --Rebased on top of the latest media tree
> > 
> > Changes compared with v2:
> > --add H264 fluster test results
> > --reorder compatible string for dt-bindings
> > 
> > Changes compared with v1:
> > --add v4l2-compliance test results
> > --add scp upstream link
> > --add HW difference discriptions for dt-bindings commit messages
> > 
> > This series patches dependent on:
> > [1]
> > 
https://patchwork.linuxtv.org/project/linux-media/cover/20250510075357.11761-1-yunfei.dong@mediatek.com/
> > [2]
> > 
https://patchwork.linuxtv.org/project/linux-media/cover/20250814085642.17343-1-kyrie.wu@mediatek.com/
> 
> It could be nice to quote the subjects, so we can decide to open the
> links or
> not. I suppose you opted for sending the DTS separately, I don't have
> the HW,
> but if my chances someone wanted to test that, he's need a these, can
> you link
> them please ?
> 
> Nicolas

In the coming version, I will attach the dts patch link.

Thanks.

Regards,
Kyrie.
> 
> > 
> > Kyrie Wu (8):
> >   dt-bindings: media: mediatek: decoder: Add MT8189
> >     mediatek,vcodec-decoder
> >   media: mediatek: vcodec: add decoder compatible to support MT8189
> >   media: mediatek: vcodec: add profile and level supporting for
> > MT8189
> >   media: mediatek: vcodec: Add core-only VP9 decoding support for
> > MT8189
> >   media: mediatek: vcodec: fix vp9 4096x2176 fail for profile2
> >   media: mediatek: vcodec: fix media device node number
> >   dt-bindings: media: Add MT8189 mediatek,vcodec-encoder
> >   media: mediatek: encoder: Add MT8189 encoder compatible data
> > 
> >  .../media/mediatek,vcodec-encoder.yaml        |  2 ++
> >  .../media/mediatek,vcodec-subdev-decoder.yaml |  1 +
> >  .../vcodec/decoder/mtk_vcodec_dec_drv.c       |  9 +++++-
> >  .../vcodec/decoder/mtk_vcodec_dec_drv.h       |  1 +
> >  .../vcodec/decoder/mtk_vcodec_dec_stateless.c |  4 +++
> >  .../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 32 ++++++++++++---
> > ----
> >  .../vcodec/encoder/mtk_vcodec_enc_drv.c       | 14 ++++++++
> >  7 files changed, 50 insertions(+), 13 deletions(-)