Re: [PATCH intel-gpu-tools 00/10] Upgrade module configuration and packaging (reposted to .cc)
On Fri, Jan 6, 2012 at 02:41, Gaetan Nadon mems...@videotron.ca wrote: On 12-01-04 09:38 AM, Daniel Vetter wrote: On Wed, Jan 4, 2012 at 15:33, Gaetan Nadon mems...@videotron.ca wrote: On 12-01-04 04:52 AM, Daniel Vetter wrote: While I have the attention of someone versed in buildsystem-fu: intel-gpu-tools also contains a set of tests for the i915 kernel module (and the libdrm interface for it). Currently we run them with $ make test by abusing the automake test rig. Is this ok or is there a better way to do something like this? I would think so, there is support in Automake to hook test cases and in util-macros to test for things like glib and provide configure option. It is used by several modules by invoking 'make check'. I'll look into that, but I might ask a few questions as I am not familiar with video drivers. Originally we've abused make check, but that turned out to be a bad idea because make distcheck automatically runs that. And the tests check the kernel and not intel-gpu-tools itself, so that didn't make much sense. Hence we added make test with a quick hack to run make check with a different set of tests (see the test: target in tests/Makefile.am). This makes the intel-gpu-tools package confusing. It is supposed to be tools, not a hardware test suite. I don't really see a way around this. One thing I'm wondering is whether we could easily ship these tests in some form, so that users could run them from the distro package instead of grabbing the sources. Make it clear what it is: a new intel-gpu-tests package which depends on intel-gpu-tools. Some executable installed in BINDIR runs test cases installed in DATADIR. You need to provide ways to select test cases, instructions on how to report bugs with meaningful data, etc... The executable must be smart enough to not run anything on non-Intel hardware or wrong kernel, etc... This would put your test suite in the public domain and would be run by anyone. Would it be useful or just generate more work? Would distros be willing to install this? They are the ones who would initially get the bug reports from their users. X.Org has an X Test Suite in a git repo to test the protocols. http://cgit.freedesktop.org/xorg/test/xts/tree/README I did try one of the tools on my computer. The windows started shaking and the window manager eventually fell off the monitor, never to be seen again. Needless to say, I am not willing to try any test case :-( I think you've convinced me ;-) At least for the foreseeable future, the current setup seems to be good enough. Thanks a lot for your explanations patches. Cheers, Daniel -- Daniel Vetter daniel.vet...@ffwll.ch - +41 (0) 79 364 57 48 - http://blog.ffwll.ch ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: linux intel and xorg status on i915GM hardware
On Fri, Jan 6, 2012 at 05:45, Knut Petersen knut_peter...@t-online.dewrote: 2. https://bugs.freedesktop.org/**show_bug.cgi?id=42300https://bugs.freedesktop.org/show_bug.cgi?id=42300has not been resolved I believe Keith will queue the fix for this (which is the same as for https://bugs.freedesktop.org/show_bug.cgi?id=41059 apparently) shortly. -- Eugeni Dodonov http://eugeni.dodonov.net/ ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: linux intel and xorg status on i915GM hardware
Hi, On 6 January 2012 07:45, Knut Petersen knut_peter...@t-online.de wrote: Some comments related to linux and xorg git master on an AOpen i915GMm-hfs: 1: Xorg.0.log is full of (besides timestamp) identical EDID entries: == [...] The following bash script calculates the seconds between logged EDID reads: [...] No, no monitor has been connected or disconnected ... I do not see any pattern. X clients can (and do) force EDID reprobing; the server doesn't automatically reprobe of its own volition. Cheers, Daniel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Change autogen.sh scripts to respect NOCONFIGURE
On 12-01-05 10:24 PM, Eric Anholt wrote: On Thu, 05 Jan 2012 11:41:46 -0500, Gaetan Nadon mems...@videotron.ca wrote: On 12-01-05 09:17 AM, Colin Walters wrote: Hi Gaetan, On Wed, 2012-01-04 at 19:48 -0500, Gaetan Nadon wrote: No objections in principle, the doc is convincing. We are talking about 240 modules here. A sizable piece of work. Thanks; any suggestions on how to proceed? I don't have commit privileges to the xorg repositories (and no need to get them for such a trivial patch), should I go through individual maintainers or should someone Just Do It? One thing we might want to consider before we change all 240 modules is instead changing xorg-macros to install its autogen.sh as $prefix/bin/xorg-autogen.sh or something, then all of the xorg autogen scripts can just be: #!/bin/sh exec xorg-autogen.sh $@ This is effectively what we do with gnome-common, except some random modules still have hand-written ones. Consistency - not yet our strong point =/ Seems like a brilliant idea. We can then make changes to xorg-autogen.sh in the future without having to commit 240 patches. I'd be willing to change all the xorg modules. There is an assumption that all modules will be configured with the same BINDIR value, or that at least xorg-autogen.sh in on the PATH. Looks reasonable. Could you create the patch for the util-macros package? Making sure it works on a Bourne shell for all *BSD, MAC and Solaris OS. It will get reviewed on the list and I'll give a good run. If all goes well, a new version of xorg-macros will be published. Note that I will also have to update configure.ac in each module to mandate the latest version of xorg-macros (as usual): XORG_MACROS_VERSION(1.17) Given how many people's first interaction with xorg-macros is configure.ac telling them that it's out of date/missing, I'm not excited about modules now just saying command not found instead of giving useful information. The latest thought is to have the util-macros package version check in the copy of autogen.sh in each module. This should not make it any more unpleasant than the current situation. Having read your comment, I would not make the XORG_MACROS_VERSION(1.17) change. In this transition period, older modules can be built with autoreconf configure from git using a = 1.16 xorg-macros. From a single module developer point of view, the autogen.sh is not needed to build from source. It's not part of the GNU build system architecture. It's a legacy script from the days where autoreconf did not exist and a handful of commands had to be submitted every time. From what I understand from Colin, FOSS is trying to standardise it's use to ease the build of multiple large projects. Thanks ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 0/6] Convert debugger to Automake
Also fixed some nits in other makefiles. I checked that the binaries produced have the same size, but I'd like someone to run a sanity check on the module. I ran distcheck, out-of-source build and build from tarball. A Tested-by tag would be appreciated. I'll be away for the next few days. I'll collect review tags and I'll push the patches next week if all goes well. Gaetan Nadon (6): Debugger: convert existing makefiles to Automake. Benchmark: simplify makefile lib: simplify makefile scripts: use PYTHON primary directive for python scripts tools: minor compiler flags reorg and layout changes config: remove unused AC_DEFINE CAIRO LIBUDEV GLIB Makefile.am|8 ++-- benchmarks/Makefile.am | 29 +++ configure.ac | 60 +++ debugger/Makefile.am | 27 +-- debugger/system_routine/.gitignore | 12 - debugger/system_routine/GNUmakefile.in |3 - debugger/system_routine/Makefile | 84 debugger/system_routine/Makefile.am| 42 lib/Makefile.am| 45 - scripts/Makefile.am|7 +-- tools/Makefile.am | 78 ++ 11 files changed, 174 insertions(+), 221 deletions(-) delete mode 100644 debugger/system_routine/GNUmakefile.in delete mode 100644 debugger/system_routine/Makefile create mode 100644 debugger/system_routine/Makefile.am -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 1/6] Debugger: convert existing makefiles to Automake.
A common xorg idiom is used. The dependencies are auto-detected. If they are present, the debugger is build. If any are missing, the debugger is silently skipped. If --enable-shader-debugger is specified, the configuration will abort if any of the dependencies is missing. No user actions is needed, no env variable to set (as it should be) This will fix a number of problems: build cannot start due Makefile missing in tarball. build fails as GEN4ASM variable not available in Makefile. no binaries are installed, so it cannot be used from a distro. distcheck is also disturbed. In the process other minor problems were fixed: helper target is missing dependencies on evict.h. too may arguments given to pre_cpp.py but they were ignored. fills /tmp with temporary files. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- Makefile.am|8 ++-- configure.ac | 51 +++- debugger/Makefile.am | 27 +-- debugger/system_routine/.gitignore | 12 - debugger/system_routine/GNUmakefile.in |3 - debugger/system_routine/Makefile | 84 debugger/system_routine/Makefile.am| 42 7 files changed, 107 insertions(+), 120 deletions(-) delete mode 100644 debugger/system_routine/GNUmakefile.in delete mode 100644 debugger/system_routine/Makefile create mode 100644 debugger/system_routine/Makefile.am diff --git a/Makefile.am b/Makefile.am index c7ae735..e049e3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,11 +19,11 @@ # 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. -if HAVE_SHADER_DEBUGGER -SHADER_DEBUGGER_SUBDIR = debugger -endif +SUBDIRS = lib man tools scripts tests benchmarks -SUBDIRS = lib man tools scripts tests benchmarks $(SHADER_DEBUGGER_SUBDIR) +if BUILD_SHADER_DEBUGGER +SUBDIRS += debugger +endif test: ${MAKE} -C tests test diff --git a/configure.ac b/configure.ac index b415a97..7265917 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_PATH_PYTHON([3],, [:]) AM_MAINTAINER_MODE # Initialize libtool @@ -65,22 +66,47 @@ if test x$HAVE_GLIB = xyes; then fi AM_CONDITIONAL(HAVE_GLIB, [test x$HAVE_GLIB = xyes]) -AC_ARG_ENABLE(shader-debugger, - AS_HELP_STRING([--enable-shader-debugger], -[Enable shader debugging support [default=no]]), - [SHADER_DEBUGGER=$enableval], - [SHADER_DEBUGGER=no]) -AM_CONDITIONAL(HAVE_SHADER_DEBUGGER, [test x$SHADER_DEBUGGER = xyes]) -if test x$SHADER_DEBUGGER = xyes; then - AC_CHECK_PROG([GEN4ASM], intel-gen4asm, intel-gen4asm) - if test -z $GEN4ASM; then - AC_MSG_ERROR([Cannot find intel-gen4asm in your path; please set GEN4ASM env variable]) +# - +# Configuration options +# - +# Define a configure option for the shadder debugger +AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], +[Enable shader debugging support [autodetected]]), +[BUILD_SHADER_DEBUGGER=$enableval], [BUILD_SHADER_DEBUGGER=auto]) + +# Shadder debugger depends on python3, intel-genasm and objcopy +if test x$BUILD_SHADER_DEBUGGER != xno; then +# Check Python 3 is installed +if test $PYTHON = : ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, python version 3 not found.]) + else + BUILD_SHADER_DEBUGGER=no + fi +fi +# Check for the Intel Chipset assembler compiler +AC_PATH_PROGS([GEN4ASM], intel-gen4asm) +if test -z $GEN4ASM ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, but intel-gen4asm not found.]) else - AC_CONFIG_FILES([debugger/system_routine/GNUmakefile]) - AC_DEFINE(HAVE_SHADER_DEBUGGER, 1, [Have shader debugging support]) + BUILD_SHADER_DEBUGGER=no fi +fi +# Check for the objcopy GNU binary utiliy command +AC_PATH_PROGS([OBJCOPY], objcopy) +if test -z $OBJCOPY ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, but objcopy command not found.]) + else + BUILD_SHADER_DEBUGGER=no + fi +fi fi +AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test x$BUILD_SHADER_DEBUGGER != xno]) +# - + AC_CONFIG_FILES([ Makefile benchmarks/Makefile @@ -90,5 +116,6 @@ AC_CONFIG_FILES([ tests/Makefile
[PATCH intel-gpu-tools 2/6] Benchmark: simplify makefile
AM_* and LDAAD applies to all targets libintel_tools.la is located in builddir, not srcdir. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- benchmarks/Makefile.am | 29 - 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index bc0a533..a80a2f6 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -1,23 +1,10 @@ -NULL=# -bin_PROGRAMS = $(NULL) +bin_PROGRAMS = \ + intel_upload_blit_large \ + intel_upload_blit_large_gtt \ + intel_upload_blit_large_map \ + intel_upload_blit_small -bin_PROGRAMS += \ - intel_upload_blit_large \ - intel_upload_blit_large_gtt \ - intel_upload_blit_large_map \ - intel_upload_blit_small \ - $(NULL) - -BENCHMARK_LIBS = \ - ../lib/libintel_tools.la \ - $(DRM_LIBS) - -intel_upload_blit_large_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_large_gtt_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_large_map_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_small_LDADD = $(BENCHMARK_LIBS) - -AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ - -I$(srcdir)/.. \ - -I$(srcdir)/../lib +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) +LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 3/6] lib: simplify makefile
Very little has changed in this one. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- lib/Makefile.am | 45 + 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index ca93410..9607fcb 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,28 +1,25 @@ -NULL=# -AM_CFLAGS = $(CWARNFLAGS) -I$(srcdir)/.. -libintel_tools_la_SOURCES = \ - intel_batchbuffer.h \ - intel_batchbuffer.c \ - intel_chipset.h \ - intel_gpu_tools.h \ - intel_mmio.c \ - intel_pci.c \ - intel_reg.h \ - i915_3d.h \ - i915_reg.h \ - i830_reg.h \ - intel_reg_map.c \ - intel_drm.c \ - instdone.c \ - instdone.h \ - drmtest.h \ - drmtest.c \ - debug.h \ - $(NULL) - -AM_CFLAGS += $(DRM_CFLAGS) +noinst_LTLIBRARIES = libintel_tools.la +AM_CPPFLAGS = -I$(top_srcdir) +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) -noinst_LTLIBRARIES = libintel_tools.la +libintel_tools_la_SOURCES =\ + debug.h \ + drmtest.c \ + drmtest.h \ + i830_reg.h \ + i915_3d.h \ + i915_reg.h \ + instdone.c \ + instdone.h \ + intel_batchbuffer.c \ + intel_batchbuffer.h \ + intel_chipset.h \ + intel_drm.c \ + intel_gpu_tools.h \ + intel_mmio.c\ + intel_pci.c \ + intel_reg.h \ + intel_reg_map.c -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 4/6] scripts: use PYTHON primary directive for python scripts
Should it become installlable in the future, it will get compiled at installation time by Automake. Because it is source, they get included in the tarball/ Signed-off-by: Gaetan Nadon mems...@videotron.ca --- scripts/Makefile.am |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index dad9cf7..baf3612 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,6 +1,3 @@ -noinst_SCRIPTS = \ - throttle.py\ - who.sh \ - $(NULL) -EXTRA_DIST = $(noinst_SCRIPTS) +dist_noinst_SCRIPTS = who.sh +noinst_PYTHON = throttle.py -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 5/6] tools: minor compiler flags reorg and layout changes
Use dist_bin_SCRIPTS. Use $(top_srcdir) Signed-off-by: Gaetan Nadon mems...@videotron.ca --- tools/Makefile.am | 78 1 files changed, 36 insertions(+), 42 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 4969a11..220c2b3 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,48 +1,42 @@ -bin_PROGRAMS = \ - intel_disable_clock_gating \ - intel_audio_dump \ - intel_backlight \ - intel_bios_dumper \ - intel_bios_reader \ - intel_error_decode \ - intel_gpu_top \ - intel_gpu_time \ - intel_gtt \ - intel_stepping \ - intel_reg_checker \ - intel_reg_dumper \ - intel_reg_snapshot \ - intel_reg_write \ - intel_reg_read \ - forcewaked \ - $(NULL) -bin_SCRIPTS = intel_gpu_abrt \ - $(NULL) - -noinst_PROGRAMS = \ - intel_dump_decode \ - intel_lid \ - $(NULL) - -intel_dump_decode_SOURCES = \ - intel_dump_decode.c \ - intel_decode.c \ +bin_PROGRAMS = \ + intel_disable_clock_gating \ + intel_audio_dump\ + intel_backlight \ + intel_bios_dumper \ + intel_bios_reader \ + intel_error_decode \ + intel_gpu_top \ + intel_gpu_time \ + intel_gtt \ + intel_stepping \ + intel_reg_checker \ + intel_reg_dumper\ + intel_reg_snapshot \ + intel_reg_write \ + intel_reg_read \ + forcewaked + +noinst_PROGRAMS = \ + intel_dump_decode \ + intel_lid + +dist_bin_SCRIPTS = intel_gpu_abrt + +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) +LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) + +intel_dump_decode_SOURCES =\ + intel_dump_decode.c \ + intel_decode.c \ intel_decode.h -intel_error_decode_SOURCES = \ - intel_error_decode.c \ - intel_decode.c \ +intel_error_decode_SOURCES = \ + intel_error_decode.c\ + intel_decode.c \ intel_decode.h -intel_bios_reader_SOURCES = \ - intel_bios_reader.c \ +intel_bios_reader_SOURCES =\ + intel_bios_reader.c \ intel_bios.h - -EXTRA_DIST = $(bin_SCRIPTS) - -LDADD = ../lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) - -AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \ - -I$(srcdir)/.. \ - -I$(srcdir)/../lib -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 6/6] config: remove unused AC_DEFINE CAIRO LIBUDEV GLIB
Only the AM_CONDITIONAL is used. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- configure.ac |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 7265917..f58a8f5 100644 --- a/configure.ac +++ b/configure.ac @@ -49,21 +49,12 @@ PKG_CHECK_MODULES(DRM, [libdrm_intel = 2.4.23 libdrm]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess = 0.10]) PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) -if test x$HAVE_CAIRO = xyes; then - AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) -fi AM_CONDITIONAL(HAVE_CAIRO, [test x$HAVE_CAIRO = xyes]) PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) -if test x$HAVE_LIBUDEV = xyes; then - AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support]) -fi AM_CONDITIONAL(HAVE_LIBUDEV, [test x$HAVE_LIBUDEV = xyes]) PKG_CHECK_MODULES(GLIB, glib-2.0, [HAVE_GLIB=yes], [HAVE_GLIB=no]) -if test x$HAVE_GLIB = xyes; then - AC_DEFINE(HAVE_GLIB, 1, [Have glib support]) -fi AM_CONDITIONAL(HAVE_GLIB, [test x$HAVE_GLIB = xyes]) # - -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH intel-gpu-tools 1/6] Debugger: convert existing makefiles to Automake.
On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote: +sr.cpp : sr.g4a + $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@ I recommend writing custom build commands to be atomic. Which means: $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@.tmp mv $@.tmp $@ This way if the developer uses Control-C to send SIGINT to the process group which kills the command in the middle of a write (or the command crashes), you don't spend any time debugging the later program which is consuming a half-written input file. In some cases this can cause very subtle corruption or errors. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH intel-gpu-tools 3/6] lib: simplify makefile
On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote: Very little has changed in this one. Your commit message isn't helpful - *what* are you simplifying? In this case it looks like you're e.g. putting -I directives in CPPFLAGS, using the common $(DRM_CFLAGS), and alphabetizing the sources. Say so then, something like: lib: Fix include directives, alphabetize sources -I should go in AM_CPPFLAGS. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Request review libx11 compose seqeunce patch
Hi all, Please review this patch for libx11 to extend and fix compose key sequences as was request via GTK+ community a while back. The patch and extensive comment can be downloaded here: https://bugs.freedesktop.org/show_bug.cgi?id=18751#c7 Implementing this will improve overall quality of compose sequences and consolidate the 413 additional compose sequences currently defined in gtk+ for GNOME and solving conflicting definitions compared to compose sequences in Xorg for KDE, etc. A lot of work has gone in to this and I hope this bug can be solved soon. Please contact me if I need to amend something to the patch or if you have any questions. Thanks, Pander ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [Intel-gfx] linux intel and xorg status on i915GM hardware
On 1/6/12 2:45 AM, Knut Petersen wrote: 1: Xorg.0.log is full of (besides timestamp) identical EDID entries: == [ 2502.358] (II) intel(0): EDID vendor ENC, prod id 5769 [ 2502.358] (II) intel(0): Using EDID range info for horizontal sync [ 2502.358] (II) intel(0): Using EDID range info for vertical refresh [ 2502.358] (II) intel(0): Printing DDC gathered Modelines: [ 2502.358] (II) intel(0): Modeline 1280x1024x0.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz eP) [ 2502.358] (II) intel(0): Modeline 800x600x0.0 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e) [ 2502.358] (II) intel(0): Modeline 640x480x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e) [ 2502.358] (II) intel(0): Modeline 720x400x0.0 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e) [ 2502.358] (II) intel(0): Modeline 1024x768x0.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e) Does this happen with no X apps running, just a naked X server? If so you have something causing spurious hotplug interrupts. If not, something in your session is querying the server a lot. I believe gnome attempts to isolate calls to XRRGetScreenResources to gnome-settings-daemon for precisely this reason (only one app really needs to call it and the rest should query through the session bus). 5. Xorg fails to start without a manually created Section Modules in config = see: https://bugs.freedesktop.org/show_bug.cgi?id=41208 You really do have a toolchain bug there. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] miext/damage: Only wrap into the GC ops chain if there's a listener (v2.1)
Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square v2: Bump drawable serial number on damage register/unregister to trigger ValidateGC, otherwise a Damage created after the GC was validated would never be called, and a Damage destroyed on a validated GC would probably crash the next GC draw. Spotted by Aaron Plattner. v2.1: Actually include the above change. Reviewed-by: Eric Anholt e...@anholt.net Signed-off-by: Adam Jackson a...@redhat.com --- miext/damage/damage.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d791211..37599dd 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -437,9 +437,13 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { +drawableDamage(pDrawable); DAMAGE_GC_FUNC_PROLOGUE (pGC); (*pGC-funcs-ValidateGC)(pGC, changes, pDrawable); -pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +if (pDamage) + pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +else + pGCPriv-ops = NULL; DAMAGE_GC_FUNC_EPILOGUE (pGC); } @@ -1766,12 +1770,15 @@ void miDamageCreate (DamagePtr pDamage) { } +/* Bump serial on register/unregister to trigger ValidateGC */ void miDamageRegister (DrawablePtr pDrawable, DamagePtr pDamage) { +pDrawable-serialNumber++; } void miDamageUnregister (DrawablePtr pDrawable, DamagePtr pDamage) { +pDrawable-serialNumber++; } void miDamageDestroy (DamagePtr pDamage) -- 1.7.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] miext/damage: Only wrap into the GC ops chain if there's a listener (v2.1)
On Fri, 6 Jan 2012 13:46:38 -0500, Adam Jackson a...@redhat.com wrote: Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square v2: Bump drawable serial number on damage register/unregister to trigger ValidateGC, otherwise a Damage created after the GC was validated would never be called, and a Damage destroyed on a validated GC would probably crash the next GC draw. Spotted by Aaron Plattner. v2.1: Actually include the above change. Reviewed-by: Eric Anholt e...@anholt.net Signed-off-by: Adam Jackson a...@redhat.com --- miext/damage/damage.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d791211..37599dd 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -437,9 +437,13 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { +drawableDamage(pDrawable); DAMAGE_GC_FUNC_PROLOGUE (pGC); (*pGC-funcs-ValidateGC)(pGC, changes, pDrawable); -pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +if (pDamage) + pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +else + pGCPriv-ops = NULL; That comment is quite annoying and does not make those macros any less opaque. How about: pGCPriv-ops = pDamage; /* a non-NULL value to enable damage tracking and fixed up in the epilogue to the appropriate wrapped ops */ -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] miext/damage: Only wrap into the GC ops chain if there's a listener (v2)
Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square v2: Bump drawable serial number on damage register/unregister to trigger ValidateGC, otherwise a Damage created after the GC was validated would never be called, and a Damage destroyed on a validated GC would probably crash the next GC draw. Spotted by Aaron Plattner. Reviewed-by: Eric Anholt e...@anholt.net Signed-off-by: Adam Jackson a...@redhat.com --- miext/damage/damage.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d791211..dd4026b 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -437,9 +437,13 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { +drawableDamage(pDrawable); DAMAGE_GC_FUNC_PROLOGUE (pGC); (*pGC-funcs-ValidateGC)(pGC, changes, pDrawable); -pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +if (pDamage) + pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +else + pGCPriv-ops = NULL; DAMAGE_GC_FUNC_EPILOGUE (pGC); } -- 1.7.7.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] shape: Report empty region correctly
On 11/18/10 7:42 AM, Pauli wrote: From: Pauli Nieminenext-pauli.niemi...@nokia.com If client calls XShapeGetRectangles when region is empty return values is NULL instead of empty rectangle. Steps to reproduce problem: XShapeCombineRectangles(ShapeSet with rectangle that has zero width or height) XShapeGetRectangles() // returns NULL Documentation claims: If the extension is not supported, XShapeGetRectangles returns NULL. Otherwise, it returns a list of rectangles that describe the region specified by kind. [1] [1] http://www.x.org/releases/X11R7.6-RC1/doc/libXext/shapelib.html To fix the problem XShapeGetRectangles has to check if there is no rectangles in region and return sane values instead of no rectangles. Reviewed-by: Adam Jackson a...@redhat.com I've merged this into my 1.12 queue, which I'll be sending a pull request for shortly. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] linux: Use K_OFF VT KB mode over K_RAW if available.
On 1/6/12 2:21 AM, Arthur Taylor wrote: Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in which special keys (like Ctrl+C) are not interpreted and input is not buffered. Use of this mode over K_RAW removes the need for a xf86ConsoleHandler to drain the VT input buffer, removing the grief it causes when it goes wrong or is (de)initialized out-of-order. (This also saves a few needless context switches per key event.) If K_OFF is not defined or not understood by the kernel, K_RAW and the previous method is used as a fall-back. Signed-off-by: Arthur Taylora...@ified.ca Reviewed-by: Adam Jackson a...@redhat.com Merged in my 1.12 tree. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/2] dix: Return BadWindow rather than BadMatch from dixLookupWindow
On 1/4/12 8:22 PM, Christopher James Halse Rogers wrote: dixLookupWindow uses dixLookupDrawable internally, which returns BadMatch when the XID matches a non-Window drawable. Users of dixLookupWindow don't care about this, just that it's not a valid Window. This is a generalised version of the fix for X.Org Bug 23562, where GetProperty was incorrectly returning BadMatch. Auditing other window requests, all that I checked would incorrectly return BadMatch in these circumstances. An incomplete list of calls that could incorrectly return BadMatch is: ListProperties, SetSelectionOwner, {Destroy,Map,Unmap}{,Sub}Window. None of the callers of dixLookupWindow, except for GetProperty, check for BadMatch Signed-off-by: Christopher James Halse Rogerschristopher.halse.rog...@canonical.com Merged this series into my 1.12 tree. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] mi/mibitblt: Fix an overflow bug of bit shift.
On 1/4/12 2:01 AM, zhigang.g...@linux.intel.com wrote: From: Zhigang Gongzhigang.g...@linux.intel.com When depth equal to 32 and planeMask equal to 0, the overflow will occur and cause the pixmap can't be cleared. There are some test cases in XTS hit this bug, and this fix can eliminate the corresponding failures. Signed-off-by: Zhigang Gongzhigang.g...@linux.intel.com Reviewed-by: Adam Jackson a...@redhat.com Merged in my 1.12 tree. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Add OpenBSD support to DetermineClientCmd()
On 1/2/12 8:23 AM, Matthieu Herrb wrote: Uses kvm_getargv() from libkvm. Signed-off-by: Matthieu Herrbmatthieu.he...@laas.fr Reviewed-by: Adam Jackson a...@redhat.com Merged in my 1.12 tree. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH v2] UnloadSubModule(): accept pointer value '1' and ignore it.
On 1/2/12 8:11 AM, Matthieu Herrb wrote: Some driver modules try to unload submodules that are now built-in. Signed-off-by: Matthieu Herrbmatthieu.he...@laas.fr Reviewed-by: Julien Cristaujcris...@debian.org Reviewed-by: Adam Jackson a...@redhat.com Merged in my 1.12 tree. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH intel-gpu-tools 1/6] Debugger: convert existing makefiles to Automake.
On 12-01-06 11:19 AM, Colin Walters wrote: On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote: +sr.cpp : sr.g4a +$(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@ I recommend writing custom build commands to be atomic. Which means: $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@.tmp mv $@.tmp $@ This way if the developer uses Control-C to send SIGINT to the process group which kills the command in the middle of a write (or the command crashes), you don't spend any time debugging the later program which is consuming a half-written input file. In some cases this can cause very subtle corruption or errors. This is news to me. Makes sense. For the gcc command, would it not take care of removing output before exiting? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dix: Remove DisableMapUnmapEvents code
On Sun, Dec 18, 2011 at 06:26:04PM +0200, Ville Syrjälä wrote: This is now dead code. The only user was eliminated in commit 193ecc8b453b22b3e60248b9354c768dbd405598. Signed-off-by: Ville Syrjälä syrj...@sci.fi Ping? -- Ville Syrjälä syrj...@sci.fi http://www.sci.fi/~syrjala/ ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH intel-gpu-tools 3/6] lib: simplify makefile
On 12-01-06 11:24 AM, Colin Walters wrote: On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote: Very little has changed in this one. Your commit message isn't helpful - *what* are you simplifying? In this case it looks like you're e.g. putting -I directives in CPPFLAGS, using the common $(DRM_CFLAGS), and alphabetizing the sources. Say so then, something like: lib: Fix include directives, alphabetize sources -I should go in AM_CPPFLAGS. You are absolutely right, I got lazy. I'll review all of them. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH intel-gpu-tools 1/6] Debugger: convert existing makefiles to Automake.
On Fri, 2012-01-06 at 17:19 -0500, Gaetan Nadon wrote: On 12-01-06 11:19 AM, Colin Walters wrote: On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote: +sr.cpp : sr.g4a + $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@ I recommend writing custom build commands to be atomic. Which means: $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a $@.tmp mv $@.tmp $@ This way if the developer uses Control-C to send SIGINT to the process group which kills the command in the middle of a write (or the command crashes), you don't spend any time debugging the later program which is consuming a half-written input file. In some cases this can cause very subtle corruption or errors. This is news to me. Makes sense. For the gcc command, would it not take care of removing output before exiting? From a quick: strace -f -erename gcc -o foo foo.c Nothing in that process chain invokes rename(2), so it can't be atomic. It's probably worth patching automake at some point to output atomic rules, but anyways I do it in my custom rules. See also https://github.com/apenwarr/redo ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 0/6] Port to Solaris
This allows the tools to build on Solaris 11, using either gcc 4.5.2 or Solaris Studio 12.3. The tools that require the Linux debugfs don't run, but others, such as intel_gpu_top and intel_reg_dumper do work. I've tried not to break any other platforms, but haven't tested on any to confirm that. Alan Coopersmith (6): Provide Solaris implementation of intel_get_total_ram_mb Solaris defines struct winsize in termios.h Use sched_yield if pthread_yield is not available List out array values instead of using gcc range extension include fcntl.h in lib/intel_mmio.c for open() prototype on Solaris Fix pthread compiler flags to work on Solaris and with Studio compiler configure.ac | 21 ++--- lib/intel_drm.c | 18 +- lib/intel_mmio.c |1 + tests/Makefile.am|2 +- tests/gem_fence_thrash.c |6 ++ tools/intel_audio_dump.c |9 +++-- tools/intel_gpu_top.c|5 + 7 files changed, 55 insertions(+), 7 deletions(-) -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 2/6] Solaris defines struct winsize in termios.h
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |1 + tools/intel_gpu_top.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 00c05ee..197c622 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE # Checks for functions, headers, structures, etc. +AC_CHECK_HEADERS([termios.h]) AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT #include sys/sysinfo.h ]) diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 260a28b..033ba53 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -27,6 +27,8 @@ * */ +#include config.h + #include unistd.h #include stdlib.h #include stdio.h @@ -35,6 +37,9 @@ #include sys/time.h #include sys/wait.h #include string.h +#ifdef HAVE_TERMIOS_H +#include termios.h +#endif #include intel_gpu_tools.h #include instdone.h -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 5/6] include fcntl.h in lib/intel_mmio.c for open() prototype on Solaris
fcntl.h is the POSIX standard specified header for open(), so should be available on all platforms. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- lib/intel_mmio.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/intel_mmio.c b/lib/intel_mmio.c index 31967d9..da68bdf 100644 --- a/lib/intel_mmio.c +++ b/lib/intel_mmio.c @@ -27,6 +27,7 @@ */ #include unistd.h +#include fcntl.h #include stdio.h #include stdarg.h #include stdlib.h -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 1/6] Provide Solaris implementation of intel_get_total_ram_mb
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac|5 + lib/intel_drm.c | 18 +- 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index b415a97..00c05ee 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,11 @@ AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE +# Checks for functions, headers, structures, etc. +AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT +#include sys/sysinfo.h +]) + # Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL diff --git a/lib/intel_drm.c b/lib/intel_drm.c index c6cf21d..f8eca7d 100644 --- a/lib/intel_drm.c +++ b/lib/intel_drm.c @@ -25,6 +25,8 @@ * */ +#include config.h + #include unistd.h #include stdlib.h #include stdio.h @@ -36,7 +38,9 @@ #include sys/fcntl.h #include sys/stat.h #include sys/mman.h +#ifdef HAVE_STRUCT_SYSINFO_TOTALRAM #include sys/sysinfo.h +#endif #include intel_gpu_tools.h #include i915_drm.h @@ -78,8 +82,10 @@ int intel_gen(uint32_t devid) uint64_t intel_get_total_ram_mb(void) { - struct sysinfo sysinf; uint64_t retval; + +#ifdef HAVE_STRUCT_SYSINFO_TOTALRAM /* Linux */ + struct sysinfo sysinf; int ret; ret = sysinfo(sysinf); @@ -87,6 +93,16 @@ intel_get_total_ram_mb(void) retval = sysinf.totalram; retval *= sysinf.mem_unit; +#elif defined(_SC_PAGESIZE) defined(_SC_PHYS_PAGES) /* Solaris */ + long pagesize, npages; + + pagesize = sysconf(_SC_PAGESIZE); +npages = sysconf(_SC_PHYS_PAGES); + + retval = pagesize * npages; +#else +#error Unknown how to get RAM size for this OS +#endif return retval / (1024*1024); } -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 3/6] Use sched_yield if pthread_yield is not available
Despite the name implying it's a standard part of the POSIX threads API, pthread_yield is actually non-standard and not entirely portable. For systems like Solaris that don't have it, fall back to sched_yield. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |1 + tests/gem_fence_thrash.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 197c622..5fe993c 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE # Checks for functions, headers, structures, etc. +AC_CHECK_FUNCS([pthread_yield]) AC_CHECK_HEADERS([termios.h]) AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT #include sys/sysinfo.h diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c index 8ed4e08..22c1e4b 100644 --- a/tests/gem_fence_thrash.c +++ b/tests/gem_fence_thrash.c @@ -26,6 +26,8 @@ * */ +#include config.h + #define _GNU_SOURCE #include unistd.h @@ -110,7 +112,11 @@ bo_copy (void *_arg) for (n = 0; n 1000; n++) { memcpy (a, b, OBJECT_SIZE); +#ifdef HAVE_PTHREAD_YIELD pthread_yield (); +#else + sched_yield (); +#endif } return NULL; -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 4/6] List out array values instead of using gcc range extension
Required to compile with Solaris Studio cc compiler. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- tools/intel_audio_dump.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c index 95673fd..08e2c6a 100644 --- a/tools/intel_audio_dump.c +++ b/tools/intel_audio_dump.c @@ -129,7 +129,9 @@ static char *trans_to_port_sel[] = { [2] = Digital Port B, [3] = Digital Port B, [4] = Digital Port B, - [5 ... 7] = reserved, + [5] = reserved, + [6] = reserved, + [7] = reserved, }; static char *transcoder_select[] = { @@ -144,7 +146,10 @@ static char *dp_port_width[] = { [1] = x2 mode, [2] = reserved, [3] = x4 mode, - [4 ... 7] = reserved, + [4] = reserved, + [5] = reserved, + [6] = reserved, + [7] = reserved, }; static char *bits_per_sample[] = { -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 6/6] Fix pthread compiler flags to work on Solaris and with Studio compiler
AC_USE_SYSTEM_EXTENSIONS is used to let autoconf take care of setting the right system defintions for POSIX threads similar extensions to the base POSIX API. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac | 11 --- tests/Makefile.am |2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5fe993c..052c629 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) +AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE @@ -45,10 +46,10 @@ AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT AC_DISABLE_STATIC AC_PROG_LIBTOOL -# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +# Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.8) + [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.16) XORG_DEFAULT_OPTIONS PKG_CHECK_MODULES(DRM, [libdrm_intel = 2.4.23 libdrm]) @@ -88,6 +89,10 @@ if test x$SHADER_DEBUGGER = xyes; then fi fi +# To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt +XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt]) +AC_SUBST([THREAD_CFLAGS]) + AC_CONFIG_FILES([ Makefile benchmarks/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 770243a..4ff4376 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -103,5 +103,5 @@ endif endif endif -gem_fence_thrash_CFLAGS = $(AM_CFLAGS) -pthread +gem_fence_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_fence_thrash_LDADD = $(LDADD) -lpthread -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:intel-gpu-tools 3/6] Use sched_yield if pthread_yield is not available
From: Alan Coopersmith alan.coopersm...@oracle.com Date: Fri, 6 Jan 2012 14:37:18 -0800 Despite the name implying it's a standard part of the POSIX threads API, pthread_yield is actually non-standard and not entirely portable. For systems like Solaris that don't have it, fall back to sched_yield. Given that the Linux pthread_yield(3) man page explicitly says that one should use sched_yield(2) instead, I'd say you should just replace pthread_yield(3) with sched_yield(2) and forget about the autoconfigury bits. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools v2 0/6] Convert debugger to Automake
Version 2 improves commit messages and custom build commands Also fixed some nits in other makefiles. I checked that the binaries produced have the same size, but I'd like someone to run a sanity check on the module. I ran distcheck, out-of-source build and build from tarball. A Tested-by tag would be appreciated. I'll be away for the next few days. I'll collect review tags and I'll push the patches next week if all goes well. Gaetan Nadon (6): Debugger: convert existing makefiles to Automake. Benchmark: use correct src and build location lib: fix include directives, alphabetize sources scripts: use PYTHON primary directive for python scripts tools: use correct src and build location config: remove unused AC_DEFINE for CAIRO, LIBUDEV and GLIB Makefile.am|8 ++-- benchmarks/Makefile.am | 29 +++ configure.ac | 60 +++ debugger/Makefile.am | 27 +-- debugger/system_routine/.gitignore | 12 - debugger/system_routine/GNUmakefile.in |3 - debugger/system_routine/Makefile | 84 debugger/system_routine/Makefile.am| 42 lib/Makefile.am| 45 - scripts/Makefile.am|7 +-- tools/Makefile.am | 78 ++ 11 files changed, 174 insertions(+), 221 deletions(-) delete mode 100644 debugger/system_routine/GNUmakefile.in delete mode 100644 debugger/system_routine/Makefile create mode 100644 debugger/system_routine/Makefile.am -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools v2 1/6] Debugger: convert existing makefiles to Automake.
A common xorg idiom is used. The dependencies are auto-detected. If they are present, the debugger is build. If any are missing, the debugger is silently skipped. If --enable-shader-debugger is specified, the configuration will abort if any of the dependencies is missing. No user actions is needed, no env variable to set (as it should be) This will fix a number of problems: build cannot start due Makefile missing in tarball. build fails as GEN4ASM variable not available in Makefile. distcheck is also disturbed. In the process other minor problems were fixed: helper target is missing dependencies on evict.h. too may arguments given to pre_cpp.py but they were ignored. fills /tmp with temporary files. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- Makefile.am|8 ++-- configure.ac | 51 +++- debugger/Makefile.am | 27 +-- debugger/system_routine/.gitignore | 12 - debugger/system_routine/GNUmakefile.in |3 - debugger/system_routine/Makefile | 84 debugger/system_routine/Makefile.am| 42 7 files changed, 107 insertions(+), 120 deletions(-) delete mode 100644 debugger/system_routine/GNUmakefile.in delete mode 100644 debugger/system_routine/Makefile create mode 100644 debugger/system_routine/Makefile.am diff --git a/Makefile.am b/Makefile.am index c7ae735..e049e3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,11 +19,11 @@ # 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. -if HAVE_SHADER_DEBUGGER -SHADER_DEBUGGER_SUBDIR = debugger -endif +SUBDIRS = lib man tools scripts tests benchmarks -SUBDIRS = lib man tools scripts tests benchmarks $(SHADER_DEBUGGER_SUBDIR) +if BUILD_SHADER_DEBUGGER +SUBDIRS += debugger +endif test: ${MAKE} -C tests test diff --git a/configure.ac b/configure.ac index b415a97..7265917 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_PATH_PYTHON([3],, [:]) AM_MAINTAINER_MODE # Initialize libtool @@ -65,22 +66,47 @@ if test x$HAVE_GLIB = xyes; then fi AM_CONDITIONAL(HAVE_GLIB, [test x$HAVE_GLIB = xyes]) -AC_ARG_ENABLE(shader-debugger, - AS_HELP_STRING([--enable-shader-debugger], -[Enable shader debugging support [default=no]]), - [SHADER_DEBUGGER=$enableval], - [SHADER_DEBUGGER=no]) -AM_CONDITIONAL(HAVE_SHADER_DEBUGGER, [test x$SHADER_DEBUGGER = xyes]) -if test x$SHADER_DEBUGGER = xyes; then - AC_CHECK_PROG([GEN4ASM], intel-gen4asm, intel-gen4asm) - if test -z $GEN4ASM; then - AC_MSG_ERROR([Cannot find intel-gen4asm in your path; please set GEN4ASM env variable]) +# - +# Configuration options +# - +# Define a configure option for the shadder debugger +AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], +[Enable shader debugging support [autodetected]]), +[BUILD_SHADER_DEBUGGER=$enableval], [BUILD_SHADER_DEBUGGER=auto]) + +# Shadder debugger depends on python3, intel-genasm and objcopy +if test x$BUILD_SHADER_DEBUGGER != xno; then +# Check Python 3 is installed +if test $PYTHON = : ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, python version 3 not found.]) + else + BUILD_SHADER_DEBUGGER=no + fi +fi +# Check for the Intel Chipset assembler compiler +AC_PATH_PROGS([GEN4ASM], intel-gen4asm) +if test -z $GEN4ASM ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, but intel-gen4asm not found.]) else - AC_CONFIG_FILES([debugger/system_routine/GNUmakefile]) - AC_DEFINE(HAVE_SHADER_DEBUGGER, 1, [Have shader debugging support]) + BUILD_SHADER_DEBUGGER=no fi +fi +# Check for the objcopy GNU binary utiliy command +AC_PATH_PROGS([OBJCOPY], objcopy) +if test -z $OBJCOPY ; then + if test x$BUILD_SHADER_DEBUGGER = xyes; then + AC_MSG_ERROR([Shader debugger requested, but objcopy command not found.]) + else + BUILD_SHADER_DEBUGGER=no + fi +fi fi +AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test x$BUILD_SHADER_DEBUGGER != xno]) +# - + AC_CONFIG_FILES([ Makefile benchmarks/Makefile @@ -90,5 +116,6 @@ AC_CONFIG_FILES([ tests/Makefile tools/Makefile debugger/Makefile +
[PATCH intel-gpu-tools v2 2/6] Benchmark: use correct src and build location
Headers are found under top_srcdir/... Haeders are CPP flags, not C Flags AM_CPPFLAGS, AM_CFLAGS and LDAAD apply to all targets. libintel_tools.la is located in top_builddir. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- benchmarks/Makefile.am | 29 - 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index bc0a533..a80a2f6 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -1,23 +1,10 @@ -NULL=# -bin_PROGRAMS = $(NULL) +bin_PROGRAMS = \ + intel_upload_blit_large \ + intel_upload_blit_large_gtt \ + intel_upload_blit_large_map \ + intel_upload_blit_small -bin_PROGRAMS += \ - intel_upload_blit_large \ - intel_upload_blit_large_gtt \ - intel_upload_blit_large_map \ - intel_upload_blit_small \ - $(NULL) - -BENCHMARK_LIBS = \ - ../lib/libintel_tools.la \ - $(DRM_LIBS) - -intel_upload_blit_large_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_large_gtt_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_large_map_LDADD = $(BENCHMARK_LIBS) -intel_upload_blit_small_LDADD = $(BENCHMARK_LIBS) - -AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ - -I$(srcdir)/.. \ - -I$(srcdir)/../lib +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) +LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools v2 3/6] lib: fix include directives, alphabetize sources
Headers are found under top_srcdir/... Haeders are CPP flags, not C Flags Signed-off-by: Gaetan Nadon mems...@videotron.ca --- lib/Makefile.am | 45 + 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index ca93410..9607fcb 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,28 +1,25 @@ -NULL=# -AM_CFLAGS = $(CWARNFLAGS) -I$(srcdir)/.. -libintel_tools_la_SOURCES = \ - intel_batchbuffer.h \ - intel_batchbuffer.c \ - intel_chipset.h \ - intel_gpu_tools.h \ - intel_mmio.c \ - intel_pci.c \ - intel_reg.h \ - i915_3d.h \ - i915_reg.h \ - i830_reg.h \ - intel_reg_map.c \ - intel_drm.c \ - instdone.c \ - instdone.h \ - drmtest.h \ - drmtest.c \ - debug.h \ - $(NULL) - -AM_CFLAGS += $(DRM_CFLAGS) +noinst_LTLIBRARIES = libintel_tools.la +AM_CPPFLAGS = -I$(top_srcdir) +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) -noinst_LTLIBRARIES = libintel_tools.la +libintel_tools_la_SOURCES =\ + debug.h \ + drmtest.c \ + drmtest.h \ + i830_reg.h \ + i915_3d.h \ + i915_reg.h \ + instdone.c \ + instdone.h \ + intel_batchbuffer.c \ + intel_batchbuffer.h \ + intel_chipset.h \ + intel_drm.c \ + intel_gpu_tools.h \ + intel_mmio.c\ + intel_pci.c \ + intel_reg.h \ + intel_reg_map.c -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools 4/6] scripts: use PYTHON primary directive for python scripts
Should it become installlable in the future, it will get compiled at installation time by Automake. Because it is source, they get included in the tarball/ Signed-off-by: Gaetan Nadon mems...@videotron.ca --- scripts/Makefile.am |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index dad9cf7..baf3612 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,6 +1,3 @@ -noinst_SCRIPTS = \ - throttle.py\ - who.sh \ - $(NULL) -EXTRA_DIST = $(noinst_SCRIPTS) +dist_noinst_SCRIPTS = who.sh +noinst_PYTHON = throttle.py -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools v2 5/6] tools: use correct src and build location
Headers are found under top_srcdir/ Haeders are CPP flags, not C Flags libintel_tools.la is located in top_builddir. Use dist_bin_SCRIPTS so it is included in tarball Line-up the line continuation characters Signed-off-by: Gaetan Nadon mems...@videotron.ca --- tools/Makefile.am | 78 1 files changed, 36 insertions(+), 42 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 4969a11..220c2b3 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,48 +1,42 @@ -bin_PROGRAMS = \ - intel_disable_clock_gating \ - intel_audio_dump \ - intel_backlight \ - intel_bios_dumper \ - intel_bios_reader \ - intel_error_decode \ - intel_gpu_top \ - intel_gpu_time \ - intel_gtt \ - intel_stepping \ - intel_reg_checker \ - intel_reg_dumper \ - intel_reg_snapshot \ - intel_reg_write \ - intel_reg_read \ - forcewaked \ - $(NULL) -bin_SCRIPTS = intel_gpu_abrt \ - $(NULL) - -noinst_PROGRAMS = \ - intel_dump_decode \ - intel_lid \ - $(NULL) - -intel_dump_decode_SOURCES = \ - intel_dump_decode.c \ - intel_decode.c \ +bin_PROGRAMS = \ + intel_disable_clock_gating \ + intel_audio_dump\ + intel_backlight \ + intel_bios_dumper \ + intel_bios_reader \ + intel_error_decode \ + intel_gpu_top \ + intel_gpu_time \ + intel_gtt \ + intel_stepping \ + intel_reg_checker \ + intel_reg_dumper\ + intel_reg_snapshot \ + intel_reg_write \ + intel_reg_read \ + forcewaked + +noinst_PROGRAMS = \ + intel_dump_decode \ + intel_lid + +dist_bin_SCRIPTS = intel_gpu_abrt + +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) +LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) + +intel_dump_decode_SOURCES =\ + intel_dump_decode.c \ + intel_decode.c \ intel_decode.h -intel_error_decode_SOURCES = \ - intel_error_decode.c \ - intel_decode.c \ +intel_error_decode_SOURCES = \ + intel_error_decode.c\ + intel_decode.c \ intel_decode.h -intel_bios_reader_SOURCES = \ - intel_bios_reader.c \ +intel_bios_reader_SOURCES =\ + intel_bios_reader.c \ intel_bios.h - -EXTRA_DIST = $(bin_SCRIPTS) - -LDADD = ../lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) - -AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \ - -I$(srcdir)/.. \ - -I$(srcdir)/../lib -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH intel-gpu-tools v2 6/6] config: remove unused AC_DEFINE for CAIRO, LIBUDEV and GLIB
Only the AM_CONDITIONAL is used. Signed-off-by: Gaetan Nadon mems...@videotron.ca --- configure.ac |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 7265917..f58a8f5 100644 --- a/configure.ac +++ b/configure.ac @@ -49,21 +49,12 @@ PKG_CHECK_MODULES(DRM, [libdrm_intel = 2.4.23 libdrm]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess = 0.10]) PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) -if test x$HAVE_CAIRO = xyes; then - AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) -fi AM_CONDITIONAL(HAVE_CAIRO, [test x$HAVE_CAIRO = xyes]) PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) -if test x$HAVE_LIBUDEV = xyes; then - AC_DEFINE(HAVE_LIBUDEV, 1, [Have libudev support]) -fi AM_CONDITIONAL(HAVE_LIBUDEV, [test x$HAVE_LIBUDEV = xyes]) PKG_CHECK_MODULES(GLIB, glib-2.0, [HAVE_GLIB=yes], [HAVE_GLIB=no]) -if test x$HAVE_GLIB = xyes; then - AC_DEFINE(HAVE_GLIB, 1, [Have glib support]) -fi AM_CONDITIONAL(HAVE_GLIB, [test x$HAVE_GLIB = xyes]) # - -- 1.7.5.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 3/6 v2] Use sched_yield instead of pthread_yield
Despite the name implying it's a standard part of the POSIX threads API, pthread_yield is actually non-standard and less portable than sched_yield. For instance, Solaris only has sched_yield, and not pthread_yield. Since even the Linux man page suggests using sched_yield, just call that. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- v2: Drop autoconfery as suggested by Mark Kettenis, just use sched_yield everywhere instead. tests/gem_fence_thrash.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c index 8ed4e08..24147de 100644 --- a/tests/gem_fence_thrash.c +++ b/tests/gem_fence_thrash.c @@ -110,7 +110,7 @@ bo_copy (void *_arg) for (n = 0; n 1000; n++) { memcpy (a, b, OBJECT_SIZE); - pthread_yield (); + sched_yield (); } return NULL; -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:intel-gpu-tools 6/6 v2] Fix pthread compiler flags to work on Solaris and with Studio compiler
AC_USE_SYSTEM_EXTENSIONS is used to let autoconf take care of setting the right system defintions for POSIX threads similar extensions to the base POSIX API. Since it will also #define _GNU_SOURCE 1, remove the extra setting to avoid compiler warnings about redefined macros. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- v2: Move addition of #include config.h to this patch, now that it's no longer needed in the sched_yield patch, but is needed for the POSIX threads defines that AC_USE_SYSTEM_EXTENSIONS sets on Solaris. Also remove the _GNU_SOURCE define at the same time, as noted above. configure.ac | 11 --- tests/Makefile.am|2 +- tests/gem_fence_thrash.c |2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 197c622..15ade07 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) +AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE @@ -44,10 +45,10 @@ AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT AC_DISABLE_STATIC AC_PROG_LIBTOOL -# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +# Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.8) + [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.16) XORG_DEFAULT_OPTIONS PKG_CHECK_MODULES(DRM, [libdrm_intel = 2.4.23 libdrm]) @@ -87,6 +88,10 @@ if test x$SHADER_DEBUGGER = xyes; then fi fi +# To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt +XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt]) +AC_SUBST([THREAD_CFLAGS]) + AC_CONFIG_FILES([ Makefile benchmarks/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 770243a..4ff4376 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -103,5 +103,5 @@ endif endif endif -gem_fence_thrash_CFLAGS = $(AM_CFLAGS) -pthread +gem_fence_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_fence_thrash_LDADD = $(LDADD) -lpthread diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c index 24147de..7b67936 100644 --- a/tests/gem_fence_thrash.c +++ b/tests/gem_fence_thrash.c @@ -26,7 +26,7 @@ * */ -#define _GNU_SOURCE +#include config.h #include unistd.h #include stdlib.h -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xrandr-utils 1/8] Initial doc files.
COPYING is taken from xrandr since this package will largely be repackaging code from that tool. README is adapted from libXrandr. Keith Packard is the owner of the xrandr code and thus is primary author of this codebase. Signed-off-by: Bryce Harrington br...@canonical.com --- AUTHORS |1 + COPYING | 21 + README | 25 + 3 files changed, 47 insertions(+), 0 deletions(-) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 README diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000..a690a59 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Keith Packard diff --git a/COPYING b/COPYING new file mode 100644 index 000..c405625 --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. +Copyright © 2002 Hewlett Packard Company, Inc. +Copyright © 2006 Intel Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no representations +about the suitability of this software for any purpose. It is provided as +is without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. diff --git a/README b/README new file mode 100644 index 000..fc4088b --- /dev/null +++ b/README @@ -0,0 +1,25 @@ +libXrandrUtils - High level wrapper utility library for libXrandr + +All questions regarding this software should be directed at the +Xorg mailing list: + +http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + +https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + +git://anongit.freedesktop.org/git/xorg/lib/libXrandrUtils + +http://cgit.freedesktop.org/xorg/lib/libXrandrUtils + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + +http://wiki.x.org/wiki/GitPage + -- 1.7.4.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xrandr-utils 4/8] Copy a few basic structs and enums from xrandr.c into header.
Adopt header style and struct naming scheme from libXrandr's Xrandr.h. In particular, rename enums from foobar_t to XRUFoobar. Signed-off-by: Bryce Harrington br...@canonical.com --- include/X11/extensions/XrandrUtils.h | 47 ++ man/XrandrUtils.man | 21 ++- 2 files changed, 67 insertions(+), 1 deletions(-) diff --git a/include/X11/extensions/XrandrUtils.h b/include/X11/extensions/XrandrUtils.h index e69de29..7542713 100644 --- a/include/X11/extensions/XrandrUtils.h +++ b/include/X11/extensions/XrandrUtils.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2002 Hewlett Packard Company, Inc. + * Copyright © 2006 Intel Corporation + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided as + * is without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + * + * Thanks to Jim Gettys who wrote most of the client side code, + * and part of the server code for randr. + */ + +#ifndef _XRANDR_UTILS_H_ +#define _XRANDR_UTILS_H_ + +typedef enum { + relation_left_of, + relation_right_of, + relation_above, + relation_below, + relation_same_as, +} XRURelation; + +typedef struct { + int x1, y1, x2, y2; +} XRUBox; + +typedef struct { + int x, y; +} XRUPoint; + +#endif /* _XRANDR_UTILS_H_ */ diff --git a/man/XrandrUtils.man b/man/XrandrUtils.man index 1258b81..bea2776 100644 --- a/man/XrandrUtils.man +++ b/man/XrandrUtils.man @@ -14,8 +14,27 @@ .SH DATATYPES +.PP +.B Relations and Geometries +.PP +.nf +typedef enum { + relation_left_of, + relation_right_of, + relation_above, + relation_below, + relation_same_as, +} XRURelation; + typedef struct { -}; + int x1, y1, x2, y2; +} XRUBox; + +typedef struct { + int x, y; +} XRUPoint; +.sp +.fi .SH DESCRIPTION .B XrandrUtils -- 1.7.4.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xrandr-utils 6/8] Refactor geometry structs in xrandr.c to use libXrandrUtil's
Signed-off-by: Bryce Harrington br...@canonical.com --- examples/.gitignore |1 + examples/xrandr.c | 33 + 2 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 examples/.gitignore diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 000..11f9367 --- /dev/null +++ b/examples/.gitignore @@ -0,0 +1 @@ +xrandr diff --git a/examples/xrandr.c b/examples/xrandr.c index 35dff3e..6d921fb 100644 --- a/examples/xrandr.c +++ b/examples/xrandr.c @@ -39,6 +39,7 @@ #include math.h #include config.h +#include XrandrUtils.h static char*program_name; static Display *dpy; @@ -209,26 +210,10 @@ reflection_name (Rotation rotation) return invalid reflection; } -typedef enum _relation { -relation_left_of, -relation_right_of, -relation_above, -relation_below, -relation_same_as, -} relation_t; - typedef struct { intx, y, width, height; } rectangle_t; -typedef struct { -intx1, y1, x2, y2; -} box_t; - -typedef struct { -intx, y; -} point_t; - typedef enum _changes { changes_none = 0, changes_crtc = (1 0), @@ -315,7 +300,7 @@ struct _output { name_t addmode; -relation_t relation; +XRURelationrelation; char *relative_to; intx, y; @@ -446,10 +431,10 @@ transform_point (XTransform *transform, double *xp, double *yp) } static void -path_bounds (XTransform *transform, point_t *points, int npoints, box_t *box) +path_bounds (XTransform *transform, XRUPoint *points, int npoints, XRUBox *box) { inti; -box_t point; +XRUBox point; for (i = 0; i npoints; i++) { double x, y; @@ -474,9 +459,9 @@ path_bounds (XTransform *transform, point_t *points, int npoints, box_t *box) static void mode_geometry (XRRModeInfo *mode_info, Rotation rotation, XTransform *transform, - box_t *bounds) + XRUBox *bounds) { -point_t rect[4]; +XRUPoint rect[4]; intwidth = mode_width (mode_info, rotation); int height = mode_height (mode_info, rotation); @@ -1573,7 +1558,7 @@ apply (void) { XRRModeInfo *old_mode = find_mode_by_xid (crtc_info-mode); int x, y, w, h; - box_t bounds; + XRUBox bounds; if (!old_mode) panic (RRSetConfigFailed, crtc); @@ -1937,8 +1922,8 @@ set_screen_size (void) { XRRModeInfo *mode_info = output-mode_info; int x, y, w, h; - box_t bounds; - + XRUBox bounds; + if (!mode_info) continue; mode_geometry (mode_info, output-rotation, -- 1.7.4.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xrandr-utils 2/8] Initial packaging and directory structure.
This is copied directly from libXrandr with some tweaking based on xrandr configs. Signed-off-by: Bryce Harrington br...@canonical.com --- .gitignore | 78 ++ Makefile.am | 37 autogen.sh | 12 + configure.ac | 61 ++ man/Makefile.am | 19 man/XrandrUtils.man | 32 ++ src/Makefile.am | 18 xrandr-utils.pc.in | 12 + 8 files changed, 269 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 include/X11/extensions/XrandrUtils.h create mode 100644 man/Makefile.am create mode 100644 man/XrandrUtils.man create mode 100644 src/Makefile.am create mode 100644 src/XrandrUtils.c create mode 100644 xrandr-utils.pc.in diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..2b372cc --- /dev/null +++ b/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section is for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add Override patterns for libxrandr-utils +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000..1b5ac68 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Keith Packard not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Keith Packard makes no +# representations about the suitability of this software for any purpose. It +# is provided as is without express or implied warranty. +# +# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +SUBDIRS = man src + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xrandr-utils.pc + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 000..904cd67 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z $srcdir srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode $@ diff --git a/configure.ac b/configure.ac new file mode 100644 index 000..f2c350f --- /dev/null +++ b/configure.ac @@ -0,0 +1,61 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Keith Packard not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Keith Packard makes no +# representations about the suitability of this
Re: [PATCH v2 xrandr-utils 0/7] Refactor xrandr internals into libxrandr-utils
On Fri, Jan 06, 2012 at 04:36:28PM -0800, Bryce Harrington wrote: This tree is also available in my personal git repository on fdo. ssh://people.freedesktop.org/~bryce/libXrandrUtils Bryce Harrington (7): Initial doc files. Initial packaging and directory structure. Import xrandr.c as an implementation example. Copy a few basic structs and enums from xrandr.c into header. Add unit test suite and a basic test of the geometry structs. Refactor geometry structs in xrandr.c to use libXrandrUtil's Drop rectangle_t. There should not be a patch 8/8, sorry for any confusion from the numbering. Patch #8 is not ready for prime time yet (but included in the git tree). Bryce ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:xscope] Mark panic() as _X_NORETURN
Makes the dependency on x11proto explicit - it was already needed for the X11 headers included in various files, but now needs to be at least 7.0.17 for the _X_NORETURN definition in Xfuncproto.h Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |6 -- proto.h |3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fd444f9..cdf6df6 100644 --- a/configure.ac +++ b/configure.ac @@ -62,11 +62,13 @@ if test x$XTRANS = xyes ; then # Transport selection macro from xtrans.m4 XTRANS_CONNECTION_FLAGS - # Checks for pkg-config packages - PKG_CHECK_MODULES(XSCOPE, xtrans) + XTRANS_PKG='xtrans' AC_DEFINE([USE_XTRANS], [1], [Use xtrans for socket connection code]) fi +# Checks for pkg-config packages +PKG_CHECK_MODULES(XSCOPE, [xproto = 7.0.17 $XTRANS_PKG]) + AC_CHECK_FUNCS([getdtablesize]) AC_CHECK_HEADERS([sys/filio.h]) diff --git a/proto.h b/proto.h index 3c338c7..d86e55b 100644 --- a/proto.h +++ b/proto.h @@ -1,9 +1,10 @@ #include x11.h +#include X11/Xfuncproto.h /* common.c */ extern void enterprocedure (const char *s); extern void warn (const char *s); -extern void panic (const char *s); +extern void panic (const char *s) _X_NORETURN; extern void SetSignalHandling (void); extern void SetUpConnectionSocket (int iport, void (*connectionFunc) (int)); -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel