linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "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>,
	"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>,
	"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 v5,8/8] media: mediatek: vcodec: Add dbgfs help function
Date: Wed, 31 May 2023 10:22:27 +0000	[thread overview]
Message-ID: <7820b5c393b1a0cb3bfca571d557bdf9dc5bf97b.camel@mediatek.com> (raw)
In-Reply-To: <da165529-ae9a-8461-c582-9c85e6f2fa4c@xs4all.nl>

Hi Hans,

On Tue, 2023-05-30 at 12:33 +0200, Hans Verkuil wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On 5/30/23 12:06, AngeloGioacchino Del Regno wrote:
> > Il 25/05/23 04:12, Yunfei Dong ha scritto:
> >> Getting dbgfs help information with command "echo -help > vdec".
> >>
> >> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> >> ---
> >>   .../mediatek/vcodec/mtk_vcodec_dbgfs.c        | 24
> ++++++++++++++++++-
> >>   1 file changed, 23 insertions(+), 1 deletion(-)
> >>
> >> diff --git
> a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> >> index 237d0dc8a1fc..2372fc449b45 100644
> >> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> >> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> >> @@ -52,6 +52,23 @@ static void
> mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf
> >>   *used += curr_len;
> >>   }
> >>   
> >> +static void mtk_vdec_dbgfs_get_help(char *buf, int *used, int
> total)
> >> +{
> >> +int curr_len;
> >> +
> >> +curr_len = snprintf(buf + *used, total - *used,
> >> +    "help: (1: echo -'info' > vdec 2: cat vdec)\n");
> >> +*used += curr_len;
> >> +
> >> +curr_len = snprintf(buf + *used, total - *used,
> >> +    "\t-picinfo: get resolution\n");
> >> +*used += curr_len;
> >> +
> >> +curr_len = snprintf(buf + *used, total - *used,
> >> +    "\t-format: get output & capture queue format\n");
> >> +*used += curr_len;
> >> +}
> >> +
> >>   static ssize_t mtk_vdec_dbgfs_write(struct file *filp, const
> char __user *ubuf,
> >>       size_t count, loff_t *ppos)
> >>   {
> >> @@ -84,6 +101,11 @@ static ssize_t mtk_vdec_dbgfs_read(struct file
> *filp, char __user *ubuf,
> >>   if (!buf)
> >>   return -ENOMEM;
> >>   
> >> +if (strstr(dbgfs->dbgfs_buf, "-help")) {
> > 
> > I would print the help strings in two conditions:
> > 1. -help
> > 2. (nothing)
> > 
> > ...so that if you don't echo anything to vdec (no params), you get
> the help text.
> > Otherwise, you would have to know that "-help" is a parameter that
> gives you help
> > text in the first place.
> > 
> > As for this commit "as is", it works as intended and it is useful
> to retrieve
> > the help text; you can either send a followup commit that extends
> the help to
> > the corner case that I've explained, or send a v6 adding that to
> this same commit.
> > 
> > I would prefer to see a v6 -- BUT -- since this series was sent a
> long time ago,
> > you will get my R-b and I will leave the final choice to Hans.
> > 
> > Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> > 
> > 
> 
> I prefer a v6, rebased on top of the media_stage tree.
> 
> Regards,
> 
> Hans

I already have sent patch v6 to review.

Best Regards,
Yunfei Dong

  reply	other threads:[~2023-05-31 10:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  2:12 [PATCH v5,0/8] media: mediatek: vcodec: Add debugfs file for decode and encode Yunfei Dong
2023-05-25  2:12 ` [PATCH v5,1/8] media: mediatek: vcodec: Add debugfs interface to get debug information Yunfei Dong
2023-05-25  2:12 ` [PATCH v5,2/8] media: mediatek: vcodec: Add debug params to control different log level Yunfei Dong
2023-05-25  2:12 ` [PATCH v5,3/8] media: mediatek: vcodec: Add a debugfs file to get different useful information Yunfei Dong
2023-05-30 10:05   ` AngeloGioacchino Del Regno
2023-05-25  2:12 ` [PATCH v5,4/8] media: mediatek: vcodec: Get each context resolution information Yunfei Dong
2023-05-30 10:05   ` AngeloGioacchino Del Regno
2023-05-25  2:12 ` [PATCH v5,5/8] media: mediatek: vcodec: Get each instance format type Yunfei Dong
2023-05-30 10:05   ` AngeloGioacchino Del Regno
2023-05-25  2:12 ` [PATCH v5,6/8] media: mediatek: vcodec: Change dbgfs interface to support encode Yunfei Dong
2023-05-25  2:12 ` [PATCH v5,7/8] media: mediatek: vcodec: Add encode to support dbgfs Yunfei Dong
2023-05-25  2:12 ` [PATCH v5,8/8] media: mediatek: vcodec: Add dbgfs help function Yunfei Dong
2023-05-30 10:06   ` AngeloGioacchino Del Regno
2023-05-30 10:15     ` Chen-Yu Tsai
2023-05-30 10:33     ` Hans Verkuil
2023-05-31 10:22       ` Yunfei Dong (董云飞) [this message]
2023-05-30  8:27 ` [PATCH v5,0/8] media: mediatek: vcodec: Add debugfs file for decode and encode Yunfei Dong (董云飞)
2023-05-30  8:55   ` Hans Verkuil
2023-05-30 10:13 ` Chen-Yu Tsai

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=7820b5c393b1a0cb3bfca571d557bdf9dc5bf97b.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;
as well as URLs for NNTP newsgroup(s).