* [PATCH i-g-t 1/2] tools/intel_reg: Set register stride to 1 for VGA registers
@ 2015-09-09 19:56 ville.syrjala
2015-09-09 19:56 ` [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text ville.syrjala
0 siblings, 1 reply; 3+ messages in thread
From: ville.syrjala @ 2015-09-09 19:56 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
VGA registers are generally 8 bits long, so set the stride to 1 byte.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tools/intel_reg_spec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
index 6b7e30c..b49e0dc 100644
--- a/tools/intel_reg_spec.c
+++ b/tools/intel_reg_spec.c
@@ -41,12 +41,12 @@ static const struct port_desc port_descs[] = {
{
.name = "portio-vga",
.port = PORT_PORTIO_VGA,
- .stride = 4,
+ .stride = 1,
},
{
.name = "mmio-vga",
.port = PORT_MMIO_VGA,
- .stride = 4,
+ .stride = 1,
},
{
.name = "bunit",
--
2.4.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text
2015-09-09 19:56 [PATCH i-g-t 1/2] tools/intel_reg: Set register stride to 1 for VGA registers ville.syrjala
@ 2015-09-09 19:56 ` ville.syrjala
2015-09-10 10:23 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: ville.syrjala @ 2015-09-09 19:56 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tools/intel_reg.c | 2 ++
tools/intel_reg_spec.c | 9 +++++++++
tools/intel_reg_spec.h | 1 +
3 files changed, 12 insertions(+)
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index fb3461f..26f908f 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -629,6 +629,8 @@ static int intel_reg_help(struct config *config, int argc, char *argv[])
printf("\n");
printf("REGISTER is defined as:\n");
printf(" [(PORTNAME|PORTNUM|MMIO-OFFSET):](REGNAME|REGADDR)\n");
+ printf("PORTNAME is one of: ");
+ intel_reg_spec_print_ports();
printf("\n");
printf("OPTIONS common to most COMMANDS:\n");
diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
index b49e0dc..babc13c 100644
--- a/tools/intel_reg_spec.c
+++ b/tools/intel_reg_spec.c
@@ -343,3 +343,12 @@ void intel_reg_spec_free(struct reg *regs, size_t n)
}
free(regs);
}
+
+void intel_reg_spec_print_ports(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(port_descs); i++)
+ printf(" %s%c", port_descs[i].name,
+ i == ARRAY_SIZE(port_descs) - 1 ? '\n' : ',');
+}
diff --git a/tools/intel_reg_spec.h b/tools/intel_reg_spec.h
index 26e8252..dcb3143 100644
--- a/tools/intel_reg_spec.h
+++ b/tools/intel_reg_spec.h
@@ -73,5 +73,6 @@ ssize_t intel_reg_spec_file(struct reg **regs, const char *filename);
void intel_reg_spec_free(struct reg *regs, size_t n);
int intel_reg_spec_decode(char *buf, size_t bufsize, const struct reg *reg,
uint32_t val, uint32_t devid);
+void intel_reg_spec_print_ports(void);
#endif /* __INTEL_REG_SPEC_H__ */
--
2.4.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text
2015-09-09 19:56 ` [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text ville.syrjala
@ 2015-09-10 10:23 ` Jani Nikula
0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2015-09-10 10:23 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
On Wed, 09 Sep 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Both LGTM, though I'd apply this paint on the 2nd patch:
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 26f908fa5c01..e4c0fcdc109f 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -629,8 +629,11 @@ static int intel_reg_help(struct config *config, int argc, char *argv[])
printf("\n");
printf("REGISTER is defined as:\n");
printf(" [(PORTNAME|PORTNUM|MMIO-OFFSET):](REGNAME|REGADDR)\n");
- printf("PORTNAME is one of: ");
+
+ printf("\n");
+ printf("PORTNAME is one of:\n ");
intel_reg_spec_print_ports();
+ printf("\n");
printf("\n");
printf("OPTIONS common to most COMMANDS:\n");
diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
index b1eddbd1fd90..e46f4bea19b5 100644
--- a/tools/intel_reg_spec.c
+++ b/tools/intel_reg_spec.c
@@ -349,6 +349,5 @@ void intel_reg_spec_print_ports(void)
int i;
for (i = 0; i < ARRAY_SIZE(port_descs); i++)
- printf(" %s%c", port_descs[i].name,
- i == ARRAY_SIZE(port_descs) - 1 ? '\n' : ',');
+ printf("%s%s", i == 0 ? "" : ", ", port_descs[i].name);
}
BR,
Jani.
> ---
> tools/intel_reg.c | 2 ++
> tools/intel_reg_spec.c | 9 +++++++++
> tools/intel_reg_spec.h | 1 +
> 3 files changed, 12 insertions(+)
>
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index fb3461f..26f908f 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -629,6 +629,8 @@ static int intel_reg_help(struct config *config, int argc, char *argv[])
> printf("\n");
> printf("REGISTER is defined as:\n");
> printf(" [(PORTNAME|PORTNUM|MMIO-OFFSET):](REGNAME|REGADDR)\n");
> + printf("PORTNAME is one of: ");
> + intel_reg_spec_print_ports();
>
> printf("\n");
> printf("OPTIONS common to most COMMANDS:\n");
> diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
> index b49e0dc..babc13c 100644
> --- a/tools/intel_reg_spec.c
> +++ b/tools/intel_reg_spec.c
> @@ -343,3 +343,12 @@ void intel_reg_spec_free(struct reg *regs, size_t n)
> }
> free(regs);
> }
> +
> +void intel_reg_spec_print_ports(void)
> +{
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(port_descs); i++)
> + printf(" %s%c", port_descs[i].name,
> + i == ARRAY_SIZE(port_descs) - 1 ? '\n' : ',');
> +}
> diff --git a/tools/intel_reg_spec.h b/tools/intel_reg_spec.h
> index 26e8252..dcb3143 100644
> --- a/tools/intel_reg_spec.h
> +++ b/tools/intel_reg_spec.h
> @@ -73,5 +73,6 @@ ssize_t intel_reg_spec_file(struct reg **regs, const char *filename);
> void intel_reg_spec_free(struct reg *regs, size_t n);
> int intel_reg_spec_decode(char *buf, size_t bufsize, const struct reg *reg,
> uint32_t val, uint32_t devid);
> +void intel_reg_spec_print_ports(void);
>
> #endif /* __INTEL_REG_SPEC_H__ */
> --
> 2.4.6
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-10 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 19:56 [PATCH i-g-t 1/2] tools/intel_reg: Set register stride to 1 for VGA registers ville.syrjala
2015-09-09 19:56 ` [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text ville.syrjala
2015-09-10 10:23 ` Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox