devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: "Xiaoyong Lu (卢小勇)" <Xiaoyong.Lu@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"George Sun (孙林)" <George.Sun@mediatek.com>,
	"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>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.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 3/5] media: mediatek: vcodec: Fix h264 set lat buffer error
Date: Thu, 17 Nov 2022 09:29:46 +0000	[thread overview]
Message-ID: <41b8bf48d4a672de483a8afff574642335c384b7.camel@mediatek.com> (raw)
In-Reply-To: <11a5fbb6-f462-bdc5-1592-32e8f2664a48@collabora.com>

Hi AngeloGioacchino,

Thanks for your detail comments.

Change the driver according to your suggestion in v2.

Best Regards,
Yunfei Dong

On Mon, 2022-11-14 at 12:26 +0100, AngeloGioacchino Del Regno wrote:
> Il 12/11/22 10:41, Yunfei Dong ha scritto:
> > Will set lat buffer to lat_list two times when lat decode timeout
> > for
> > inner racing mode.
> > 
> > If core thread can't get frame buffer, need to return error value.
> > 
> > Fixes: 59fba9eed5a7 ("media: mediatek: vcodec: support stateless
> > H.264 decoding for mt8192")
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> > ---
> >   .../vcodec/vdec/vdec_h264_req_multi_if.c      | 23 ++++++++++++
> > -------
> >   1 file changed, 15 insertions(+), 8 deletions(-)
> > 
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_i
> > f.c
> > b/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_i
> > f.c
> > index 4cc92700692b..2b7576265f48 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_i
> > f.c
> > +++
> > b/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_i
> > f.c
> > @@ -471,6 +471,12 @@ static int vdec_h264_slice_core_decode(struct
> > vdec_lat_buf *lat_buf)
> >   	       sizeof(share_info->h264_slice_params));
> >   
> >   	fb = ctx->dev->vdec_pdata->get_cap_buffer(ctx);
> > +	if (!fb) {
> > +		err = -EBUSY;
> > +		mtk_vcodec_err(inst, "fb buffer is NULL");
> > +		goto vdec_dec_end;
> > +	}
> > +
> >   	y_fb_dma = fb ? (u64)fb->base_y.dma_addr : 0;
> 
> If you're jumping to vdec_dec_end, this check becomes pointless as
> y_fb_dma
> will never be set to 0, so you can remove the conditional on
> assigning
> the dma address to `y_fb_dma`.
> 
> Same comment a few lines later for `c_fb_dma`.
> 
> Regards,
> Angelo
> 
> 

  reply	other threads:[~2022-11-17  9:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12  9:41 [PATCH 0/5] media: mediatek: vcodec: Fix decode random crash for PLT test Yunfei Dong
2022-11-12  9:41 ` [PATCH 1/5] media: mediatek: vcodec: Fix getting NULL pointer for dst buffer Yunfei Dong
2022-11-14 11:15   ` AngeloGioacchino Del Regno
2022-11-12  9:41 ` [PATCH 2/5] media: mediatek: vcodec: Can't set dst buffer to done when lat decode error Yunfei Dong
2022-11-12  9:41 ` [PATCH 3/5] media: mediatek: vcodec: Fix h264 set lat buffer error Yunfei Dong
2022-11-14 11:26   ` AngeloGioacchino Del Regno
2022-11-17  9:29     ` Yunfei Dong (董云飞) [this message]
2022-11-12  9:41 ` [PATCH 4/5] media: mediatek: vcodec: Setting lat buf to lat_list when lat decode error Yunfei Dong
2022-11-12  9:41 ` [PATCH 5/5] media: mediatek: vcodec: Core thread depends on core_list Yunfei Dong
2022-11-14 11:27   ` AngeloGioacchino Del Regno

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=41b8bf48d4a672de483a8afff574642335c384b7.camel@mediatek.com \
    --to=yunfei.dong@mediatek.com \
    --cc=George.Sun@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Xiaoyong.Lu@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).