From: Jani Nikula <jani.nikula@linux.intel.com>
To: clinton.a.taylor@intel.com, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tools/intel_reg: enable quiet option for mmio
Date: Mon, 01 Aug 2016 15:47:54 +0300 [thread overview]
Message-ID: <8760rkveo5.fsf@intel.com> (raw)
In-Reply-To: <1468968215-24290-1-git-send-email-clinton.a.taylor@intel.com>
On Wed, 20 Jul 2016, clinton.a.taylor@intel.com wrote:
> From: Clint Taylor <clinton.a.taylor@intel.com>
>
> Skip decode options and formatting when the quiet option is used during
> mmio reads. Makes intel_reg usable by scripts to return MMIO values.
>
> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
> ---
> tools/intel_reg.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index 73fbd6d..e869292 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -202,7 +202,9 @@ static void dump_decode(struct config *config, struct reg *reg, uint32_t val)
>
> if (reg->port_desc.port == PORT_MMIO) {
> /* Omit port name for MMIO, optionally include MMIO offset. */
> - if (reg->mmio_offset)
> + if (config->verbosity < 0)
> + printf("0x%08x\n", val);
Please do not conflate verbosity with output format. Please add, say,
--raw or --output=raw option instead.
> + else if (reg->mmio_offset)
> printf("%24s (0x%08x:0x%08x): 0x%08x%s",
> reg->name ?: "",
> reg->mmio_offset, reg->addr,
> @@ -706,6 +708,9 @@ static int read_reg_spec(struct config *config)
> struct stat st;
> int r;
>
> + if (config->verbosity < 0)
> + goto builtin;
> +
This is just wrong. Why should *verbosity* matter in the selection of
spec file? Why should verbosity potentially *change* the interpretation
of a register name?
BR,
Jani.
> path = config->specfile;
> if (!path)
> path = getenv("INTEL_REG_SPEC");
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-08-01 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 22:43 [PATCH i-g-t] tools/intel_reg: enable quiet option for mmio clinton.a.taylor
2016-08-01 12:47 ` Jani Nikula [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=8760rkveo5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=clinton.a.taylor@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.