[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71cd6c8b-bb4c-0c9a-4f1a-68df89aa2a90@collabora.com>
Date: Thu, 1 Jun 2023 12:08:58 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Yunfei Dong (董云飞)
<Yunfei.Dong@...iatek.com>,
"nhebert@...omium.org" <nhebert@...omium.org>,
"wenst@...omium.org" <wenst@...omium.org>,
"nfraprado@...labora.com" <nfraprado@...labora.com>,
"benjamin.gaignard@...labora.com" <benjamin.gaignard@...labora.com>,
"nicolas.dufresne@...labora.com" <nicolas.dufresne@...labora.com>,
"hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>
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>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"daniel@...ll.ch" <daniel@...ll.ch>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
"hsinyi@...omium.org" <hsinyi@...omium.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 4/8] mediatek: vcodec: remove the dependency of debug log
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@...iatek.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
Powered by blists - more mailing lists