From: Joe Perches <joe@perches.com>
To: Mikko Perttunen <mperttunen@nvidia.com>,
thierry.reding@gmail.com, jonathanh@nvidia.com
Cc: digetx@gmail.com, dri-devel@lists.freedesktop.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/6] gpu: host1x: Improve debug disassembly formatting
Date: Thu, 28 Sep 2017 06:29:56 -0700 [thread overview]
Message-ID: <1506605396.29089.22.camel@perches.com> (raw)
In-Reply-To: <20170928125044.32516-4-mperttunen@nvidia.com>
On Thu, 2017-09-28 at 15:50 +0300, Mikko Perttunen wrote:
> The host1x driver prints out "disassembly" dumps of the command FIFO
> and gather contents on submission timeouts. However, the output has
> been quite difficult to read with unnecessary newlines and occasional
> missing parentheses.
I think it would be cleaner/simpler to change
this by adding a line initiator with just a
KERN_<LEVEL> at the few places that actually
start a newline.
Then change the write_to_seqfile to skip any
output that starts with KERN_<LEVEL>
> diff --git a/drivers/gpu/host1x/hw/debug_hw_1x01.c b/drivers/gpu/host1x/hw/debug_hw_1x01.c
[]
> @@ -111,11 +111,11 @@ static void host1x_debug_show_channel_fifo(struct host1x *host,
> val = host1x_sync_readl(host, HOST1X_SYNC_CFPEEK_READ);
>
> if (!data_count) {
> - host1x_debug_output(o, "%08x:", val);
> + host1x_debug_output(o, "%08x: ", val);
ie: change this and the other start of lines to prepend KERN_INFO
host_x_debug_putput(o, KERN_INFO "%08x ", val);
> data_count = show_channel_command(o, val);
> } else {
> - host1x_debug_output(o, "%08x%s", val,
> - data_count > 0 ? ", " : "])\n");
And don't change all the other continuation lines
And change the write_to_ functions to
static inline void write_to_seqfile(void *ctx, const char *str, size_t len)
{
const char *output = printk_skip_level(str);
seq_write(ctx, output, len - (str - output));
}
static inline void write_to_printk(void *ctx, const char *str, size_t len)
{
const char *output = printk_skip_level(str);
if (output == str)
pr_cont("%s", str);
else
printk("s", str);
}
next prev parent reply other threads:[~2017-09-28 13:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 12:50 [PATCH v3 0/6] Miscellaneous improvements to Host1x and TegraDRM Mikko Perttunen
2017-09-28 12:50 ` [PATCH v3 1/6] gpu: host1x: Enable Tegra186 syncpoint protection Mikko Perttunen
[not found] ` <20170928125044.32516-2-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-30 2:41 ` Dmitry Osipenko
[not found] ` <8391dc88-36a1-0b3c-9ffa-42ce0238dc3f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-30 7:01 ` Mikko Perttunen
2017-10-19 12:49 ` Thierry Reding
2017-09-28 12:50 ` [PATCH v3 2/6] gpu: host1x: Enable gather filter Mikko Perttunen
2017-09-28 12:50 ` [PATCH v3 3/6] gpu: host1x: Improve debug disassembly formatting Mikko Perttunen
2017-09-28 13:29 ` Joe Perches [this message]
2017-09-28 12:50 ` [PATCH v3 4/6] gpu: host1x: Disassemble more instructions Mikko Perttunen
[not found] ` <20170928125044.32516-5-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-30 2:44 ` Dmitry Osipenko
2017-09-28 12:50 ` [PATCH v3 5/6] gpu: host1x: Fix incorrect comment for channel_request Mikko Perttunen
[not found] ` <20170928125044.32516-1-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-28 12:50 ` [PATCH v3 6/6] drm/tegra: Use u64_to_user_ptr helper Mikko Perttunen
[not found] ` <20170928125044.32516-7-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-09-30 2:44 ` Dmitry Osipenko
2017-10-19 12:00 ` [PATCH v3 0/6] Miscellaneous improvements to Host1x and TegraDRM Thierry Reding
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=1506605396.29089.22.camel@perches.com \
--to=joe@perches.com \
--cc=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=thierry.reding@gmail.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