From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "wenst@chromium.org" <wenst@chromium.org>,
"Tiffany Lin (林慧珊)" <tiffany.lin@mediatek.com>,
"nicolas@ndufresne.ca" <nicolas@ndufresne.ca>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"benjamin.gaignard@collabora.com"
<benjamin.gaignard@collabora.com>,
"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"frkoenig@chromium.org" <frkoenig@chromium.org>,
"stevecho@chromium.org" <stevecho@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>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"hsinyi@chromium.org" <hsinyi@chromium.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Subject: Re: [PATCH v2] media: mediatek: vcodec: Force capture queue format to MM21
Date: Tue, 14 Mar 2023 02:04:19 +0000 [thread overview]
Message-ID: <46f73b4b95a802d20f31f4213b71491ea815665a.camel@mediatek.com> (raw)
In-Reply-To: <e972c2ac1a7a6f0ce258c8056b82bdc87e4d8ceb.camel@ndufresne.ca>
Hi Nicolas,
Thanks for your suggestion.
On Fri, 2023-02-10 at 10:36 -0500, Nicolas Dufresne wrote:
> Le vendredi 10 février 2023 à 13:55 +0800, Yunfei Dong a écrit :
> > In order to conver the format of capture queue from mediatek MM21
> > to
> > standard yuv420 with Libyuv, need to force capture queue format to
> > MM21 for Libyuv can't covert mediatek MT21 format at current
> > period.
>
> Please rework this text, it is hard to understand.
>
Will re-write the commit message in next version as below, could you
please help to review whether it's well to be used ?
Libyuv is one software library used to covert format. Only covert
mediatek MM21 to standard yuv420 for MT21 is compressed mode and MM21
is uncompressed mode at current period. Need to set capture queue
format to MM21 in order to use Libyuv.
> >
> > Fixes: 7501edef6b1f ("media: mediatek: vcodec: Different codec
> > using different capture format")
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.org>
> > ---
> > changed with v1:
> > - add Fixes tag.
> > ---
> > drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > index 641f533c417f..4f5e9c20214f 100644
> > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > @@ -41,7 +41,7 @@ static bool mtk_vdec_get_cap_fmt(struct
> > mtk_vcodec_ctx *ctx, int format_index)
> > const struct mtk_video_fmt *fmt;
> > struct mtk_q_data *q_data;
> > int num_frame_count = 0, i;
> > - bool ret = true;
> > + bool ret = false;
> >
> > for (i = 0; i < *dec_pdata->num_formats; i++) {
> > if (dec_pdata->vdec_formats[i].type != MTK_FMT_FRAME)
> > @@ -63,7 +63,7 @@ static bool mtk_vdec_get_cap_fmt(struct
> > mtk_vcodec_ctx *ctx, int format_index)
> > case V4L2_PIX_FMT_H264_SLICE:
> > case V4L2_PIX_FMT_VP9_FRAME:
> > if (fmt->fourcc == V4L2_PIX_FMT_MM21)
> > - ret = false;
> > + ret = true;
>
> This makes the VP8 and the other cases identical, leaving anything
> that touches
> MT21 as dead code. I'm not sure, cause I cannot test it, but it
> should in theory
> render MT8192 unusable, unless a new firmware has been submitted to
> linux-
> firmware with MM21 support ?
>
If the firmware only support MT21 => won't exist for vp8 need to use
MM21.
If the firmware only support MM21, will using MM21.
If the firmware support MT21 & MM21, will force VP8 to use MM21,
H264/VP9/AV1 will use MT21 before this change.
Will force all driver to use MM21 after adding this change.
Best Regards,
Yunfei Dong
> > break;
> > default:
> > ret = true;
>
>
prev parent reply other threads:[~2023-03-14 2:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 5:55 [PATCH v2] media: mediatek: vcodec: Force capture queue format to MM21 Yunfei Dong
2023-02-10 15:36 ` Nicolas Dufresne
2023-02-14 2:28 ` Yunfei Dong (董云飞)
2023-02-22 21:11 ` Nícolas F. R. A. Prado
2023-02-27 2:17 ` Yunfei Dong (董云飞)
2023-02-28 22:03 ` Nícolas F. R. A. Prado
2023-03-14 9:20 ` Yunfei Dong (董云飞)
2023-02-14 2:29 ` Yunfei Dong (董云飞)
2023-03-14 2:04 ` Yunfei Dong (董云飞) [this message]
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=46f73b4b95a802d20f31f4213b71491ea815665a.camel@mediatek.com \
--to=yunfei.dong@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=frkoenig@chromium.org \
--cc=hsinyi@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--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=nicolas@ndufresne.ca \
--cc=stevecho@chromium.org \
--cc=tiffany.lin@mediatek.com \
--cc=wenst@chromium.org \
/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;
as well as URLs for NNTP newsgroup(s).