mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: "Kyrie Wu (吴晗)" <Kyrie.Wu@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"George Sun (孙林)" <George.Sun@mediatek.com>,
	"Tiffany Lin (林慧珊)" <tiffany.lin@mediatek.com>,
	"nhebert@chromium.org" <nhebert@chromium.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"hverkuil@xs4all.nl" <hverkuil@xs4all.nl>,
	"Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"Irui Wang (王瑞)" <Irui.Wang@mediatek.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Yilong Zhou (周易龙)" <Yilong.Zhou@mediatek.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"Andrew-CT Chen (陳智迪)" <Andrew-CT.Chen@mediatek.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>
Cc: "andrzejtp2010@gmail.com" <andrzejtp2010@gmail.com>,
	 "neil.armstrong@linaro.org" <neil.armstrong@linaro.org>
Subject: Re: [PATCH v5 0/8] Enable video decoder & encoder for MT8189
Date: Mon, 10 Nov 2025 08:57:26 -0500	[thread overview]
Message-ID: <f4fee7587d8e3e58bab39f1b3202b67f0f5c3e04.camel@collabora.com> (raw)
In-Reply-To: <09eb315e50aeaf865b093880aaaa5f2c9c0feba9.camel@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 6635 bytes --]

Le lundi 10 novembre 2025 à 02:32 +0000, Kyrie Wu (吴晗) a écrit :
> 
> On Thu, 2025-11-06 at 09:18 -0500, Nicolas Dufresne wrote:
> > Hi,
> > 
> > Le jeudi 06 novembre 2025 à 14:13 +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 -j2 -t 90
> > >     JVT-AVC_V1Ran 96/135 tests successfully
> > > 
> > > VP9 test results:
> > > ./fluster.py run -d GStreamer-VP9-V4L2SL-Gst1.0 -j2 -t 90
> > > VP9-TEST-VECTORSRan 276/305 tests successfully
> > > 
> > > 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
> > 
> > There is one fail, can you explain it ?
> > 
> > Nicolas
> 
> Dear Nicolas,
> 
> The failure is caused by subscribed event/dqevent. Our encoder driver
> didn't register those apis, which caused this failure.
> Here is the fail log, which is samed as MT8196:
> 
> https://patchwork.linuxtv.org/project/linux-media/cover/20250528063633.14054-1-irui.wang@mediatek.com/
> 
> 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
>                 fail: v4l2-test-controls.cpp(1171): node->codec_mask &
> STATEFUL_ENCODER
>         test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
>         test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>         Standard Controls: 16 Private Controls: 0


The spec says:
   
   
   For backwards compatibility, the encoder will signal a V4L2_EVENT_EOS event when
   the last frame has been encoded and all frames are ready to be dequeued. 

In practice, we test for that on every m2m, see the test code:


	if (node->is_m2m) {
		node_m2m_cap->g_fmt(fmt_q, m2m_q.g_type());
		if (node_m2m_cap->buftype_pixfmts[m2m_q.g_type()][fmt_q.g_pixelformat()] &
			V4L2_FMT_FLAG_COMPRESSED)
			valid_output_flags = V4L2_BUF_FLAG_TIMECODE | V4L2_BUF_FLAG_TSTAMP_SRC_MASK;

		struct v4l2_event_subscription sub = { 0 };

		sub.type = V4L2_EVENT_EOS;
		if (node->codec_mask & (STATEFUL_ENCODER | STATEFUL_DECODER))
			doioctl(node, VIDIOC_SUBSCRIBE_EVENT, &sub);
	}

please fix,
Nicolas

> 
> Thanks.
> 
> Regards,
> Kyrie.
> 
> > 
> > > 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/
> > > dtsi upstream link:
> > > 
> https://lore.kernel.org/linux-mediatek/20251030134541.784011-12-jh.hsu@mediatek.com/T/#m847e35de0a5b18fac0ca0624a8559d84964ad5c7
> > > 
> > > Changes compared with v4:
> > > --update H264 & vp9 fluster test results
> > > --update vp9 single core decoder prob size setting and commit
> > > messages
> > > 
> > > 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 single core 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 |  5 +-
> > >  .../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 | 48 ++++++++++++++-
> > > ----
> > >  .../vcodec/encoder/mtk_vcodec_enc_drv.c       | 14 ++++++
> > >  7 files changed, 68 insertions(+), 15 deletions(-)
> 
> ************* MEDIATEK Confidentiality Notice
>  ********************
> The information contained in this e-mail message (including any 
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be 
> conveyed only to the designated recipient(s). Any use, dissemination, 
> distribution, printing, retaining or copying of this e-mail (including its 
> attachments) by unintended recipient(s) is strictly prohibited and may 
> be unlawful. If you are not an intended recipient of this e-mail, or believe
>  
> that you have received this e-mail in error, please notify the sender 
> immediately (by replying to this e-mail), delete any and all copies of 
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-11-10 13:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06  6:13 Kyrie Wu
2025-11-06  6:13 ` [PATCH v5 1/8] dt-bindings: media: mediatek: decoder: Add MT8189 mediatek,vcodec-decoder Kyrie Wu
2025-11-06  6:13 ` [PATCH v5 2/8] media: mediatek: vcodec: add decoder compatible to support MT8189 Kyrie Wu
2025-11-06 14:21   ` Nicolas Dufresne
2025-11-18  7:22     ` Kyrie Wu (吴晗)
2025-11-06  6:13 ` [PATCH v5 3/8] media: mediatek: vcodec: add profile and level supporting for MT8189 Kyrie Wu
2025-11-06 14:23   ` Nicolas Dufresne
2025-11-06  6:13 ` [PATCH v5 4/8] media: mediatek: vcodec: Add single core VP9 decoding support " Kyrie Wu
2025-11-06 14:29   ` Nicolas Dufresne
2025-11-17  7:40     ` Kyrie Wu (吴晗)
2025-11-06  6:13 ` [PATCH v5 5/8] media: mediatek: vcodec: fix vp9 4096x2176 fail for profile2 Kyrie Wu
2025-11-06 14:46   ` Nicolas Dufresne
2025-11-17  7:53     ` Kyrie Wu (吴晗)
2025-11-06 15:17   ` Nicolas Dufresne
2025-11-17  7:36     ` Kyrie Wu (吴晗)
2025-11-17 13:50       ` Nicolas Dufresne
2025-11-06  6:13 ` [PATCH v5 6/8] media: mediatek: vcodec: fix media device node number Kyrie Wu
2025-11-06 14:47   ` Nicolas Dufresne
2025-11-17  6:15     ` Kyrie Wu (吴晗)
2025-11-06  6:13 ` [PATCH v5 7/8] dt-bindings: media: Add MT8189 mediatek,vcodec-encoder Kyrie Wu
2025-11-06  6:13 ` [PATCH v5 8/8] media: mediatek: encoder: Add MT8189 encoder compatible data Kyrie Wu
2025-11-06 14:50   ` Nicolas Dufresne
2025-11-17  6:14     ` Kyrie Wu (吴晗)
2025-11-06 14:18 ` [PATCH v5 0/8] Enable video decoder & encoder for MT8189 Nicolas Dufresne
2025-11-10  2:32   ` Kyrie Wu (吴晗)
2025-11-10 13:57     ` Nicolas Dufresne [this message]
2025-11-17  6:12       ` Kyrie Wu (吴晗)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4fee7587d8e3e58bab39f1b3202b67f0f5c3e04.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=Andrew-CT.Chen@mediatek.com \
    --cc=George.Sun@mediatek.com \
    --cc=Irui.Wang@mediatek.com \
    --cc=Kyrie.Wu@mediatek.com \
    --cc=Yilong.Zhou@mediatek.com \
    --cc=Yunfei.Dong@mediatek.com \
    --cc=andrzejtp2010@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nhebert@chromium.org \
    --cc=robh@kernel.org \
    --cc=tiffany.lin@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®