igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	igt-dev@lists.freedesktop.org, Tarun Vyas <tarun.vyas@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 2/6] tools/dpcd_reg: Improve outputs
Date: Tue, 04 Sep 2018 18:04:54 -0700	[thread overview]
Message-ID: <a0246a2f9513540780e478be4e40ed3667a8e1fb.camel@intel.com> (raw)
In-Reply-To: <20180901041806.2627-2-rodrigo.vivi@intel.com>

On Fri, 2018-08-31 at 21:18 -0700, Rodrigo Vivi wrote:
> Before:
> 
> $ dpcd_reg read --device=0 --offset=0200 --count 8
> Read 8 byte(s) starting at offset 200
> 
> 41
> 0
> 0
> 0
> 80
> 0
> 66
> 66
> 
> After:
> $ dpcd_reg read --device=0 --offset=0200 --count 8
> 0200: 41 00 00 00 80 00 66 66
> 
> Besides the clean view this will allow us to integrate
> the dump and multiple reads.
> 
> Cc: Tarun Vyas <tarun.vyas@intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  tools/dpcd_reg.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/dpcd_reg.c b/tools/dpcd_reg.c
> index 39dde2c9..d139007c 100644
> --- a/tools/dpcd_reg.c
> +++ b/tools/dpcd_reg.c
> @@ -75,9 +75,10 @@ static int dpcd_read(char *device, const uint32_t
> offset, size_t count)
>  			goto out;
>  		}
>  
> -		igt_info("Read %zu byte(s) starting at offset
> %x\n\n", count, offset);
> +		igt_info("%04x:", offset);
>  		for (i = 0; i < count; i++)
> -			igt_info("%x\n", *(((uint8_t *)(buf)) + i));
> +			igt_info(" %02x", *(((uint8_t *)(buf)) + 

I am expecting igt_info() in Patch 1/6 to go way, but this looks
better. Please make it obvious that the values are in hex by prefixing
"0x". Same with the offset too.

> i));
> +		igt_info("\n");
>  	}
>  	else {
>  		igt_warn("Failed to open %s aux device - error:
> %s\n", device, strerror(errno));
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-09-05  1:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  4:18 [igt-dev] [PATCH i-g-t 1/6] tools: Add a simple tool to read/write/decode dpcd registers Rodrigo Vivi
2018-09-01  4:18 ` [igt-dev] [PATCH i-g-t 2/6] tools/dpcd_reg: Improve outputs Rodrigo Vivi
2018-09-05  1:04   ` Dhinakaran Pandiyan [this message]
2018-09-01  4:18 ` [igt-dev] [PATCH i-g-t 3/6] tools/dpcd_reg: Unify file handling Rodrigo Vivi
2018-09-05  0:56   ` Dhinakaran Pandiyan
2018-09-05 18:17     ` Rodrigo Vivi
2018-09-15  0:06       ` Tarun Vyas
2018-09-01  4:18 ` [igt-dev] [PATCH i-g-t 4/6] tools/dpcd_reg: Introduce dump as the default operation Rodrigo Vivi
2018-09-01  4:18 ` [igt-dev] [PATCH i-g-t 5/6] tools/dpcd_reg: Make --count optional Rodrigo Vivi
2018-09-05  1:12   ` Dhinakaran Pandiyan
2018-09-05 23:19     ` Rodrigo Vivi
2018-09-01  4:18 ` [igt-dev] [PATCH i-g-t 6/6] tools/dpcd_reg: Add dump all functionality Rodrigo Vivi
2018-09-06  0:26   ` Dhinakaran Pandiyan
2018-09-06  2:05     ` Rodrigo Vivi
2018-09-01  4:47 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tools: Add a simple tool to read/write/decode dpcd registers Patchwork
2018-09-01  5:40 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-09-05  0:48 ` [igt-dev] [PATCH i-g-t 1/6] " Dhinakaran Pandiyan
2018-09-15  0:04   ` Tarun Vyas

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=a0246a2f9513540780e478be4e40ed3667a8e1fb.camel@intel.com \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=tarun.vyas@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).