From: Jani Nikula <jani.nikula@linux.intel.com>
To: Thomas Wood <thomas.wood@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2] tools: install the register definition files
Date: Mon, 07 Sep 2015 10:43:58 +0300 [thread overview]
Message-ID: <878u8iznb5.fsf@intel.com> (raw)
In-Reply-To: <1441381485-9176-1-git-send-email-thomas.wood@intel.com>
On Fri, 04 Sep 2015, Thomas Wood <thomas.wood@intel.com> wrote:
> Install the register definition files and use them by default in
> intel_reg.
>
> v2: remove redundant path check
>
> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
LGTM, though I wouldn't trust my review of autotools changes. ;)
BR,
Jani.
> ---
> configure.ac | 5 +++--
> tools/Makefile.am | 2 +-
> tools/intel_reg.c | 4 ++--
> tools/registers/Makefile.am | 3 ++-
> 4 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e4515f3..c7cb199 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -217,9 +217,10 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
>
> files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake"
> for file in $files; do
> - REGISTERS_EXTRA_DIST="$REGISTERS_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/registers/$file`"
> + REGISTER_FILES="$REGISTER_FILES $file `cat $srcdir/tools/registers/$file`"
> done
> -AC_SUBST(REGISTERS_EXTRA_DIST)
> +REGISTER_FILES=`echo $REGISTER_FILES | tr ' ' '\n' | sort -u | tr '\n' ' '`
> +AC_SUBST(REGISTER_FILES)
>
> AC_CONFIG_FILES([
> Makefile
> diff --git a/tools/Makefile.am b/tools/Makefile.am
> index 95ede58..8e454b4 100644
> --- a/tools/Makefile.am
> +++ b/tools/Makefile.am
> @@ -3,7 +3,7 @@ include Makefile.sources
> SUBDIRS = null_state_gen registers
>
> AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
> -AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS)
> +AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\"
> LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS) -lm
> AM_LDFLAGS = -Wl,--as-needed
>
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index 190aa5b..95760db 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -713,7 +713,7 @@ static int get_reg_spec_file(char *buf, size_t buflen, const char *dir,
> static int read_reg_spec(struct config *config)
> {
> char buf[PATH_MAX];
> - char *path;
> + const char *path;
> struct stat st;
> int r;
>
> @@ -722,7 +722,7 @@ static int read_reg_spec(struct config *config)
> path = getenv("INTEL_REG_SPEC");
>
> if (!path)
> - goto builtin;
> + path = PKGDATADIR"/registers";
>
> r = stat(path, &st);
> if (r) {
> diff --git a/tools/registers/Makefile.am b/tools/registers/Makefile.am
> index 4e1e3c2..14293df 100644
> --- a/tools/registers/Makefile.am
> +++ b/tools/registers/Makefile.am
> @@ -1 +1,2 @@
> -EXTRA_DIST = ${REGISTERS_EXTRA_DIST}
> +register_definitiondir = ${pkgdatadir}/registers
> +dist_register_definition_DATA = ${REGISTER_FILES}
> --
> 1.9.1
>
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-09-07 7:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 10:22 [PATCH i-g-t] tools: remove quick_dump Thomas Wood
2015-09-04 11:38 ` Ville Syrjälä
2015-09-04 11:48 ` Ville Syrjälä
2015-09-04 11:55 ` Jani Nikula
2015-09-04 11:53 ` Jani Nikula
2015-09-04 14:24 ` [PATCH i-g-t] tools: install the register definition files Thomas Wood
2015-09-04 15:44 ` [PATCH i-g-t v2] " Thomas Wood
2015-09-07 7:43 ` 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=878u8iznb5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.wood@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.