mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jammy Huang <jammy_huang@aspeedtech.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: "linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"andrew@aj.id.au" <andrew@aj.id.au>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	"eajames@linux.ibm.com" <eajames@linux.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH 6/6] media: aspeed: richer debugfs
Date: Fri, 15 Oct 2021 11:29:55 +0800	[thread overview]
Message-ID: <e94e8b49-e7cc-c358-3b6b-1af82c70982c@aspeedtech.com> (raw)
In-Reply-To: <53fa3d1a-d75b-2fb1-a315-c6406f33289c@molgen.mpg.de>

Dear Paul,

Thanks for you help. I will have an updated patch later accordingly.

On 2021/10/14 下午 02:57, Paul Menzel wrote:
> Dear Jammy,
>
>
> Am 14.10.21 um 08:54 schrieb Paul Menzel:
>
>> Am 14.10.21 um 05:48 schrieb Jammy Huang:
>> media: aspeed: richer debugfs
> It’d be great if you used a statement by adding a verb in imperative
> mood [1]. Maybe:
>
>> Extend debug message
> or
>
>> Add more debug log messages
>>> updated as below:
>>>
>>> Caputre:
>> Capture
>>
>>>     Mode                : Direct fetch
>>>     VGA bpp mode        : 32
>>>     Signal              : Unlock
>>>     Width               : 1920
>>>     Height              : 1080
>>>     FRC                 : 30
>>>
>>> Compression:
>>>     Format              : JPEG
>>>     Subsampling         : 444
>>>     Quality             : 0
>>>     HQ Mode             : N/A
>>>     HQ Quality          : 0
>>>     Mode                : N/A
>>>
>>> Performance:
>>>     Frame#              : 0
>>>     Frame Duration(ms)  :
>>>       Now               : 0
>>>       Min               : 0
>>>       Max               : 0
>>>     FPS                 : 0
>> Do you have output with non-zero values? ;-)
>>
>> On what device did you test this?
>>
>>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
>>> ---
>>>    drivers/media/platform/aspeed-video.c | 41 +++++++++++++++++++++++++--
>>>    1 file changed, 38 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/aspeed-video.c
>>> b/drivers/media/platform/aspeed-video.c
>>> index e1031fd09ac6..f2e5c49ee906 100644
>>> --- a/drivers/media/platform/aspeed-video.c
>>> +++ b/drivers/media/platform/aspeed-video.c
>>> @@ -464,6 +464,9 @@ static const struct v4l2_dv_timings_cap
>>> aspeed_video_timings_cap = {
>>>        },
>>>    };
>>> +static const char * const compress_mode_str[] = {"DCT Only",
>>> +    "DCT VQ mix 2-color", "DCT VQ mix 4-color"};
>>> +
>>>    static unsigned int debug;
>>>    static void aspeed_video_init_jpeg_table(u32 *table, bool yuv420)
>>> @@ -1077,8 +1080,6 @@ static void aspeed_video_set_resolution(struct
>>> aspeed_video *video)
>>>    static void aspeed_video_update_regs(struct aspeed_video *video)
>>>    {
>>> -    static const char * const compress_mode_str[] = {"DCT Only",
>>> -        "DCT VQ mix 2-color", "DCT VQ mix 4-color"};
>>>        u32 comp_ctrl =    FIELD_PREP(VE_COMP_CTRL_DCT_LUM,
>>> video->jpeg_quality) |
>>>            FIELD_PREP(VE_COMP_CTRL_DCT_CHR, video->jpeg_quality | 0x10) |
>>>            FIELD_PREP(VE_COMP_CTRL_EN_HQ, video->hq_mode) |
>>> @@ -1795,9 +1796,29 @@ static const struct vb2_ops
>>> aspeed_video_vb2_ops = {
>>>    static int aspeed_video_debugfs_show(struct seq_file *s, void *data)
>>>    {
>>>        struct aspeed_video *v = s->private;
>>> +    u32 val08;
>> Why does `08` refer to?
>>
>>>        seq_puts(s, "\n");
>>> +    val08 = aspeed_video_read(v, VE_CTRL);
>>> +    seq_puts(s, "Caputre:\n");
>>> +    if (FIELD_GET(VE_CTRL_DIRECT_FETCH, val08)) {
>>> +        seq_printf(s, "  %-20s:\tDirect fetch\n", "Mode");
>>> +        seq_printf(s, "  %-20s:\t%s\n", "VGA bpp mode",
>>> +               FIELD_GET(VE_CTRL_INT_DE, val08) ? "16" : "32");
>>> +    } else {
>>> +        seq_printf(s, "  %-20s:\tSync\n", "Mode");
>>> +        seq_printf(s, "  %-20s:\t%s\n", "Video source",
>>> +               FIELD_GET(VE_CTRL_SOURCE, val08) ?
>>> +               "external" : "internal");
>>> +        seq_printf(s, "  %-20s:\t%s\n", "DE source",
>>> +               FIELD_GET(VE_CTRL_INT_DE, val08) ?
>>> +               "internal" : "external");
>>> +        seq_printf(s, "  %-20s:\t%s\n", "Cursor overlay",
>>> +               FIELD_GET(VE_CTRL_AUTO_OR_CURSOR, val08) ?
>>> +               "Without" : "With");
>>> +    }
>>> +
>>>        seq_printf(s, "  %-20s:\t%s\n", "Signal",
>>>               v->v4l2_input_status ? "Unlock" : "Lock");
>>>        seq_printf(s, "  %-20s:\t%d\n", "Width", v->pix_fmt.width);
>>> @@ -1806,6 +1827,21 @@ static int aspeed_video_debugfs_show(struct
>>> seq_file *s, void *data)
>>>        seq_puts(s, "\n");
>>> +    seq_puts(s, "Compression:\n");
>>> +    seq_printf(s, "  %-20s:\t%s\n", "Format",
>>> +           v->partial_jpeg ? "Aspeed" : "JPEG");
>>> +    seq_printf(s, "  %-20s:\t%s\n", "Subsampling",
>>> +           v->yuv420 ? "420" : "444");
>>> +    seq_printf(s, "  %-20s:\t%d\n", "Quality", v->jpeg_quality);
>>> +    seq_printf(s, "  %-20s:\t%s\n", "HQ Mode",
>>> +           v->partial_jpeg ? (v->hq_mode ? "on" : "off") : "N/A");
>>> +    seq_printf(s, "  %-20s:\t%d\n", "HQ Quality", v->jpeg_hq_quality);
>>> +    seq_printf(s, "  %-20s:\t%s\n", "Mode",
>>> +           v->partial_jpeg ? compress_mode_str[v->compression_mode]
>>> +                   : "N/A");
>>> +
>>> +    seq_puts(s, "\n");
>>> +
>>>        seq_puts(s, "Performance:\n");
>>>        seq_printf(s, "  %-20s:\t%d\n", "Frame#", v->sequence);
>>>        seq_printf(s, "  %-20s:\n", "Frame Duration(ms)");
>> Remove the colon, and add a space before (?
>>
>>> @@ -1814,7 +1850,6 @@ static int aspeed_video_debugfs_show(struct
>>> seq_file *s, void *data)
>>>        seq_printf(s, "    %-18s:\t%d\n", "Max", v->perf.duration_max);
>>>        seq_printf(s, "  %-20s:\t%d\n", "FPS",
>>> 1000/(v->perf.totaltime/v->sequence));
>>> -
>>>        return 0;
>>>    }
>
> Kind regards,
>
> Paul
>
>
> [1]: https://chris.beams.io/posts/git-commit/

      reply	other threads:[~2021-10-15  3:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14  3:48 [PATCH 0/6] add aspeed-jpeg support for aspeed-video Jammy Huang
2021-10-14  3:48 ` [PATCH 1/6] media: aspeed: move err-handling together to the bottom Jammy Huang
2021-10-14  3:48 ` [PATCH 2/6] media: aspeed: add dprintk for more detailed log control Jammy Huang
2021-10-14  6:28   ` Paul Menzel
2021-10-15  2:16     ` Jammy Huang
2021-10-15  8:29       ` Paul Menzel
2021-10-14  3:48 ` [PATCH 3/6] media: aspeed: refine to centerize format/compress settings Jammy Huang
2021-10-14  6:36   ` Paul Menzel
2021-10-15  5:39     ` Jammy Huang
2021-10-14  3:48 ` [PATCH 4/6] media: aspeed: Support aspeed mode to reduce compressed data Jammy Huang
2021-10-14  6:47   ` Paul Menzel
2021-10-18  8:51     ` Jammy Huang
2021-10-18  9:34       ` Paul Menzel
2021-10-18 10:10         ` Jammy Huang
2021-10-14  3:48 ` [PATCH 5/6] media: aspeed: add comments and macro Jammy Huang
2021-10-14  3:48 ` [PATCH 6/6] media: aspeed: richer debugfs Jammy Huang
2021-10-14  6:54   ` Paul Menzel
2021-10-14  6:57     ` Paul Menzel
2021-10-15  3:29       ` Jammy Huang [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=e94e8b49-e7cc-c358-3b6b-1af82c70982c@aspeedtech.com \
    --to=jammy_huang@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pmenzel@molgen.mpg.de \
    /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®