From: Jammy Huang <jammy_huang@aspeedtech.com>
To: <eajames@linux.ibm.com>, <mchehab@kernel.org>, <joel@jms.id.au>,
<andrew@aj.id.au>, <hverkuil-cisco@xs4all.nl>,
<sakari.ailus@linux.intel.com>, <gregkh@linuxfoundation.org>,
<laurent.pinchart@ideasonboard.com>,
<linux-media@vger.kernel.org>, <openbmc@lists.ozlabs.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v4 9/9] media: aspeed: Extend debug message
Date: Mon, 15 Nov 2021 15:44:37 +0800 [thread overview]
Message-ID: <20211115074437.28079-10-jammy_huang@aspeedtech.com> (raw)
In-Reply-To: <20211115074437.28079-1-jammy_huang@aspeedtech.com>
updated as below:
Capture:
Mode : Direct fetch
VGA bpp mode : 32
Signal : lock
Width : 1920
Height : 1080
FRC : 0
Compression:
Format : JPEG
Subsampling : 444
Quality : 4
HQ Mode : N/A
HQ Quality : 0
Mode : N/A
Performance:
Frame# : 4
Frame Duration(ms) :
Now : 22
Min : 21
Max : 22
FPS : 45
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
---
v4:
- update debugfs log
v3:
- no update
v2:
- update commit message
---
drivers/media/platform/aspeed-video.c | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 00730bdda561..1b7ec8d1884b 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -1801,10 +1801,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;
seq_puts(s, "\n");
seq_puts(s, "Capture:\n");
+ val08 = aspeed_video_read(v, VE_CTRL);
+ 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);
@@ -1813,6 +1832,20 @@ 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", format_str[v->format]);
+ 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->format == VIDEO_FMT_ASPEED) ? (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->format == VIDEO_FMT_ASPEED) ?
+ 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)");
--
2.25.1
prev parent reply other threads:[~2021-11-15 7:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 7:44 [PATCH v4 0/9] add aspeed-jpeg support for aspeed-video Jammy Huang
2021-11-15 7:44 ` [PATCH v4 1/9] media: aspeed: move err-handling together to the bottom Jammy Huang
2021-11-15 7:44 ` [PATCH v4 2/9] media: aspeed: use v4l2_info/v4l2_warn/v4l2_dbg for log Jammy Huang
2021-11-15 7:44 ` [PATCH v4 3/9] media: aspeed: add more debug log messages Jammy Huang
2021-11-15 7:44 ` [PATCH v4 4/9] media: aspeed: refactor to gather format/compress settings Jammy Huang
2021-11-15 7:44 ` [PATCH v4 5/9] media: v4l: Add definition for the Aspeed JPEG format Jammy Huang
2021-11-15 7:44 ` [PATCH v4 6/9] media: v4l2-ctrls: Reserve controls for ASPEED Jammy Huang
2021-11-15 7:44 ` [PATCH v4 7/9] media: aspeed: Support aspeed mode to reduce compressed data Jammy Huang
2021-11-15 8:19 ` Sakari Ailus
2021-11-16 4:15 ` Jammy Huang
2021-11-15 7:44 ` [PATCH v4 8/9] media: aspeed: add comments and macro Jammy Huang
2021-11-15 7:44 ` 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=20211115074437.28079-10-jammy_huang@aspeedtech.com \
--to=jammy_huang@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=joel@jms.id.au \
--cc=laurent.pinchart@ideasonboard.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=sakari.ailus@linux.intel.com \
/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).