lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c1d16832821ce4812ced2adb3b618a732b66bd82.camel@mediatek.com>
Date: Wed, 16 Oct 2024 03:46:54 +0000
From: Yunfei Dong (董云飞) <Yunfei.Dong@...iatek.com>
To: "wenst@...omium.org" <wenst@...omium.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"frkoenig@...omium.org" <frkoenig@...omium.org>, "stevecho@...omium.org"
	<stevecho@...omium.org>, "nhebert@...omium.org" <nhebert@...omium.org>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"nicolas.dufresne@...labora.com" <nicolas.dufresne@...labora.com>,
	"daniel.almeida@...labora.com" <daniel.almeida@...labora.com>,
	"daniel@...ll.ch" <daniel@...ll.ch>, Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>,
	"benjamin.gaignard@...labora.com" <benjamin.gaignard@...labora.com>,
	"sebastian.fricke@...labora.com" <sebastian.fricke@...labora.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "hverkuil-cisco@...all.nl"
	<hverkuil-cisco@...all.nl>, "hsinyi@...omium.org" <hsinyi@...omium.org>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	"Nicolas Prado" <nfraprado@...labora.com>
Subject: Re: [PATCH 2/6] media: mediatek: vcodec: remove parse nal info in
 kernel

Hi Chen-Yu,

Thanks for your help to review the patch.
On Tue, 2024-10-15 at 15:58 +0800, Chen-Yu Tsai wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Mon, Oct 14, 2024 at 3:33 PM Yunfei Dong <
> yunfei.dong@...iatek.com> wrote:
> >
> > Hardware can parse the slice synatx to get nal information in
> > scp, needn't to parse it in kernel again.
> 
> Does this apply to all existing shipped SCP firmware? If not, please
> put this behind a vdec firmware flag.
> 
Need to remove the parse driver for extend driver, keep the logic for
non extend architecture.

> ChenYu
> 
Best Regards,
Yunfei Dong
> 
> > Signed-off-by: Yunfei Dong <yunfei.dong@...iatek.com>
> > ---
> >  .../vcodec/decoder/vdec/vdec_h264_req_multi_if.c    | 13 ++-------
> ----
> >  1 file changed, 2 insertions(+), 11 deletions(-)
> >
> > diff --git
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_m
> ulti_if.c
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_m
> ulti_if.c
> > index d3f8d62238c0..76b96924a2a7 100644
> > ---
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_m
> ulti_if.c
> > +++
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_m
> ulti_if.c
> > @@ -634,11 +634,10 @@ static int vdec_h264_slice_lat_decode(void
> *h_vdec, struct mtk_vcodec_mem *bs,
> >         struct vdec_h264_slice_inst *inst = h_vdec;
> >         struct vdec_vpu_inst *vpu = &inst->vpu;
> >         struct mtk_video_dec_buf *src_buf_info;
> > -       int nal_start_idx, err, timeout = 0;
> > +       int err, timeout = 0;
> >         unsigned int data[2];
> >         struct vdec_lat_buf *lat_buf;
> >         struct vdec_h264_slice_share_info *share_info;
> > -       unsigned char *buf;
> >
> >         if (vdec_msg_queue_init(&inst->ctx->msg_queue, inst->ctx,
> >                                 vdec_h264_slice_core_decode,
> > @@ -662,14 +661,6 @@ static int vdec_h264_slice_lat_decode(void
> *h_vdec, struct mtk_vcodec_mem *bs,
> >         share_info = lat_buf->private_data;
> >         src_buf_info = container_of(bs, struct mtk_video_dec_buf,
> bs_buffer);
> >
> > -       buf = (unsigned char *)bs->va;
> > -       nal_start_idx = mtk_vdec_h264_find_start_code(buf, bs-
> >size);
> > -       if (nal_start_idx < 0) {
> > -               err = -EINVAL;
> > -               goto err_free_fb_out;
> > -       }
> > -
> > -       inst->vsi->dec.nal_info = buf[nal_start_idx];
> >         lat_buf->vb2_v4l2_src = &src_buf_info->m2m_buf.vb;
> >         v4l2_m2m_buf_copy_metadata(&src_buf_info->m2m_buf.vb,
> &lat_buf->ts_info, true);
> >
> > @@ -677,7 +668,7 @@ static int vdec_h264_slice_lat_decode(void
> *h_vdec, struct mtk_vcodec_mem *bs,
> >         if (err)
> >                 goto err_free_fb_out;
> >
> > -       vdec_h264_insert_startcode(inst->ctx->dev, buf, &bs->size,
> > +       vdec_h264_insert_startcode(inst->ctx->dev, bs->va, &bs-
> >size,
> >                                    &share_info-
> >h264_slice_params.pps);
> >
> >         *res_chg = inst->resolution_changed;
> > --
> > 2.46.0
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ