tools: remove quick_dump
PATCH 1/1 tools: remove quick_dump
Remove quick_dump as it has been replaced by the intel_reg tool and move the register definition files to tools/registers.
---
README | 13 ---
configure.ac | 27 +----
man/intel_reg.rst | 3 +-
tools/Makefile.am | 6 +-
tools/quick_dump/.gitignore | 2 -
tools/quick_dump/Makefile.am | 34 ------
tools/quick_dump/chipset.i | 41 --------
tools/quick_dump/chipset_macro_wrap.c | 68 ------------
tools/quick_dump/quick_dump.py | 117 ---------------------
tools/quick_dump/reg_access.py | 62 -----------
tools/registers/Makefile.am | 1 +
.../audio_config_haswell_plus.txt | 0
.../audio_debug_haswell_plus.txt | 0
tools/{quick_dump => registers}/base_interrupt.txt | 0
tools/{quick_dump => registers}/base_other.txt | 0
tools/{quick_dump => registers}/base_power.txt | 0
tools/{quick_dump => registers}/base_rings.txt | 0
tools/{quick_dump => registers}/broadwell | 0
tools/{quick_dump => registers}/cherryview | 0
.../{quick_dump => registers}/chv_display_base.txt | 0
.../{quick_dump => registers}/chv_dpio_phy_x1.txt | 0
.../{quick_dump => registers}/chv_dpio_phy_x2.txt | 0
tools/{quick_dump => registers}/chv_pipe_c.txt | 0
tools/{quick_dump => registers}/common_display.txt | 0
tools/{quick_dump => registers}/gen6_other.txt | 0
tools/{quick_dump => registers}/gen7_other.txt | 0
tools/{quick_dump => registers}/gen8_interrupt.txt | 0
tools/{quick_dump => registers}/gen8_other.txt | 0
tools/{quick_dump => registers}/haswell | 0
tools/{quick_dump => registers}/haswell_other.txt | 0
tools/{quick_dump => registers}/ivybridge | 0
tools/{quick_dump => registers}/sandybridge | 0
tools/{quick_dump => registers}/skl_display.txt | 0
tools/{quick_dump => registers}/skl_powerwells.txt | 0
tools/{quick_dump => registers}/skylake | 0
tools/{quick_dump => registers}/valleyview | 0
.../{quick_dump => registers}/vlv_display_base.txt | 0
tools/{quick_dump => registers}/vlv_dpio_phy.txt | 0
tools/{quick_dump => registers}/vlv_dsi.txt | 0
tools/{quick_dump => registers}/vlv_flisdsi.txt | 0
tools/{quick_dump => registers}/vlv_pipe_a.txt | 0
tools/{quick_dump => registers}/vlv_pipe_b.txt | 0
tools/{quick_dump => registers}/vlv_power.txt | 0
43 files changed, 6 insertions(+), 368 deletions(-)
delete mode 100644 tools/quick_dump/.gitignore
delete mode 100644 tools/quick_dump/Makefile.am
delete mode 100644 tools/quick_dump/chipset.i
delete mode 100644 tools/quick_dump/chipset_macro_wrap.c
delete mode 100755 tools/quick_dump/quick_dump.py
delete mode 100755 tools/quick_dump/reg_access.py
create mode 100644 tools/registers/Makefile.am
rename tools/{quick_dump => registers}/audio_config_haswell_plus.txt (100%)
rename tools/{quick_dump => registers}/audio_debug_haswell_plus.txt (100%)
rename tools/{quick_dump => registers}/base_interrupt.txt (100%)
rename tools/{quick_dump => registers}/base_other.txt (100%)
rename tools/{quick_dump => registers}/base_power.txt (100%)
rename tools/{quick_dump => registers}/base_rings.txt (100%)
rename tools/{quick_dump => registers}/broadwell (100%)
rename tools/{quick_dump => registers}/cherryview (100%)
rename tools/{quick_dump => registers}/chv_display_base.txt (100%)
rename tools/{quick_dump => registers}/chv_dpio_phy_x1.txt (100%)
rename tools/{quick_dump => registers}/chv_dpio_phy_x2.txt (100%)
rename tools/{quick_dump => registers}/chv_pipe_c.txt (100%)
rename tools/{quick_dump => registers}/common_display.txt (100%)
rename tools/{quick_dump => registers}/gen6_other.txt (100%)
rename tools/{quick_dump => registers}/gen7_other.txt (100%)
rename tools/{quick_dump => registers}/gen8_interrupt.txt (100%)
rename tools/{quick_dump => registers}/gen8_other.txt (100%)
rename tools/{quick_dump => registers}/haswell (100%)
rename tools/{quick_dump => registers}/haswell_other.txt (100%)
rename tools/{quick_dump => registers}/ivybridge (100%)
rename tools/{quick_dump => registers}/sandybridge (100%)
rename tools/{quick_dump => registers}/skl_display.txt (100%)
rename tools/{quick_dump => registers}/skl_powerwells.txt (100%)
rename tools/{quick_dump => registers}/skylake (100%)
rename tools/{quick_dump => registers}/valleyview (100%)
rename tools/{quick_dump => registers}/vlv_display_base.txt (100%)
rename tools/{quick_dump => registers}/vlv_dpio_phy.txt (100%)
rename tools/{quick_dump => registers}/vlv_dsi.txt (100%)
rename tools/{quick_dump => registers}/vlv_flisdsi.txt (100%)
rename tools/{quick_dump => registers}/vlv_pipe_a.txt (100%)
rename tools/{quick_dump => registers}/vlv_pipe_b.txt (100%)
rename tools/{quick_dump => registers}/vlv_power.txt (100%)README +0 -13
@@ -102,17 +102,6 @@ tools/ These tools generally must be run as root, safe for the ones that just decode dumps. -tools/quick_dump - Quick dumper is a python tool built with SWIG bindings to - important libraries exported by the rest of the tool suite. The tool - itself is quite straight forward, and should also be a useful example - for others wishing to write python based i915 tools. - - Note to package maintainers: It is not recommended to package - this directory, as the tool is not yet designed for wide usage. If the - package is installed via "make install" the users will have to set - their python library path appropriately. Use --disable-dumper - debugger/ This tool is to be used to do shader debugging. It acts like a debug server accepting connections from debug clients such as
@@ -148,9 +137,7 @@ everything (package names may vary): libcairo2-dev libdrm-dev libpciaccess-dev - libpython3.3-dev libunwind-dev python-docutils - swig2.0 x11proto-dri2-dev xutils-dev
configure.ac +3 -24
@@ -131,26 +131,6 @@ if test "x$NOUVEAU" = xyes; then fi AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) -#Configure options for the python quick-dumper -AC_ARG_ENABLE(dumper, - AS_HELP_STRING([--disable-dumper], - [Disable the python based register dumper (default: enabled)]), - [DUMPER=$enableval], [DUMPER=auto]) -if test "x$DUMPER" = xauto; then - # AX_PYTHON_DEVEL/AX_SWIG_PYTHON are not super friendly and don't - # easily allow us to introspect the result of their checks. So if we - # find SWING on the system, that's enough to try compiling the dumper. - AX_PKG_SWIG(2.0.0, [DUMPER=yes], [DUMPER=no]) -fi -if test "x$DUMPER" = xyes; then - AC_DEFINE(HAVE_DUMPER, 1, [Have dumper support]) - # SWIG configuration - AX_PKG_SWIG(2.0.0, [], [ AC_MSG_ERROR([SWIG 2.0.0 or higher is required to build..]) ]) - AX_PYTHON_DEVEL([>= '3.0']) - AX_SWIG_PYTHON -fi -AM_CONDITIONAL(HAVE_DUMPER, [test "x$DUMPER" = xyes]) - # Define a configure option for the shader debugger AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], [Enable shader debugging support [autodetected]]),
@@ -237,9 +217,9 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform]) files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake" for file in $files; do - QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/quick_dump/$file`" + REGISTERS_EXTRA_DIST="$REGISTERS_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/registers/$file`" done -AC_SUBST(QUICK_DUMP_EXTRA_DIST) +AC_SUBST(REGISTERS_EXTRA_DIST) AC_CONFIG_FILES([ Makefile
@@ -255,8 +235,8 @@ AC_CONFIG_FILES([ scripts/Makefile tests/Makefile tools/Makefile - tools/quick_dump/Makefile tools/null_state_gen/Makefile + tools/registers/Makefile debugger/Makefile debugger/system_routine/Makefile assembler/Makefile
@@ -284,7 +264,6 @@ echo "" echo " • Tools:" echo " Assembler : ${enable_assembler}" echo " Debugger : ${enable_debugger}" -echo " Python dumper : ${DUMPER}" echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}" echo "" echo " • API-Documentation : ${enable_gtk_doc}"
man/intel_reg.rst +1 -2
@@ -197,8 +197,7 @@ variable, the directory is scanned for a spec file in this order: Register Spec File Format ------------------------- -The register spec format is compatible with the quick_dump.py format, briefly -described below: +The register spec format is briefly described below: * Empty lines and lines beginning with "#", ";", or "//" are ignored.
tools/Makefile.am +1 -5
@@ -1,10 +1,6 @@ include Makefile.sources -SUBDIRS = null_state_gen - -if HAVE_DUMPER -SUBDIRS += quick_dump -endif +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)
tools/quick_dump/.gitignore deleted +0 -2
@@ -1,2 +0,0 @@ -chipset_wrap_python.c -chipset.py
tools/quick_dump/Makefile.am deleted +0 -34
@@ -1,34 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib $(PYTHON_CPPFLAGS) $(DRM_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir) - -dist_bin_SCRIPTS = quick_dump.py reg_access.py -bin_SCRIPTS = chipset.py - -lib_LTLIBRARIES = I915ChipsetPython.la -I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) \ - -Wl,--no-undefined -I915ChipsetPython_la_SOURCES = chipset_macro_wrap.c -nodist_I915ChipsetPython_la_SOURCES = chipset_wrap_python.c -I915ChipsetPython_la_LIBADD = \ - $(top_builddir)/lib/libintel_tools.la \ - $(PCIACCESS_LIBS) \ - $(DRM_LIBS) \ - $(CAIRO_LIBS) \ - $(LIBUNWIND_LIBS) \ - -lrt \ - -lm \ - $(NULL) - -chipset.py: chipset_wrap_python.c - -chipset_wrap_python.c: chipset.i - $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $< - -all-local: I915ChipsetPython.la - $(LN_S) -f .libs/I915ChipsetPython.so _chipset.so - -CLEANFILES = chipset_wrap_python.c chipset.py _chipset.so -EXTRA_DIST = $(QUICK_DUMP_EXTRA_DIST) \ - base_interrupt.txt base_other.txt base_power.txt base_rings.txt \ - quick_dump.py \ - reg_access.py \ - chipset.i
tools/quick_dump/chipset.i deleted +0 -41
41 lines not on this page · raw message
tools/quick_dump/chipset_macro_wrap.c deleted +0 -68
68 lines not on this page · raw message
tools/quick_dump/quick_dump.py deleted +0 -117
117 lines not on this page · raw message
tools/quick_dump/reg_access.py deleted +0 -62
62 lines not on this page · raw message
tools/registers/Makefile.am new file +1 -0
@@ -0,0 +1 @@ +EXTRA_DIST = ${REGISTERS_EXTRA_DIST}
tools/registers/audio_config_haswell_plus.txt renamed from tools/quick_dump/audio_config_haswell_plus.txt +0 -0
tools/registers/audio_debug_haswell_plus.txt renamed from tools/quick_dump/audio_debug_haswell_plus.txt +0 -0
tools/registers/base_interrupt.txt renamed from tools/quick_dump/base_interrupt.txt +0 -0
tools/registers/base_other.txt renamed from tools/quick_dump/base_other.txt +0 -0
tools/registers/base_power.txt renamed from tools/quick_dump/base_power.txt +0 -0
tools/registers/base_rings.txt renamed from tools/quick_dump/base_rings.txt +0 -0
tools/registers/broadwell renamed from tools/quick_dump/broadwell +0 -0
tools/registers/cherryview renamed from tools/quick_dump/cherryview +0 -0
tools/registers/chv_display_base.txt renamed from tools/quick_dump/chv_display_base.txt +0 -0
tools/registers/chv_dpio_phy_x1.txt renamed from tools/quick_dump/chv_dpio_phy_x1.txt +0 -0
tools/registers/chv_dpio_phy_x2.txt renamed from tools/quick_dump/chv_dpio_phy_x2.txt +0 -0
tools/registers/chv_pipe_c.txt renamed from tools/quick_dump/chv_pipe_c.txt +0 -0
tools/registers/common_display.txt renamed from tools/quick_dump/common_display.txt +0 -0
tools/registers/gen6_other.txt renamed from tools/quick_dump/gen6_other.txt +0 -0
tools/registers/gen7_other.txt renamed from tools/quick_dump/gen7_other.txt +0 -0
tools/registers/gen8_interrupt.txt renamed from tools/quick_dump/gen8_interrupt.txt +0 -0
tools/registers/gen8_other.txt renamed from tools/quick_dump/gen8_other.txt +0 -0
tools/registers/haswell renamed from tools/quick_dump/haswell +0 -0
tools/registers/haswell_other.txt renamed from tools/quick_dump/haswell_other.txt +0 -0
tools/registers/ivybridge renamed from tools/quick_dump/ivybridge +0 -0
tools/registers/sandybridge renamed from tools/quick_dump/sandybridge +0 -0
tools/registers/skl_display.txt renamed from tools/quick_dump/skl_display.txt +0 -0
tools/registers/skl_powerwells.txt renamed from tools/quick_dump/skl_powerwells.txt +0 -0
tools/registers/skylake renamed from tools/quick_dump/skylake +0 -0
tools/registers/valleyview renamed from tools/quick_dump/valleyview +0 -0
tools/registers/vlv_display_base.txt renamed from tools/quick_dump/vlv_display_base.txt +0 -0
tools/registers/vlv_dpio_phy.txt renamed from tools/quick_dump/vlv_dpio_phy.txt +0 -0
tools/registers/vlv_dsi.txt renamed from tools/quick_dump/vlv_dsi.txt +0 -0
tools/registers/vlv_flisdsi.txt renamed from tools/quick_dump/vlv_flisdsi.txt +0 -0
tools/registers/vlv_pipe_a.txt renamed from tools/quick_dump/vlv_pipe_a.txt +0 -0
tools/registers/vlv_pipe_b.txt renamed from tools/quick_dump/vlv_pipe_b.txt +0 -0
tools/registers/vlv_power.txt renamed from tools/quick_dump/vlv_power.txt +0 -0
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
NAKQuoted 4 lines · Thomas Wood
Remove
quick_dumpas it has been replaced by theintel_regtool and move the register definition files totools/registers.Signed-off-by Thomas Wood <[email protected]>
NAK
It's the only tool that works on VLV/CHV reasonably.
Quoted 710 lines
--- README | 13 --- configure.ac | 27 +---- man/intel_reg.rst | 3 +- tools/Makefile.am | 6 +- tools/quick_dump/.gitignore | 2 - tools/quick_dump/Makefile.am | 34 ------ tools/quick_dump/chipset.i | 41 -------- tools/quick_dump/chipset_macro_wrap.c | 68 ------------ tools/quick_dump/quick_dump.py | 117 --------------------- tools/quick_dump/reg_access.py | 62 ----------- tools/registers/Makefile.am | 1 + .../audio_config_haswell_plus.txt | 0 .../audio_debug_haswell_plus.txt | 0 tools/{quick_dump => registers}/base_interrupt.txt | 0 tools/{quick_dump => registers}/base_other.txt | 0 tools/{quick_dump => registers}/base_power.txt | 0 tools/{quick_dump => registers}/base_rings.txt | 0 tools/{quick_dump => registers}/broadwell | 0 tools/{quick_dump => registers}/cherryview | 0 .../{quick_dump => registers}/chv_display_base.txt | 0 .../{quick_dump => registers}/chv_dpio_phy_x1.txt | 0 .../{quick_dump => registers}/chv_dpio_phy_x2.txt | 0 tools/{quick_dump => registers}/chv_pipe_c.txt | 0 tools/{quick_dump => registers}/common_display.txt | 0 tools/{quick_dump => registers}/gen6_other.txt | 0 tools/{quick_dump => registers}/gen7_other.txt | 0 tools/{quick_dump => registers}/gen8_interrupt.txt | 0 tools/{quick_dump => registers}/gen8_other.txt | 0 tools/{quick_dump => registers}/haswell | 0 tools/{quick_dump => registers}/haswell_other.txt | 0 tools/{quick_dump => registers}/ivybridge | 0 tools/{quick_dump => registers}/sandybridge | 0 tools/{quick_dump => registers}/skl_display.txt | 0 tools/{quick_dump => registers}/skl_powerwells.txt | 0 tools/{quick_dump => registers}/skylake | 0 tools/{quick_dump => registers}/valleyview | 0 .../{quick_dump => registers}/vlv_display_base.txt | 0 tools/{quick_dump => registers}/vlv_dpio_phy.txt | 0 tools/{quick_dump => registers}/vlv_dsi.txt | 0 tools/{quick_dump => registers}/vlv_flisdsi.txt | 0 tools/{quick_dump => registers}/vlv_pipe_a.txt | 0 tools/{quick_dump => registers}/vlv_pipe_b.txt | 0 tools/{quick_dump => registers}/vlv_power.txt | 0 43 files changed, 6 insertions(+), 368 deletions(-) delete mode 100644 tools/quick_dump/.gitignore delete mode 100644 tools/quick_dump/Makefile.am delete mode 100644 tools/quick_dump/chipset.i delete mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100755 tools/quick_dump/quick_dump.py delete mode 100755 tools/quick_dump/reg_access.py create mode 100644 tools/registers/Makefile.am rename tools/{quick_dump => registers}/audio_config_haswell_plus.txt (100%) rename tools/{quick_dump => registers}/audio_debug_haswell_plus.txt (100%) rename tools/{quick_dump => registers}/base_interrupt.txt (100%) rename tools/{quick_dump => registers}/base_other.txt (100%) rename tools/{quick_dump => registers}/base_power.txt (100%) rename tools/{quick_dump => registers}/base_rings.txt (100%) rename tools/{quick_dump => registers}/broadwell (100%) rename tools/{quick_dump => registers}/cherryview (100%) rename tools/{quick_dump => registers}/chv_display_base.txt (100%) rename tools/{quick_dump => registers}/chv_dpio_phy_x1.txt (100%) rename tools/{quick_dump => registers}/chv_dpio_phy_x2.txt (100%) rename tools/{quick_dump => registers}/chv_pipe_c.txt (100%) rename tools/{quick_dump => registers}/common_display.txt (100%) rename tools/{quick_dump => registers}/gen6_other.txt (100%) rename tools/{quick_dump => registers}/gen7_other.txt (100%) rename tools/{quick_dump => registers}/gen8_interrupt.txt (100%) rename tools/{quick_dump => registers}/gen8_other.txt (100%) rename tools/{quick_dump => registers}/haswell (100%) rename tools/{quick_dump => registers}/haswell_other.txt (100%) rename tools/{quick_dump => registers}/ivybridge (100%) rename tools/{quick_dump => registers}/sandybridge (100%) rename tools/{quick_dump => registers}/skl_display.txt (100%) rename tools/{quick_dump => registers}/skl_powerwells.txt (100%) rename tools/{quick_dump => registers}/skylake (100%) rename tools/{quick_dump => registers}/valleyview (100%) rename tools/{quick_dump => registers}/vlv_display_base.txt (100%) rename tools/{quick_dump => registers}/vlv_dpio_phy.txt (100%) rename tools/{quick_dump => registers}/vlv_dsi.txt (100%) rename tools/{quick_dump => registers}/vlv_flisdsi.txt (100%) rename tools/{quick_dump => registers}/vlv_pipe_a.txt (100%) rename tools/{quick_dump => registers}/vlv_pipe_b.txt (100%) rename tools/{quick_dump => registers}/vlv_power.txt (100%)README +0
-13@@ -102,17 +102,6 @@ tools/ These tools generally must be run as root, safe for the ones that just decode dumps. -tools/quick_dump - Quick dumper is a python tool built with SWIG bindings to - important libraries exported by the rest of the tool suite. The tool - itself is quite straight forward, and should also be a useful example - for others wishing to write python based i915 tools. - - Note to package maintainers: It is not recommended to package - this directory, as the tool is not yet designed for wide usage. If the - package is installed via "make install" the users will have to set - their python library path appropriately. Use --disable-dumper - debugger/ This tool is to be used to do shader debugging. It acts like a debug server accepting connections from debug clients such as@@ -148,9 +137,7 @@ everything (package names may vary): libcairo2-dev libdrm-dev libpciaccess-dev - libpython3.3-dev libunwind-dev python-docutils - swig2.0 x11proto-dri2-dev xutils-devconfigure.ac +3
-24@@ -131,26 +131,6 @@ if test "x$NOUVEAU" = xyes; then fi AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) -#Configure options for the python quick-dumper -AC_ARG_ENABLE(dumper, - AS_HELP_STRING([--disable-dumper], - [Disable the python based register dumper (default: enabled)]), - [DUMPER=$enableval], [DUMPER=auto]) -if test "x$DUMPER" = xauto; then - # AX_PYTHON_DEVEL/AX_SWIG_PYTHON are not super friendly and don't - # easily allow us to introspect the result of their checks. So if we - # find SWING on the system, that's enough to try compiling the dumper. - AX_PKG_SWIG(2.0.0, [DUMPER=yes], [DUMPER=no]) -fi -if test "x$DUMPER" = xyes; then - AC_DEFINE(HAVE_DUMPER, 1, [Have dumper support]) - # SWIG configuration - AX_PKG_SWIG(2.0.0, [], [ AC_MSG_ERROR([SWIG 2.0.0 or higher is required to build..]) ]) - AX_PYTHON_DEVEL([>= '3.0']) - AX_SWIG_PYTHON -fi -AM_CONDITIONAL(HAVE_DUMPER, [test "x$DUMPER" = xyes]) - # Define a configure option for the shader debugger AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], [Enable shader debugging support [autodetected]]),@@ -237,9 +217,9 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform]) files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake" for file in $files; do - QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/quick_dump/$file`" + REGISTERS_EXTRA_DIST="$REGISTERS_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/registers/$file`" done -AC_SUBST(QUICK_DUMP_EXTRA_DIST) +AC_SUBST(REGISTERS_EXTRA_DIST) AC_CONFIG_FILES([ Makefile@@ -255,8 +235,8 @@ AC_CONFIG_FILES([ scripts/Makefile tests/Makefile tools/Makefile - tools/quick_dump/Makefile tools/null_state_gen/Makefile + tools/registers/Makefile debugger/Makefile debugger/system_routine/Makefile assembler/Makefile@@ -284,7 +264,6 @@ echo "" echo " • Tools:" echo " Assembler : ${enable_assembler}" echo " Debugger : ${enable_debugger}" -echo " Python dumper : ${DUMPER}" echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}" echo "" echo " • API-Documentation : ${enable_gtk_doc}"man/intel_reg.rst +1
-2@@ -197,8 +197,7 @@ variable, the directory is scanned for a spec file in this order: Register Spec File Format ------------------------- -The register spec format is compatible with the quick_dump.py format, briefly -described below: +The register spec format is briefly described below: * Empty lines and lines beginning with "#", ";", or "//" are ignored.tools/Makefile.am +1
-5@@ -1,10 +1,6 @@ include Makefile.sources -SUBDIRS = null_state_gen - -if HAVE_DUMPER -SUBDIRS += quick_dump -endif +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)tools/quick_dump/.gitignore deleted +0
-2@@ -1,2 +0,0 @@ -chipset_wrap_python.c -chipset.pytools/quick_dump/Makefile.am deleted +0
-34@@ -1,34 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib $(PYTHON_CPPFLAGS) $(DRM_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir) - -dist_bin_SCRIPTS = quick_dump.py reg_access.py -bin_SCRIPTS = chipset.py - -lib_LTLIBRARIES = I915ChipsetPython.la -I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) \ - -Wl,--no-undefined -I915ChipsetPython_la_SOURCES = chipset_macro_wrap.c -nodist_I915ChipsetPython_la_SOURCES = chipset_wrap_python.c -I915ChipsetPython_la_LIBADD = \ - $(top_builddir)/lib/libintel_tools.la \ - $(PCIACCESS_LIBS) \ - $(DRM_LIBS) \ - $(CAIRO_LIBS) \ - $(LIBUNWIND_LIBS) \ - -lrt \ - -lm \ - $(NULL) - -chipset.py: chipset_wrap_python.c - -chipset_wrap_python.c: chipset.i - $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $< - -all-local: I915ChipsetPython.la - $(LN_S) -f .libs/I915ChipsetPython.so _chipset.so - -CLEANFILES = chipset_wrap_python.c chipset.py _chipset.so -EXTRA_DIST = $(QUICK_DUMP_EXTRA_DIST) \ - base_interrupt.txt base_other.txt base_power.txt base_rings.txt \ - quick_dump.py \ - reg_access.py \ - chipset.itools/quick_dump/chipset.i deleted +0
-41@@ -1,41 +0,0 @@ -%module chipset -%include "stdint.i" -%{ -#include <pciaccess.h> -#include <stdint.h> -#include "intel_chipset.h" -#include "intel_io.h" -extern int is_sandybridge(unsigned short pciid); -extern int is_ivybridge(unsigned short pciid); -extern int is_valleyview(unsigned short pciid); -extern int is_cherryview(unsigned short pciid); -extern int is_haswell(unsigned short pciid); -extern int is_broadwell(unsigned short pciid); -extern int is_skylake(unsigned short pciid); -extern struct pci_device *intel_get_pci_device(); -extern int intel_register_access_init(struct pci_device *pci_dev, int safe); -extern uint32_t intel_register_read(uint32_t reg); -extern void intel_register_write(uint32_t reg, uint32_t val); -extern void intel_register_access_fini(); -extern int intel_register_access_needs_fakewake(); -extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); -extern uint32_t intel_dpio_reg_read(uint32_t reg, int phy); -extern uint32_t intel_flisdsi_reg_read(uint32_t reg); -%} - -extern int is_sandybridge(unsigned short pciid); -extern int is_ivybridge(unsigned short pciid); -extern int is_valleyview(unsigned short pciid); -extern int is_cherryview(unsigned short pciid); -extern int is_haswell(unsigned short pciid); -extern int is_broadwell(unsigned short pciid); -extern int is_skylake(unsigned short pciid); -extern struct pci_device *intel_get_pci_device(); -extern int intel_register_access_init(struct pci_device *pci_dev, int safe); -extern uint32_t intel_register_read(uint32_t reg); -extern void intel_register_write(uint32_t reg, uint32_t val); -extern void intel_register_access_fini(); -extern int intel_register_access_needs_fakewake(); -extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); -extern uint32_t intel_dpio_reg_read(uint32_t reg, int phy); -extern uint32_t intel_flisdsi_reg_read(uint32_t reg);tools/quick_dump/chipset_macro_wrap.c deleted +0
-68@@ -1,68 +0,0 @@ -/* -* Copyright © 2014 Intel Corporation -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -* DEALINGS IN THE SOFTWARE. -*/ - -#include <stdbool.h> -#include <stdlib.h> -#include <pciaccess.h> -#include "intel_chipset.h" - -int is_sandybridge (unsigned short pciid) -{ -return IS_GEN6 (pciid); -} - -int is_ivybridge (unsigned short pciid) -{ -return IS_IVYBRIDGE (pciid); -} - -int is_valleyview (unsigned short pciid) -{ -return IS_VALLEYVIEW (pciid); -} - -int is_cherryview (unsigned short pciid) -{ -return IS_CHERRYVIEW (pciid); -} - -int is_haswell (unsigned short pciid) -{ -return IS_HASWELL (pciid); -} - -int is_broadwell (unsigned short pciid) -{ -return IS_BROADWELL (pciid); -} - -int is_skylake (unsigned short pciid) -{ -return IS_SKYLAKE (pciid); -} - -/* Simple helper because I couldn't make this work in the script */ -unsigned short pcidev_to_devid (struct pci_device *pdev) -{ -return pdev->device_id; -}tools/quick_dump/quick_dump.py deleted +0
-117@@ -1,117 +0,0 @@ -#!/usr/bin/env python3 - -# register definition format: -# ('register name', 'register offset', 'register type') -# -# register types: -# '' - normal register -# 'DPIO' - DPIO register -# -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 - -import argparse -import os -import sys -import ast -import subprocess -import chipset -import reg_access as reg - -# Ignore lines which are considered comments -def ignore_line(line): - if not line.strip(): - return True - if len(line) > 1: - if line[1] == '/' and line[0] == '/': - return True - if len(line) > 0: - if line[0] == '#' or line[0] == ';': - return True - return False - -def parse_file(file): - print('{0:^10s} | {1:^33s} | {2:^10s}'. format('offset', file.name, 'value')) - print('-' * 59) - for line in file: - if ignore_line(line): - continue - register = ast.literal_eval(line) - intreg = int(register[1], 16) - if register[2] == 'FLISDSI': - val = reg.flisdsi_read(intreg) - elif register[2] == 'DPIO': - val = reg.dpio_read(intreg, 0) - elif register[2] == 'DPIO2': - val = reg.dpio_read(intreg, 1) - else: - if register[2] != '': - intreg = intreg + int(register[2], 16) - val = reg.read(intreg) - print('{0:#010x} | {1:<33} | {2:#010x}'.format(intreg, register[0], val)) - print('') - -def walk_base_files(): - for root, dirs, files in os.walk('.'): - for name in files: - if name.startswith(("base_")): - file = open(name.rstrip(), 'r') - parse_file(file) - -def autodetect_chipset(): - pci_dev = chipset.intel_get_pci_device() - devid = chipset.pcidev_to_devid(pci_dev) - if chipset.is_sandybridge(devid): - return open('sandybridge', 'r') - elif chipset.is_ivybridge(devid): - return open('ivybridge', 'r') - elif chipset.is_cherryview(devid): - return open('cherryview', 'r') - elif chipset.is_valleyview(devid): - return open('valleyview', 'r') - elif chipset.is_haswell(devid): - return open('haswell', 'r') - elif chipset.is_broadwell(devid): - return open('broadwell', 'r') - elif chipset.is_skylake(devid): - return open('skylake', 'r') - else: - print("Autodetect of devid " + hex(devid) + " failed") - return None - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Dumb register dumper.') - parser.add_argument('-b', '--baseless', - action='store_true', default=False, - help='baseless mode, ignore files starting with base_') - parser.add_argument('-f', '--file', - type=argparse.FileType('r'), default=None) - parser.add_argument('profile', nargs='?', - type=argparse.FileType('r'), default=None) - - args = parser.parse_args() - - if reg.init() == False: - print("Register initialization failed") - sys.exit() - - # Put us where the script is - os.chdir(os.path.dirname(sys.argv[0])) - - # specifying a file trumps all other things - if args.file != None: - parse_file(args.file) - sys.exit() - - #parse anything named base_ these are assumed to apply for all gens. - if args.baseless == False: - walk_base_files() - - if args.profile == None: - args.profile = autodetect_chipset() - - if args.profile == None: - sys.exit() - - for extra in args.profile: - extra_file = open(extra.rstrip(), 'r') - parse_file(extra_file)tools/quick_dump/reg_access.py deleted +0
-62@@ -1,62 +0,0 @@ -#!/usr/bin/env python3 -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 -import chipset - -def read(reg): - val = chipset.intel_register_read(reg) - return val - -def write(reg, val): - chipset.intel_register_write(reg, val) - -def gen6_forcewake_get(): - write(0xa18c, 0x1) - read(0xa180) - -def mt_forcewake_get(): - write(0xa188, 0x10001) - read(0xa180) - -def vlv_forcewake_get(): - write(0x1300b0, 0x10001) - read(0x1300b4) - -# don't be clever, just try all possibilities -def get_wake(): - gen6_forcewake_get() - mt_forcewake_get() - vlv_forcewake_get() - -def dpio_read(reg, phy): - phy = int(phy) - - val = chipset.intel_dpio_reg_read(reg, phy) - return val - -def flisdsi_read(reg): - val = chipset.intel_flisdsi_reg_read(reg) - return val - - -def init(): - pci_dev = chipset.intel_get_pci_device() - ret = chipset.intel_register_access_init(pci_dev, 0) - if ret != 0: - print("Register access init failed"); - return False - - if chipset.intel_register_access_needs_fakewake(): - print("Forcing forcewake. Don't expect your system to work after this.") - get_wake() - - return True - -if __name__ == "__main__": - import sys - - if init() == False: - sys.exit() - - reg = sys.argv[1] - print(hex(read(int(reg,16)))) - chipset.intel_register_access_fini()tools/registers/Makefile.am new file +1
-0@@ -0,0 +1 @@ +EXTRA_DIST = ${REGISTERS_EXTRA_DIST}tools/registers/audio_config_haswell_plus.txt renamed from tools/quick_dump/audio_config_haswell_plus.txt +0
-0tools/registers/audio_debug_haswell_plus.txt renamed from tools/quick_dump/audio_debug_haswell_plus.txt +0
-0tools/registers/base_interrupt.txt renamed from tools/quick_dump/base_interrupt.txt +0
-0tools/registers/base_other.txt renamed from tools/quick_dump/base_other.txt +0
-0tools/registers/base_power.txt renamed from tools/quick_dump/base_power.txt +0
-0tools/registers/base_rings.txt renamed from tools/quick_dump/base_rings.txt +0
-0tools/registers/broadwell renamed from tools/quick_dump/broadwell +0
-0tools/registers/cherryview renamed from tools/quick_dump/cherryview +0
-0tools/registers/chv_display_base.txt renamed from tools/quick_dump/chv_display_base.txt +0
-0tools/registers/chv_dpio_phy_x1.txt renamed from tools/quick_dump/chv_dpio_phy_x1.txt +0
-0tools/registers/chv_dpio_phy_x2.txt renamed from tools/quick_dump/chv_dpio_phy_x2.txt +0
-0tools/registers/chv_pipe_c.txt renamed from tools/quick_dump/chv_pipe_c.txt +0
-0tools/registers/common_display.txt renamed from tools/quick_dump/common_display.txt +0
-0tools/registers/gen6_other.txt renamed from tools/quick_dump/gen6_other.txt +0
-0tools/registers/gen7_other.txt renamed from tools/quick_dump/gen7_other.txt +0
-0tools/registers/gen8_interrupt.txt renamed from tools/quick_dump/gen8_interrupt.txt +0
-0tools/registers/gen8_other.txt renamed from tools/quick_dump/gen8_other.txt +0
-0tools/registers/haswell renamed from tools/quick_dump/haswell +0
-0tools/registers/haswell_other.txt renamed from tools/quick_dump/haswell_other.txt +0
-0tools/registers/ivybridge renamed from tools/quick_dump/ivybridge +0
-0tools/registers/sandybridge renamed from tools/quick_dump/sandybridge +0
-0tools/registers/skl_display.txt renamed from tools/quick_dump/skl_display.txt +0
-0tools/registers/skl_powerwells.txt renamed from tools/quick_dump/skl_powerwells.txt +0
-0tools/registers/skylake renamed from tools/quick_dump/skylake +0
-0tools/registers/valleyview renamed from tools/quick_dump/valleyview +0
-0tools/registers/vlv_display_base.txt renamed from tools/quick_dump/vlv_display_base.txt +0
-0tools/registers/vlv_dpio_phy.txt renamed from tools/quick_dump/vlv_dpio_phy.txt +0
-0tools/registers/vlv_dsi.txt renamed from tools/quick_dump/vlv_dsi.txt +0
-0tools/registers/vlv_flisdsi.txt renamed from tools/quick_dump/vlv_flisdsi.txt +0
-0tools/registers/vlv_pipe_a.txt renamed from tools/quick_dump/vlv_pipe_a.txt +0
-0tools/registers/vlv_pipe_b.txt renamed from tools/quick_dump/vlv_pipe_b.txt +0
-0tools/registers/vlv_power.txt renamed from tools/quick_dump/vlv_power.txt +0
-0Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Ville Syrjälä
Quoted 4 lines · Thomas Wood
Remove
quick_dumpas it has been replaced by theintel_regtool and move the register definition files totools/registers.Signed-off-by Thomas Wood <[email protected]>NAK
It's the only tool that works on VLV/CHV reasonably.
OK, I take it back.
intel_reg dump --spec=... works fine, and the patch doens't kill the reg list files.
Quoted 719 lines
Quoted 711 lines
--- README | 13 --- configure.ac | 27 +---- man/intel_reg.rst | 3 +- tools/Makefile.am | 6 +- tools/quick_dump/.gitignore | 2 - tools/quick_dump/Makefile.am | 34 ------ tools/quick_dump/chipset.i | 41 -------- tools/quick_dump/chipset_macro_wrap.c | 68 ------------ tools/quick_dump/quick_dump.py | 117 --------------------- tools/quick_dump/reg_access.py | 62 ----------- tools/registers/Makefile.am | 1 + .../audio_config_haswell_plus.txt | 0 .../audio_debug_haswell_plus.txt | 0 tools/{quick_dump => registers}/base_interrupt.txt | 0 tools/{quick_dump => registers}/base_other.txt | 0 tools/{quick_dump => registers}/base_power.txt | 0 tools/{quick_dump => registers}/base_rings.txt | 0 tools/{quick_dump => registers}/broadwell | 0 tools/{quick_dump => registers}/cherryview | 0 .../{quick_dump => registers}/chv_display_base.txt | 0 .../{quick_dump => registers}/chv_dpio_phy_x1.txt | 0 .../{quick_dump => registers}/chv_dpio_phy_x2.txt | 0 tools/{quick_dump => registers}/chv_pipe_c.txt | 0 tools/{quick_dump => registers}/common_display.txt | 0 tools/{quick_dump => registers}/gen6_other.txt | 0 tools/{quick_dump => registers}/gen7_other.txt | 0 tools/{quick_dump => registers}/gen8_interrupt.txt | 0 tools/{quick_dump => registers}/gen8_other.txt | 0 tools/{quick_dump => registers}/haswell | 0 tools/{quick_dump => registers}/haswell_other.txt | 0 tools/{quick_dump => registers}/ivybridge | 0 tools/{quick_dump => registers}/sandybridge | 0 tools/{quick_dump => registers}/skl_display.txt | 0 tools/{quick_dump => registers}/skl_powerwells.txt | 0 tools/{quick_dump => registers}/skylake | 0 tools/{quick_dump => registers}/valleyview | 0 .../{quick_dump => registers}/vlv_display_base.txt | 0 tools/{quick_dump => registers}/vlv_dpio_phy.txt | 0 tools/{quick_dump => registers}/vlv_dsi.txt | 0 tools/{quick_dump => registers}/vlv_flisdsi.txt | 0 tools/{quick_dump => registers}/vlv_pipe_a.txt | 0 tools/{quick_dump => registers}/vlv_pipe_b.txt | 0 tools/{quick_dump => registers}/vlv_power.txt | 0 43 files changed, 6 insertions(+), 368 deletions(-) delete mode 100644 tools/quick_dump/.gitignore delete mode 100644 tools/quick_dump/Makefile.am delete mode 100644 tools/quick_dump/chipset.i delete mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100755 tools/quick_dump/quick_dump.py delete mode 100755 tools/quick_dump/reg_access.py create mode 100644 tools/registers/Makefile.am rename tools/{quick_dump => registers}/audio_config_haswell_plus.txt (100%) rename tools/{quick_dump => registers}/audio_debug_haswell_plus.txt (100%) rename tools/{quick_dump => registers}/base_interrupt.txt (100%) rename tools/{quick_dump => registers}/base_other.txt (100%) rename tools/{quick_dump => registers}/base_power.txt (100%) rename tools/{quick_dump => registers}/base_rings.txt (100%) rename tools/{quick_dump => registers}/broadwell (100%) rename tools/{quick_dump => registers}/cherryview (100%) rename tools/{quick_dump => registers}/chv_display_base.txt (100%) rename tools/{quick_dump => registers}/chv_dpio_phy_x1.txt (100%) rename tools/{quick_dump => registers}/chv_dpio_phy_x2.txt (100%) rename tools/{quick_dump => registers}/chv_pipe_c.txt (100%) rename tools/{quick_dump => registers}/common_display.txt (100%) rename tools/{quick_dump => registers}/gen6_other.txt (100%) rename tools/{quick_dump => registers}/gen7_other.txt (100%) rename tools/{quick_dump => registers}/gen8_interrupt.txt (100%) rename tools/{quick_dump => registers}/gen8_other.txt (100%) rename tools/{quick_dump => registers}/haswell (100%) rename tools/{quick_dump => registers}/haswell_other.txt (100%) rename tools/{quick_dump => registers}/ivybridge (100%) rename tools/{quick_dump => registers}/sandybridge (100%) rename tools/{quick_dump => registers}/skl_display.txt (100%) rename tools/{quick_dump => registers}/skl_powerwells.txt (100%) rename tools/{quick_dump => registers}/skylake (100%) rename tools/{quick_dump => registers}/valleyview (100%) rename tools/{quick_dump => registers}/vlv_display_base.txt (100%) rename tools/{quick_dump => registers}/vlv_dpio_phy.txt (100%) rename tools/{quick_dump => registers}/vlv_dsi.txt (100%) rename tools/{quick_dump => registers}/vlv_flisdsi.txt (100%) rename tools/{quick_dump => registers}/vlv_pipe_a.txt (100%) rename tools/{quick_dump => registers}/vlv_pipe_b.txt (100%) rename tools/{quick_dump => registers}/vlv_power.txt (100%)README +0
-13@@ -102,17 +102,6 @@ tools/ These tools generally must be run as root, safe for the ones that just decode dumps. -tools/quick_dump - Quick dumper is a python tool built with SWIG bindings to - important libraries exported by the rest of the tool suite. The tool - itself is quite straight forward, and should also be a useful example - for others wishing to write python based i915 tools. - - Note to package maintainers: It is not recommended to package - this directory, as the tool is not yet designed for wide usage. If the - package is installed via "make install" the users will have to set - their python library path appropriately. Use --disable-dumper - debugger/ This tool is to be used to do shader debugging. It acts like a debug server accepting connections from debug clients such as@@ -148,9 +137,7 @@ everything (package names may vary): libcairo2-dev libdrm-dev libpciaccess-dev - libpython3.3-dev libunwind-dev python-docutils - swig2.0 x11proto-dri2-dev xutils-devconfigure.ac +3
-24@@ -131,26 +131,6 @@ if test "x$NOUVEAU" = xyes; then fi AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) -#Configure options for the python quick-dumper -AC_ARG_ENABLE(dumper, - AS_HELP_STRING([--disable-dumper], - [Disable the python based register dumper (default: enabled)]), - [DUMPER=$enableval], [DUMPER=auto]) -if test "x$DUMPER" = xauto; then - # AX_PYTHON_DEVEL/AX_SWIG_PYTHON are not super friendly and don't - # easily allow us to introspect the result of their checks. So if we - # find SWING on the system, that's enough to try compiling the dumper. - AX_PKG_SWIG(2.0.0, [DUMPER=yes], [DUMPER=no]) -fi -if test "x$DUMPER" = xyes; then - AC_DEFINE(HAVE_DUMPER, 1, [Have dumper support]) - # SWIG configuration - AX_PKG_SWIG(2.0.0, [], [ AC_MSG_ERROR([SWIG 2.0.0 or higher is required to build..]) ]) - AX_PYTHON_DEVEL([>= '3.0']) - AX_SWIG_PYTHON -fi -AM_CONDITIONAL(HAVE_DUMPER, [test "x$DUMPER" = xyes]) - # Define a configure option for the shader debugger AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], [Enable shader debugging support [autodetected]]),@@ -237,9 +217,9 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform]) files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake" for file in $files; do - QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/quick_dump/$file`" + REGISTERS_EXTRA_DIST="$REGISTERS_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/registers/$file`" done -AC_SUBST(QUICK_DUMP_EXTRA_DIST) +AC_SUBST(REGISTERS_EXTRA_DIST) AC_CONFIG_FILES([ Makefile@@ -255,8 +235,8 @@ AC_CONFIG_FILES([ scripts/Makefile tests/Makefile tools/Makefile - tools/quick_dump/Makefile tools/null_state_gen/Makefile + tools/registers/Makefile debugger/Makefile debugger/system_routine/Makefile assembler/Makefile@@ -284,7 +264,6 @@ echo "" echo " • Tools:" echo " Assembler : ${enable_assembler}" echo " Debugger : ${enable_debugger}" -echo " Python dumper : ${DUMPER}" echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overlay_xvlib}" echo "" echo " • API-Documentation : ${enable_gtk_doc}"man/intel_reg.rst +1
-2@@ -197,8 +197,7 @@ variable, the directory is scanned for a spec file in this order: Register Spec File Format ------------------------- -The register spec format is compatible with the quick_dump.py format, briefly -described below: +The register spec format is briefly described below: * Empty lines and lines beginning with "#", ";", or "//" are ignored.tools/Makefile.am +1
-5@@ -1,10 +1,6 @@ include Makefile.sources -SUBDIRS = null_state_gen - -if HAVE_DUMPER -SUBDIRS += quick_dump -endif +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)tools/quick_dump/.gitignore deleted +0
-2@@ -1,2 +0,0 @@ -chipset_wrap_python.c -chipset.pytools/quick_dump/Makefile.am deleted +0
-34@@ -1,34 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib $(PYTHON_CPPFLAGS) $(DRM_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir) - -dist_bin_SCRIPTS = quick_dump.py reg_access.py -bin_SCRIPTS = chipset.py - -lib_LTLIBRARIES = I915ChipsetPython.la -I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) \ - -Wl,--no-undefined -I915ChipsetPython_la_SOURCES = chipset_macro_wrap.c -nodist_I915ChipsetPython_la_SOURCES = chipset_wrap_python.c -I915ChipsetPython_la_LIBADD = \ - $(top_builddir)/lib/libintel_tools.la \ - $(PCIACCESS_LIBS) \ - $(DRM_LIBS) \ - $(CAIRO_LIBS) \ - $(LIBUNWIND_LIBS) \ - -lrt \ - -lm \ - $(NULL) - -chipset.py: chipset_wrap_python.c - -chipset_wrap_python.c: chipset.i - $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $< - -all-local: I915ChipsetPython.la - $(LN_S) -f .libs/I915ChipsetPython.so _chipset.so - -CLEANFILES = chipset_wrap_python.c chipset.py _chipset.so -EXTRA_DIST = $(QUICK_DUMP_EXTRA_DIST) \ - base_interrupt.txt base_other.txt base_power.txt base_rings.txt \ - quick_dump.py \ - reg_access.py \ - chipset.itools/quick_dump/chipset.i deleted +0
-41@@ -1,41 +0,0 @@ -%module chipset -%include "stdint.i" -%{ -#include <pciaccess.h> -#include <stdint.h> -#include "intel_chipset.h" -#include "intel_io.h" -extern int is_sandybridge(unsigned short pciid); -extern int is_ivybridge(unsigned short pciid); -extern int is_valleyview(unsigned short pciid); -extern int is_cherryview(unsigned short pciid); -extern int is_haswell(unsigned short pciid); -extern int is_broadwell(unsigned short pciid); -extern int is_skylake(unsigned short pciid); -extern struct pci_device *intel_get_pci_device(); -extern int intel_register_access_init(struct pci_device *pci_dev, int safe); -extern uint32_t intel_register_read(uint32_t reg); -extern void intel_register_write(uint32_t reg, uint32_t val); -extern void intel_register_access_fini(); -extern int intel_register_access_needs_fakewake(); -extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); -extern uint32_t intel_dpio_reg_read(uint32_t reg, int phy); -extern uint32_t intel_flisdsi_reg_read(uint32_t reg); -%} - -extern int is_sandybridge(unsigned short pciid); -extern int is_ivybridge(unsigned short pciid); -extern int is_valleyview(unsigned short pciid); -extern int is_cherryview(unsigned short pciid); -extern int is_haswell(unsigned short pciid); -extern int is_broadwell(unsigned short pciid); -extern int is_skylake(unsigned short pciid); -extern struct pci_device *intel_get_pci_device(); -extern int intel_register_access_init(struct pci_device *pci_dev, int safe); -extern uint32_t intel_register_read(uint32_t reg); -extern void intel_register_write(uint32_t reg, uint32_t val); -extern void intel_register_access_fini(); -extern int intel_register_access_needs_fakewake(); -extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); -extern uint32_t intel_dpio_reg_read(uint32_t reg, int phy); -extern uint32_t intel_flisdsi_reg_read(uint32_t reg);tools/quick_dump/chipset_macro_wrap.c deleted +0
-68@@ -1,68 +0,0 @@ -/* -* Copyright © 2014 Intel Corporation -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice (including the next -* paragraph) shall be included in all copies or substantial portions of the -* Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -* DEALINGS IN THE SOFTWARE. -*/ - -#include <stdbool.h> -#include <stdlib.h> -#include <pciaccess.h> -#include "intel_chipset.h" - -int is_sandybridge (unsigned short pciid) -{ -return IS_GEN6 (pciid); -} - -int is_ivybridge (unsigned short pciid) -{ -return IS_IVYBRIDGE (pciid); -} - -int is_valleyview (unsigned short pciid) -{ -return IS_VALLEYVIEW (pciid); -} - -int is_cherryview (unsigned short pciid) -{ -return IS_CHERRYVIEW (pciid); -} - -int is_haswell (unsigned short pciid) -{ -return IS_HASWELL (pciid); -} - -int is_broadwell (unsigned short pciid) -{ -return IS_BROADWELL (pciid); -} - -int is_skylake (unsigned short pciid) -{ -return IS_SKYLAKE (pciid); -} - -/* Simple helper because I couldn't make this work in the script */ -unsigned short pcidev_to_devid (struct pci_device *pdev) -{ -return pdev->device_id; -}tools/quick_dump/quick_dump.py deleted +0
-117@@ -1,117 +0,0 @@ -#!/usr/bin/env python3 - -# register definition format: -# ('register name', 'register offset', 'register type') -# -# register types: -# '' - normal register -# 'DPIO' - DPIO register -# -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 - -import argparse -import os -import sys -import ast -import subprocess -import chipset -import reg_access as reg - -# Ignore lines which are considered comments -def ignore_line(line): - if not line.strip(): - return True - if len(line) > 1: - if line[1] == '/' and line[0] == '/': - return True - if len(line) > 0: - if line[0] == '#' or line[0] == ';': - return True - return False - -def parse_file(file): - print('{0:^10s} | {1:^33s} | {2:^10s}'. format('offset', file.name, 'value')) - print('-' * 59) - for line in file: - if ignore_line(line): - continue - register = ast.literal_eval(line) - intreg = int(register[1], 16) - if register[2] == 'FLISDSI': - val = reg.flisdsi_read(intreg) - elif register[2] == 'DPIO': - val = reg.dpio_read(intreg, 0) - elif register[2] == 'DPIO2': - val = reg.dpio_read(intreg, 1) - else: - if register[2] != '': - intreg = intreg + int(register[2], 16) - val = reg.read(intreg) - print('{0:#010x} | {1:<33} | {2:#010x}'.format(intreg, register[0], val)) - print('') - -def walk_base_files(): - for root, dirs, files in os.walk('.'): - for name in files: - if name.startswith(("base_")): - file = open(name.rstrip(), 'r') - parse_file(file) - -def autodetect_chipset(): - pci_dev = chipset.intel_get_pci_device() - devid = chipset.pcidev_to_devid(pci_dev) - if chipset.is_sandybridge(devid): - return open('sandybridge', 'r') - elif chipset.is_ivybridge(devid): - return open('ivybridge', 'r') - elif chipset.is_cherryview(devid): - return open('cherryview', 'r') - elif chipset.is_valleyview(devid): - return open('valleyview', 'r') - elif chipset.is_haswell(devid): - return open('haswell', 'r') - elif chipset.is_broadwell(devid): - return open('broadwell', 'r') - elif chipset.is_skylake(devid): - return open('skylake', 'r') - else: - print("Autodetect of devid " + hex(devid) + " failed") - return None - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Dumb register dumper.') - parser.add_argument('-b', '--baseless', - action='store_true', default=False, - help='baseless mode, ignore files starting with base_') - parser.add_argument('-f', '--file', - type=argparse.FileType('r'), default=None) - parser.add_argument('profile', nargs='?', - type=argparse.FileType('r'), default=None) - - args = parser.parse_args() - - if reg.init() == False: - print("Register initialization failed") - sys.exit() - - # Put us where the script is - os.chdir(os.path.dirname(sys.argv[0])) - - # specifying a file trumps all other things - if args.file != None: - parse_file(args.file) - sys.exit() - - #parse anything named base_ these are assumed to apply for all gens. - if args.baseless == False: - walk_base_files() - - if args.profile == None: - args.profile = autodetect_chipset() - - if args.profile == None: - sys.exit() - - for extra in args.profile: - extra_file = open(extra.rstrip(), 'r') - parse_file(extra_file)tools/quick_dump/reg_access.py deleted +0
-62@@ -1,62 +0,0 @@ -#!/usr/bin/env python3 -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 -import chipset - -def read(reg): - val = chipset.intel_register_read(reg) - return val - -def write(reg, val): - chipset.intel_register_write(reg, val) - -def gen6_forcewake_get(): - write(0xa18c, 0x1) - read(0xa180) - -def mt_forcewake_get(): - write(0xa188, 0x10001) - read(0xa180) - -def vlv_forcewake_get(): - write(0x1300b0, 0x10001) - read(0x1300b4) - -# don't be clever, just try all possibilities -def get_wake(): - gen6_forcewake_get() - mt_forcewake_get() - vlv_forcewake_get() - -def dpio_read(reg, phy): - phy = int(phy) - - val = chipset.intel_dpio_reg_read(reg, phy) - return val - -def flisdsi_read(reg): - val = chipset.intel_flisdsi_reg_read(reg) - return val - - -def init(): - pci_dev = chipset.intel_get_pci_device() - ret = chipset.intel_register_access_init(pci_dev, 0) - if ret != 0: - print("Register access init failed"); - return False - - if chipset.intel_register_access_needs_fakewake(): - print("Forcing forcewake. Don't expect your system to work after this.") - get_wake() - - return True - -if __name__ == "__main__": - import sys - - if init() == False: - sys.exit() - - reg = sys.argv[1] - print(hex(read(int(reg,16)))) - chipset.intel_register_access_fini()tools/registers/Makefile.am new file +1
-0@@ -0,0 +1 @@ +EXTRA_DIST = ${REGISTERS_EXTRA_DIST}tools/registers/audio_config_haswell_plus.txt renamed from tools/quick_dump/audio_config_haswell_plus.txt +0
-0tools/registers/audio_debug_haswell_plus.txt renamed from tools/quick_dump/audio_debug_haswell_plus.txt +0
-0tools/registers/base_interrupt.txt renamed from tools/quick_dump/base_interrupt.txt +0
-0tools/registers/base_other.txt renamed from tools/quick_dump/base_other.txt +0
-0tools/registers/base_power.txt renamed from tools/quick_dump/base_power.txt +0
-0tools/registers/base_rings.txt renamed from tools/quick_dump/base_rings.txt +0
-0tools/registers/broadwell renamed from tools/quick_dump/broadwell +0
-0tools/registers/cherryview renamed from tools/quick_dump/cherryview +0
-0tools/registers/chv_display_base.txt renamed from tools/quick_dump/chv_display_base.txt +0
-0tools/registers/chv_dpio_phy_x1.txt renamed from tools/quick_dump/chv_dpio_phy_x1.txt +0
-0tools/registers/chv_dpio_phy_x2.txt renamed from tools/quick_dump/chv_dpio_phy_x2.txt +0
-0tools/registers/chv_pipe_c.txt renamed from tools/quick_dump/chv_pipe_c.txt +0
-0tools/registers/common_display.txt renamed from tools/quick_dump/common_display.txt +0
-0tools/registers/gen6_other.txt renamed from tools/quick_dump/gen6_other.txt +0
-0tools/registers/gen7_other.txt renamed from tools/quick_dump/gen7_other.txt +0
-0tools/registers/gen8_interrupt.txt renamed from tools/quick_dump/gen8_interrupt.txt +0
-0tools/registers/gen8_other.txt renamed from tools/quick_dump/gen8_other.txt +0
-0tools/registers/haswell renamed from tools/quick_dump/haswell +0
-0tools/registers/haswell_other.txt renamed from tools/quick_dump/haswell_other.txt +0
-0tools/registers/ivybridge renamed from tools/quick_dump/ivybridge +0
-0tools/registers/sandybridge renamed from tools/quick_dump/sandybridge +0
-0tools/registers/skl_display.txt renamed from tools/quick_dump/skl_display.txt +0
-0tools/registers/skl_powerwells.txt renamed from tools/quick_dump/skl_powerwells.txt +0
-0tools/registers/skylake renamed from tools/quick_dump/skylake +0
-0tools/registers/valleyview renamed from tools/quick_dump/valleyview +0
-0tools/registers/vlv_display_base.txt renamed from tools/quick_dump/vlv_display_base.txt +0
-0tools/registers/vlv_dpio_phy.txt renamed from tools/quick_dump/vlv_dpio_phy.txt +0
-0tools/registers/vlv_dsi.txt renamed from tools/quick_dump/vlv_dsi.txt +0
-0tools/registers/vlv_flisdsi.txt renamed from tools/quick_dump/vlv_flisdsi.txt +0
-0tools/registers/vlv_pipe_a.txt renamed from tools/quick_dump/vlv_pipe_a.txt +0
-0tools/registers/vlv_pipe_b.txt renamed from tools/quick_dump/vlv_pipe_b.txt +0
-0tools/registers/vlv_power.txt renamed from tools/quick_dump/vlv_power.txt +0
-0Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Ville Syrjälä
Quoted 4 lines · Thomas Wood
Remove
quick_dumpas it has been replaced by theintel_regtool and move the register definition files totools/registers.Signed-off-by Thomas Wood <[email protected]>NAK
It's the only tool that works on VLV/CHV reasonably.
As said on IRC, intel_reg --spec=/path/to/igt/tools/registers will do that for you. (Or tools/quick_dump before this patch.)
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Thomas Wood
Remove
quick_dumpas it has been replaced by theintel_regtool and move the register definition files totools/registers.Signed-off-by Thomas Wood <[email protected]>
As a follow-up, I'd like it if Someone(tm) would add rules to install the register definitions to some appropriate location, and modify intel_reg to look there by default. Now people will have to have the source to get the definitions, and direct intel_reg there with --spec=PATH.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 tools: install the register definition files
Install the register definition files and use them by default in intel_reg.
--- configure.ac | 5 +++-- tools/Makefile.am | 2 +- tools/intel_reg.c | 4 +++- tools/registers/Makefile.am | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-)
configure.ac +3 -2
@@ -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
tools/Makefile.am +1 -1
@@ -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
tools/intel_reg.c +3 -1
@@ -713,13 +713,15 @@ 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; path = config->specfile;if (!path) path =getenv ("INTEL_REG_SPEC" ); +if (!path) + path =PKGDATADIR "/registers" ;if (!path) goto builtin;
tools/registers/Makefile.am +2 -1
@@ -1 +1,2 @@ -EXTRA_DIST = ${REGISTERS_EXTRA_DIST} +register_definitiondir = ${pkgdatadir}/registers +dist_register_definition_DATA = ${REGISTER_FILES}
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 tools: install the register definition files
Install the register definition files and use them by default in intel_reg.
v2: remove redundant path check
--- configure.ac | 5 +++-- tools/Makefile.am | 2 +- tools/intel_reg.c | 4 ++-- tools/registers/Makefile.am | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-)
configure.ac +3 -2
@@ -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
tools/Makefile.am +1 -1
@@ -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
tools/intel_reg.c +2 -2
@@ -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) {
tools/registers/Makefile.am +2 -1
@@ -1 +1,2 @@ -EXTRA_DIST = ${REGISTERS_EXTRA_DIST} +register_definitiondir = ${pkgdatadir}/registers +dist_register_definition_DATA = ${REGISTER_FILES}
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t v2] tools: install the register definition files
Quoted 7 lines · Thomas Wood
Install the register definition files and use them by default in
intel_reg.v2: remove redundant path check
Suggested-by Jani Nikula <[email protected]>Signed-off-by Thomas Wood <[email protected]>
LGTM, though I wouldn't trust my review of autotools changes. ;)
BR,
Jani.
Quoted 70 lines
--- configure.ac | 5 +++-- tools/Makefile.am | 2 +- tools/intel_reg.c | 4 ++-- tools/registers/Makefile.am | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-)configure.ac +3
-2@@ -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([ Makefiletools/Makefile.am +1
-1@@ -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-neededtools/intel_reg.c +2
-2@@ -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) {tools/registers/Makefile.am +2
-1@@ -1 +1,2 @@ -EXTRA_DIST = ${REGISTERS_EXTRA_DIST} +register_definitiondir = ${pkgdatadir}/registers +dist_register_definition_DATA = ${REGISTER_FILES}Signature · 1 line
1.9.1
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx