mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "nhebert@chromium.org" <nhebert@chromium.org>,
	"benjamin.gaignard@collabora.com"
	<benjamin.gaignard@collabora.com>,
	"nfraprado@collabora.com" <nfraprado@collabora.com>,
	"angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>,
	"nicolas.dufresne@collabora.com" <nicolas.dufresne@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>,
	"wenst@chromium.org" <wenst@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>
Subject: Re: [PATCH v7,0/11] media: mediatek: vcodec: separate encoder and decoder
Date: Sat, 29 Jul 2023 02:54:08 +0000	[thread overview]
Message-ID: <881a8f1860bab64ca9f03e90e3595c451f6dab31.camel@mediatek.com> (raw)
In-Reply-To: <2d9eeb0e-71b3-157c-b947-6dd5485f46e3@xs4all.nl>

Hi Hans,

Thanks for your help and suggestion.

On Fri, 2023-07-28 at 11:25 +0200, Hans Verkuil wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On 25/07/2023 11:58, Hans Verkuil wrote:
> > On 22/07/2023 09:42, Yunfei Dong wrote:
> >> From: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>
> >>
> >> With the driver more and more complex, encoder and decoder need to
> add more parameter
> >> in shared struct 'mtk_vcodec_ctx' and 'mtk_vcodec_dev'. Encoder
> use about 40% and
> >> decoder use 60% parameter. Need to allocate extra unused memory
> when encoder and decoder
> >> working.
> >>
> >> Separate encoder and decoder in different folder and use
> independent data struct.
> >>
> >> patch 1 remove unused parameter.
> >> patch 2~3 align fw and interrupt related interface.
> >> patch 4~6 remove the dependency of debug log
> >> patch 7~8 separate mtk_vcodec_ctx and mtk_vcodec_dev
> >> patch 9 fix unreasonable parameter
> >> patch 10 removed unused header files
> >> patch 11 separate encoder and decoder in different folder
> >> ---
> >> Changed from v6:
> >> - rebase to: 
> https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=fo-v6.6g.
> >> Changed from v5:
> >> - fix some words error for patch 3/6/11.
> >> - rename mtk_vcodec_comm_drv.h to mtk_vcodec_cmn_drv.h for patch
> 7.
> >> Changed from v4:
> >> - add one parameter to record register base for reg_base for patch
> 3.
> >> - add debug string for non ctx log for patch 6.
> >> - change the comment of struct mtk_vcodec_dec_ctx and struct
> mtk_vcodec_enc_ctx for patch 7.
> >> - prefer to use struct mtk_vcodec_dec_dev an current period, will
> re-construct in the future for patch 8.
> >> Changed from v3:
> >> - re-write commit message for patch 3.
> >> Changed from v2:
> >> - This patch main changed:
> >>   1: add different macro mtk_dec_debug and mtk_enc_debug calling
> common
> >>      macro mtk_vcodec_debug in order to use dev_dbg instead of
> pr_debug.
> >>   2: add different macro mtk_v4l2_venc_dbg and mtk_v4l2_vdec_dbg
> calling common
> >>      macro  in order to use dev_dbg instead of pr_debug.
> >> Changed from v1:
> >> - Change pr_dbg to dev_dbg for mtk_v4l2_level and mtk_vcodec_dbg
> for patch 4.
> >> - Change pr_err to dev_err for mtk_v4l2_err and mtk_vcodec_err for
> patch 5.
> >> - Fix unreasonable parameter for patch 8.
> >> ---
> >> Yunfei Dong (11):
> >>   media: mediatek: vcodec: remove unused parameter
> >>   media: mediatek: vcodec: align fw interface
> >>   media: mediatek: vcodec: Removing struct 'mtk_vcodec_ctx/dev'
> for
> >>     shared interface
> >>   media: mediatek: vcodec: Removing useless debug log
> >>   media: mediatek: vcodec: remove the dependency of vcodec debug
> log
> >>   media: mediatek: vcodec: replace pr_* with dev_* for v4l2 debug
> >>     message
> >>   media: mediatek: vcodec: separate struct 'mtk_vcodec_ctx'
> >>   media: mediatek: vcodec: separate struct mtk_vcodec_dev
> >>   media: mediatek: vcodec: fix unreasonable parameter definition
> and
> >>     style
> >>   media: mediatek: vcodec: remove unused include header
> >>   media: mediatek: vcodec: separate decoder and encoder
> > 
> > Besides the missing argument in patch 6/11 I also get this compiler
> warning:
> > 
> > drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c: In
> function 'vpu_enc_ipi_handler':
> > drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c:64:31:
> warning: 'vpu' may be used uninitialized [-Wmaybe-uninitialized]
> >    64 |         struct venc_vpu_inst *vpu;
> >       |                               ^~~
> > 
> > and this smatch error:
> > 
> >
> drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c:1
> 38 mtk_vcodec_get_reg_bases() error: buffer overflow
> 'mtk_dec_reg_names' 11 <= 11
> > 
> > However, I believe that was introduced by Nicolas' patch series.
> > 
> > I'll try to pinpoint the precise patch.
> 
> That smatch error is now found and fixed in the staging tree.
> 
> Can you post a v8 fixing the other issues?
> 
> Thanks!

The build fail for patch 06 and smatch fail will be fixed in next
patch.

Best Regards,
Yunfei Dong

> 
> Regards,
> 
> Hans
> 
> > 
> > Regards,
> > 
> > Hans
> 

      reply	other threads:[~2023-07-29  2:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22  7:42 Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,01/11] media: mediatek: vcodec: remove unused parameter Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,02/11] media: mediatek: vcodec: align fw interface Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,03/11] media: mediatek: vcodec: Removing struct 'mtk_vcodec_ctx/dev' for shared interface Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,04/11] media: mediatek: vcodec: Removing useless debug log Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,05/11] media: mediatek: vcodec: remove the dependency of vcodec " Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,06/11] media: mediatek: vcodec: replace pr_* with dev_* for v4l2 debug message Yunfei Dong
2023-07-25  9:37   ` Hans Verkuil
2023-07-22  7:42 ` [PATCH v7,07/11] media: mediatek: vcodec: separate struct 'mtk_vcodec_ctx' Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,08/11] media: mediatek: vcodec: separate struct mtk_vcodec_dev Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,09/11] media: mediatek: vcodec: fix unreasonable parameter definition and style Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,10/11] media: mediatek: vcodec: remove unused include header Yunfei Dong
2023-07-22  7:42 ` [PATCH v7,11/11] media: mediatek: vcodec: separate decoder and encoder Yunfei Dong
2023-07-25  9:58 ` [PATCH v7,0/11] media: mediatek: vcodec: separate encoder and decoder Hans Verkuil
2023-07-28  9:25   ` Hans Verkuil
2023-07-29  2:54     ` 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=881a8f1860bab64ca9f03e90e3595c451f6dab31.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=nfraprado@collabora.com \
    --cc=nhebert@chromium.org \
    --cc=nicolas.dufresne@collabora.com \
    --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®