Re: [PATCH i-g-t v2] tools: install the register definition files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 04 Sep 2015, Thomas Wood <thomas.wood@xxxxxxxxx> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Thomas Wood <thomas.wood@xxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux