From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>,
"nhebert@chromium.org" <nhebert@chromium.org>,
"wenst@chromium.org" <wenst@chromium.org>,
"nfraprado@collabora.com" <nfraprado@collabora.com>,
"benjamin.gaignard@collabora.com"
<benjamin.gaignard@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>,
"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 4/8] mediatek: vcodec: remove the dependency of debug log
Date: Thu, 1 Jun 2023 12:08:58 +0200 [thread overview]
Message-ID: <71cd6c8b-bb4c-0c9a-4f1a-68df89aa2a90@collabora.com> (raw)
In-Reply-To: <1f0509fea9f3326a90e04ee7a0a0ffad0aeb4b9f.camel@mediatek.com>
Il 01/06/23 11:52, Yunfei Dong (董云飞) ha scritto:
> Hi AngeloGioacchino,
>
> Thanks for your suggestion.
> On Thu, 2023-06-01 at 11:29 +0200, AngeloGioacchino Del Regno wrote:
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>> Il 01/06/23 05:02, Yunfei Dong ha scritto:
>>> 'mtk_vcodec_debug' and 'mtk_vcodec_err' depends on 'mtk_vcodec_ctx'
>>> to get the index of each instance, using the index directly instead
>>> of with 'mtk_vcodec_ctx'.
>>>
>>> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>>> ---
>>> .../mediatek/vcodec/mtk_vcodec_util.h | 36 +++--
>>> .../vcodec/vdec/vdec_av1_req_lat_if.c | 78 +++++------
>>> .../mediatek/vcodec/vdec/vdec_h264_if.c | 46 +++----
>>> .../mediatek/vcodec/vdec/vdec_h264_req_if.c | 32 ++---
>>> .../vcodec/vdec/vdec_h264_req_multi_if.c | 62 ++++-----
>>> .../vcodec/vdec/vdec_hevc_req_multi_if.c | 54 ++++----
>>> .../mediatek/vcodec/vdec/vdec_vp8_if.c | 38 +++---
>>> .../mediatek/vcodec/vdec/vdec_vp8_req_if.c | 36 ++---
>>> .../mediatek/vcodec/vdec/vdec_vp9_if.c | 128 +++++++++--
>> -------
>>> .../vcodec/vdec/vdec_vp9_req_lat_if.c | 67 ++++-----
>>> .../platform/mediatek/vcodec/vdec_vpu_if.c | 48 +++----
>>> .../mediatek/vcodec/venc/venc_h264_if.c | 74 +++++-----
>>> .../mediatek/vcodec/venc/venc_vp8_if.c | 44 +++---
>>> .../platform/mediatek/vcodec/venc_vpu_if.c | 54 ++++----
>>> 14 files changed, 399 insertions(+), 398 deletions(-)
>>>
>>> diff --git
>> a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
>> b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
>>> index ecb0bdf3a4f4..f018af38b39d 100644
>>> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
>>> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
>>> @@ -31,42 +31,38 @@ struct mtk_vcodec_dev;
>>> #define mtk_v4l2_err(fmt, args...) \
>>> pr_err("[MTK_V4L2][ERROR] " fmt "\n", ##args)
>>>
>>> -#define mtk_vcodec_err(h, fmt, args...)\
>>> -pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n",\
>>> - ((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
>>> +#define mtk_vcodec_err(inst_id, fmt,
>> args...) \
>>> +pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n", inst_id, ##args)
>>>
>>
>> This *huge* cleanup (congrats btw!) would be a great occasion to
>> change those
>> pr_err() to dev_err(). Can we do that?
>>
>
> Can change pr_err to dev_err, but need to add one extra parameter "dev"
Yes I'm aware of the fact that you have to add a `dev` extra param, of course.
> in mtk_vcodec_err. Whether need to change mtk_vcodec_debug?
>
Yes please, change everything you can to use dev_* prints, that'd be great.
Cheers!
>> Regards,
>> Angelo
>>
> Best Regards,
> Yunfei Dong
next prev parent reply other threads:[~2023-06-01 10:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 3:02 [PATCH 0/8] media: mediatek: vcodec: separate encoder and decoder Yunfei Dong
2023-06-01 3:02 ` [PATCH 1/8] media: mediatek: vcodec: remove unused parameter Yunfei Dong
2023-06-01 3:02 ` [PATCH 2/8] mediatek: vcodec: align fw interface Yunfei Dong
2023-06-01 3:02 ` [PATCH 3/8] mediatek: vcodec: re-write shared interface Yunfei Dong
2023-06-01 3:02 ` [PATCH 4/8] mediatek: vcodec: remove the dependency of debug log Yunfei Dong
2023-06-01 9:29 ` AngeloGioacchino Del Regno
2023-06-01 9:52 ` Yunfei Dong (董云飞)
2023-06-01 10:08 ` AngeloGioacchino Del Regno [this message]
2023-06-01 3:02 ` [PATCH 5/8] mediatek: vcodec: separate struct mtk_vcodec_ctx Yunfei Dong
2023-06-01 3:02 ` [PATCH 6/8] mediatek: vcodec: separate struct mtk_vcodec_dev Yunfei Dong
2023-06-01 9:47 ` AngeloGioacchino Del Regno
2023-06-01 9:58 ` Yunfei Dong (董云飞)
2023-06-01 10:10 ` AngeloGioacchino Del Regno
2023-06-01 3:02 ` [PATCH 7/8] mediatek: vcodec: remove unused include header Yunfei Dong
2023-06-01 3:02 ` [PATCH 8/8] mediatek: vcodec: separate decoder and encoder Yunfei Dong
2023-06-01 9:32 ` [PATCH 0/8] media: mediatek: vcodec: separate encoder and decoder AngeloGioacchino Del Regno
2023-06-01 9:48 ` Yunfei Dong (董云飞)
2023-06-07 8:50 ` 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=71cd6c8b-bb4c-0c9a-4f1a-68df89aa2a90@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Yunfei.Dong@mediatek.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;
as well as URLs for NNTP newsgroup(s).