From: "TingHan Shen (沈廷翰)" <TingHan.Shen@mediatek.com>
To: "wenst@chromium.org" <wenst@chromium.org>,
"nfraprado@collabora.com" <nfraprado@collabora.com>,
"nicolas@ndufresne.ca" <nicolas@ndufresne.ca>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"benjamin.gaignard@collabora.com"
<benjamin.gaignard@collabora.com>,
"Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.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>,
"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 v3] media: mediatek: vcodec: Force capture queue format to MM21
Date: Wed, 15 Mar 2023 03:42:32 +0000 [thread overview]
Message-ID: <adf8c1ebf1c240dc88889d102ed1f0dadd4612c1.camel@mediatek.com> (raw)
In-Reply-To: <08ccf52a-39bd-ed28-d9ca-3615c4a02c09@collabora.com>
On Tue, 2023-03-14 at 10:45 +0100, AngeloGioacchino Del Regno wrote:
> Il 14/03/23 08:25, Yunfei Dong ha scritto:
> > Libyuv is one software library used to covert format. Only covert
> > mediatek uncompressed mode MM21 to standard yuv420 for MT21 is
> > compressed mode. Need to set capture queue format to MM21 in order
> > to use Libyuv when scp firmware support MM21 and MT21.
> >
> > Fixes: 7501edef6b1f ("media: mediatek: vcodec: Different codec using different capture format")
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>
>
> After the firmware gets sent to linux-firmware *and ONLY after that*:
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
The firmwares are sent to linux-firmware.
https://lore.kernel.org/linux-firmware/a43524a089a783f70adbe89b83eeb01fbd405d04.camel@mediatek.com/T/#u
>
> > ---
> > changed with v2:
> > - re-write commit message.
> > - change the driver flow.
> > changed with v1:
> > - add Fixes tag.
> > ---
> > .../platform/mediatek/vcodec/mtk_vcodec_dec.c | 24 +++----------------
> > 1 file changed, 3 insertions(+), 21 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..c99705681a03 100644
> > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > @@ -39,10 +39,9 @@ static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_ctx *ctx, int format_index)
> > {
> > const struct mtk_vcodec_dec_pdata *dec_pdata = ctx->dev->vdec_pdata;
> > const struct mtk_video_fmt *fmt;
> > - struct mtk_q_data *q_data;
> > int num_frame_count = 0, i;
> > - bool ret = true;
> >
> > + fmt = &dec_pdata->vdec_formats[format_index];
> > for (i = 0; i < *dec_pdata->num_formats; i++) {
> > if (dec_pdata->vdec_formats[i].type != MTK_FMT_FRAME)
> > continue;
> > @@ -50,27 +49,10 @@ static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_ctx *ctx, int format_index)
> > num_frame_count++;
> > }
> >
> > - if (num_frame_count == 1)
> > + if (num_frame_count == 1 || fmt->fourcc == V4L2_PIX_FMT_MM21)
> > return true;
> >
> > - fmt = &dec_pdata->vdec_formats[format_index];
> > - q_data = &ctx->q_data[MTK_Q_DATA_SRC];
> > - switch (q_data->fmt->fourcc) {
> > - case V4L2_PIX_FMT_VP8_FRAME:
> > - if (fmt->fourcc == V4L2_PIX_FMT_MM21)
> > - ret = true;
> > - break;
> > - case V4L2_PIX_FMT_H264_SLICE:
> > - case V4L2_PIX_FMT_VP9_FRAME:
> > - if (fmt->fourcc == V4L2_PIX_FMT_MM21)
> > - ret = false;
> > - break;
> > - default:
> > - ret = true;
> > - break;
> > - }
> > -
> > - return ret;
> > + return false;
> > }
> >
> > static struct mtk_q_data *mtk_vdec_get_q_data(struct mtk_vcodec_ctx *ctx,
>
>
--
Best regards,
TingHan
next prev parent reply other threads:[~2023-03-15 3:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 7:25 Yunfei Dong
2023-03-14 9:45 ` AngeloGioacchino Del Regno
2023-03-15 3:42 ` TingHan Shen (沈廷翰) [this message]
2023-03-16 20:51 ` Nícolas F. R. A. Prado
2023-03-17 3:06 ` Yunfei Dong (董云飞)
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=adf8c1ebf1c240dc88889d102ed1f0dadd4612c1.camel@mediatek.com \
--to=tinghan.shen@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Yunfei.Dong@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=nfraprado@collabora.com \
--cc=nicolas@ndufresne.ca \
--cc=stevecho@chromium.org \
--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
all inboxes | Powered by JetHome®