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

intel-gpu-tools: Changes to 'upstream-unstable'



 .gitignore                               |    7 
 Makefile.am                              |   13 
 NEWS                                     |   59 
 README                                   |   47 
 assembler/.gitignore                     |   18 
 assembler/Makefile.am                    |   51 
 assembler/README                         |    9 
 assembler/TODO                           |   14 
 assembler/brw_compat.h                   |   67 
 assembler/brw_context.c                  |   44 
 assembler/brw_context.h                  |   78 
 assembler/brw_defines.h                  | 1642 ++++++++++++++++
 assembler/brw_disasm.c                   | 1348 +++++++++++++
 assembler/brw_eu.c                       |  268 ++
 assembler/brw_eu.h                       |  427 ++++
 assembler/brw_eu_compact.c               |  810 ++++++++
 assembler/brw_eu_debug.c                 |   92 
 assembler/brw_eu_emit.c                  | 2627 ++++++++++++++++++++++++++
 assembler/brw_eu_util.c                  |  125 +
 assembler/brw_reg.h                      |  808 ++++++++
 assembler/brw_structs.h                  | 1493 +++++++++++++++
 assembler/disasm-main.c                  |  172 +
 assembler/doc/Makefile.am                |    3 
 assembler/doc/examples/packed_yuv_sf.g4a |   17 
 assembler/doc/examples/packed_yuv_wm.g4a |  161 +
 assembler/gen4asm.h                      |  227 ++
 assembler/gram.y                         | 3051 +++++++++++++++++++++++++++++++
 assembler/intel-gen4asm.pc.in            |   10 
 assembler/lex.l                          |  441 ++++
 assembler/main.c                         |  520 +++++
 assembler/ralloc.c                       |  482 ++++
 assembler/ralloc.h                       |  407 ++++
 assembler/test/.gitignore                |   24 
 assembler/test/Makefile.am               |   93 
 assembler/test/break.expected            |    1 
 assembler/test/break.g4a                 |    6 
 assembler/test/cont.expected             |    1 
 assembler/test/cont.g4a                  |    6 
 assembler/test/declare.expected          |    3 
 assembler/test/declare.g4a               |    5 
 assembler/test/else.expected             |    1 
 assembler/test/else.g4a                  |    1 
 assembler/test/endif.expected            |    1 
 assembler/test/endif.g4a                 |    1 
 assembler/test/frc.expected              |    1 
 assembler/test/frc.g4a                   |    1 
 assembler/test/halt.expected             |    1 
 assembler/test/halt.g4a                  |    1 
 assembler/test/if.expected               |    1 
 assembler/test/if.g4a                    |    1 
 assembler/test/iff.expected              |    1 
 assembler/test/iff.g4a                   |    1 
 assembler/test/immediate.expected        |    3 
 assembler/test/immediate.g4a             |    3 
 assembler/test/jmpi.expected             |    1 
 assembler/test/jmpi.g4a                  |    1 
 assembler/test/lzd.expected              |    1 
 assembler/test/lzd.g4a                   |    1 
 assembler/test/mov.expected              |    1 
 assembler/test/mov.g4a                   |    1 
 assembler/test/not.expected              |    1 
 assembler/test/not.g4a                   |    1 
 assembler/test/rndd.expected             |    1 
 assembler/test/rndd.g4a                  |    1 
 assembler/test/rnde-intsrc.expected      |    1 
 assembler/test/rnde-intsrc.g4a           |    2 
 assembler/test/rnde.expected             |    1 
 assembler/test/rnde.g4a                  |    1 
 assembler/test/rndu.expected             |    1 
 assembler/test/rndu.g4a                  |    1 
 assembler/test/rndz.expected             |    1 
 assembler/test/rndz.g4a                  |    1 
 assembler/test/run-test.sh               |   11 
 assembler/test/wait.expected             |    1 
 assembler/test/wait.g4a                  |    1 
 assembler/test/while.expected            |    1 
 assembler/test/while.g4a                 |    1 
 autogen.sh                               |    2 
 configure.ac                             |  189 +
 debugger/Makefile.am                     |    1 
 debugger/system_routine/Makefile.am      |    4 
 demos/intel_sprite_on.c                  | 1395 ++++++--------
 lib/Makefile.am                          |    1 
 lib/drmtest.c                            | 1890 ++++++++++++++++---
 lib/drmtest.h                            |  295 ++
 lib/gen7_render.h                        | 1496 +++++++++++++--
 lib/i830_reg.h                           |    3 
 lib/intel_batchbuffer.c                  |   62 
 lib/intel_batchbuffer.h                  |    7 
 lib/intel_chipset.h                      |  374 ++-
 lib/intel_drm.c                          |   16 
 lib/intel_gpu_tools.h                    |   11 
 lib/intel_iosf.c                         |   85 
 lib/intel_mmio.c                         |   54 
 lib/intel_pci.c                          |   42 
 lib/intel_reg.h                          |   60 
 lib/rendercopy.h                         |    7 
 lib/rendercopy_gen7.c                    |  941 +++------
 lib/rendercopy_i830.c                    |   16 
 m4/ax_pkg_swig.m4                        |  135 +
 m4/ax_python_devel.m4                    |  324 +++
 m4/ax_swig_python.m4                     |   64 
 man/intel_lid.man                        |    2 
 overlay/.gitignore                       |    1 
 overlay/Makefile.am                      |   70 
 overlay/README                           |    8 
 overlay/chart.c                          |  236 ++
 overlay/chart.h                          |   65 
 overlay/config.c                         |  301 +++
 overlay/cpu-top.c                        |   83 
 overlay/cpu-top.h                        |   45 
 overlay/debugfs.c                        |   69 
 overlay/debugfs.h                        |   33 
 overlay/gem-interrupts.c                 |  113 +
 overlay/gem-interrupts.h                 |   39 
 overlay/gem-objects.c                    |  161 +
 overlay/gem-objects.h                    |   45 
 overlay/gpu-freq.c                       |  170 +
 overlay/gpu-freq.h                       |   47 
 overlay/gpu-perf.c                       |  405 ++++
 overlay/gpu-perf.h                       |   70 
 overlay/gpu-top.c                        |  323 +++
 overlay/gpu-top.h                        |   64 
 overlay/i915_pciids.h                    |  211 ++
 overlay/igfx.c                           |  241 ++
 overlay/igfx.h                           |   44 
 overlay/kms/kms-overlay.c                |  334 +++
 overlay/overlay.c                        |  936 +++++++++
 overlay/overlay.h                        |  104 +
 overlay/perf.c                           |   26 
 overlay/perf.h                           |   64 
 overlay/power.c                          |  146 +
 overlay/power.h                          |   47 
 overlay/rc6.c                            |  179 +
 overlay/rc6.h                            |   53 
 overlay/x11/dri2.c                       |  174 +
 overlay/x11/dri2.h                       |   30 
 overlay/x11/position.c                   |  212 ++
 overlay/x11/position.h                   |   38 
 overlay/x11/rgb2yuv.c                    |  129 +
 overlay/x11/rgb2yuv.h                    |   36 
 overlay/x11/x11-overlay.c                |  368 +++
 overlay/x11/x11-window.c                 |  177 +
 scripts/list-workarounds                 |  110 +
 tests/.gitignore                         |   44 
 tests/Makefile.am                        |  208 +-
 tests/ZZ_hangman                         |   58 
 tests/ddi_compute_wrpll.c                |  633 ++++++
 tests/ddx_intel_after_fbdev              |   73 
 tests/debugfs_emon_crash                 |    2 
 tests/debugfs_reader                     |    2 
 tests/debugfs_wedged                     |    4 
 tests/drm_get_client_auth.c              |   84 
 tests/drm_lib.sh                         |   33 
 tests/drm_vma_limiter.c                  |   15 
 tests/drm_vma_limiter_cached.c           |    9 
 tests/drm_vma_limiter_cpu.c              |   11 
 tests/drm_vma_limiter_gtt.c              |   11 
 tests/flip_test.c                        |  317 ---
 tests/gem_bad_address.c                  |    1 
 tests/gem_bad_batch.c                    |    1 
 tests/gem_bad_blit.c                     |    1 
 tests/gem_bad_length.c                   |   14 
 tests/gem_basic.c                        |   21 
 tests/gem_caching.c                      |  305 +++
 tests/gem_concurrent_blit.c              |  377 +++
 tests/gem_cpu_concurrent_blit.c          |  142 -
 tests/gem_cpu_reloc.c                    |  218 ++
 tests/gem_cs_prefetch.c                  |   22 
 tests/gem_cs_tlb.c                       |  180 +
 tests/gem_ctx_bad_destroy.c              |   32 
 tests/gem_ctx_bad_exec.c                 |   63 
 tests/gem_ctx_basic.c                    |   38 
 tests/gem_ctx_create.c                   |   13 
 tests/gem_ctx_exec.c                     |   40 
 tests/gem_double_irq_loop.c              |   13 
 tests/gem_dummy_reloc_loop.c             |  124 -
 tests/gem_evict_alignment.c              |  221 ++
 tests/gem_evict_everything.c             |  364 +++
 tests/gem_exec_bad_domains.c             |  184 +
 tests/gem_exec_big.c                     |  126 +
 tests/gem_exec_blt.c                     |   23 
 tests/gem_exec_faulting_reloc.c          |   30 
 tests/gem_exec_lut_handle.c              |  205 ++
 tests/gem_exec_nop.c                     |   66 
 tests/gem_fence_thrash.c                 |  170 +
 tests/gem_fenced_exec_thrash.c           |   57 
 tests/gem_flink.c                        |   93 
 tests/gem_flink_race.c                   |  206 ++
 tests/gem_gtt_concurrent_blit.c          |  145 -
 tests/gem_gtt_cpu_tlb.c                  |    8 
 tests/gem_gtt_speed.c                    |   45 
 tests/gem_hang.c                         |    3 
 tests/gem_hangcheck_forcewake.c          |    3 
 tests/gem_largeobject.c                  |    7 
 tests/gem_linear_blits.c                 |   68 
 tests/gem_lut_handle.c                   |  245 ++
 tests/gem_mmap.c                         |   75 
 tests/gem_mmap_gtt.c                     |   94 
 tests/gem_mmap_offset_exhaustion.c       |    6 
 tests/gem_non_secure_batch.c             |  123 +
 tests/gem_partial_pwrite_pread.c         |  119 -
 tests/gem_persistent_relocs.c            |  376 +++
 tests/gem_pin.c                          |  247 ++
 tests/gem_pipe_control_store_loop.c      |  106 -
 tests/gem_pread.c                        |  153 +
 tests/gem_pread_after_blit.c             |  138 +
 tests/gem_pwrite.c                       |   89 
 tests/gem_pwrite_pread.c                 |  527 +++++
 tests/gem_readwrite.c                    |  150 -
 tests/gem_reg_read.c                     |   52 
 tests/gem_reloc_overflow.c               |  262 ++
 tests/gem_reloc_vs_gpu.c                 |  239 ++
 tests/gem_render_linear_blits.c          |  182 +
 tests/gem_render_tiled_blits.c           |  165 +
 tests/gem_ring_sync_loop.c               |   18 
 tests/gem_ringfill.c                     |   68 
 tests/gem_seqno_wrap.c                   |  675 ++++++
 tests/gem_set_tiling_vs_blt.c            |   77 
 tests/gem_set_tiling_vs_gtt.c            |   12 
 tests/gem_set_tiling_vs_pwrite.c         |   10 
 tests/gem_storedw_batches_loop.c         |   38 
 tests/gem_storedw_loop_blt.c             |   28 
 tests/gem_storedw_loop_bsd.c             |   28 
 tests/gem_storedw_loop_render.c          |   28 
 tests/gem_storedw_loop_vebox.c           |  140 +
 tests/gem_stress.c                       |   74 
 tests/gem_suspend.c                      |  117 +
 tests/gem_threaded_access_tiled.c        |  124 +
 tests/gem_tiled_blits.c                  |  103 -
 tests/gem_tiled_fence_blits.c            |    7 
 tests/gem_tiled_partial_pwrite_pread.c   |  120 -
 tests/gem_tiled_pread.c                  |    4 
 tests/gem_tiled_pread_pwrite.c           |   13 
 tests/gem_tiled_swapping.c               |   44 
 tests/gem_tiling_max_stride.c            |  151 +
 tests/gem_unfence_active_buffers.c       |    5 
 tests/gem_unref_active_buffers.c         |    9 
 tests/gem_vmap_blits.c                   |    9 
 tests/gem_wait_render_timeout.c          |   40 
 tests/gem_write_read_ring_switch.c       |  204 ++
 tests/gen3_mixed_blits.c                 |   18 
 tests/gen3_render_linear_blits.c         |    7 
 tests/gen3_render_mixed_blits.c          |   12 
 tests/gen3_render_tiledx_blits.c         |   12 
 tests/gen3_render_tiledy_blits.c         |   12 
 tests/getclient.c                        |    4 
 tests/getstats.c                         |    2 
 tests/getversion.c                       |    8 
 tests/igt_fork_helper.c                  |   36 
 tests/kms_flip.c                         | 1498 +++++++++++++++
 tests/kms_render.c                       |  257 ++
 tests/kms_setmode.c                      |  729 +++++++
 tests/module_reload                      |    5 
 tests/pc8.c                              |  789 ++++++++
 tests/prime_nv_api.c                     |  357 ++-
 tests/prime_nv_pcopy.c                   |  102 -
 tests/prime_nv_test.c                    |  368 ---
 tests/prime_self_import.c                |  349 +++
 tests/prime_udl.c                        |  192 +
 tests/sysfs_edid_timing                  |    7 
 tests/sysfs_rc6_residency.c              |   30 
 tests/sysfs_rps.c                        |  194 +
 tests/test_rte_check                     |    8 
 tests/testdisplay.c                      |  340 +--
 tests/tools_test                         |   18 
 tools/.gitignore                         |    8 
 tools/Makefile.am                        |   12 
 tools/intel_bios_dumper.c                |    2 
 tools/intel_error_decode.c               |  635 +++---
 tools/intel_forcewaked.c                 |    5 
 tools/intel_framebuffer_dump.c           |  111 +
 tools/intel_gpu_abrt                     |   69 
 tools/intel_gpu_top.c                    |    4 
 tools/intel_gtt.c                        |   87 
 tools/intel_infoframes.c                 |   98 
 tools/intel_iosf_read.c                  |   70 
 tools/intel_l3_parity.c                  |    2 
 tools/intel_lid.c                        |    2 
 tools/intel_nc_read.c                    |   70 
 tools/intel_nc_write.c                   |   75 
 tools/intel_perf_counters.c              |  333 +++
 tools/intel_punit_read.c                 |   70 
 tools/intel_punit_write.c                |   75 
 tools/intel_reg_dumper.c                 |  824 +++++++-
 tools/intel_reg_snapshot.c               |    5 
 tools/quick_dump/.gitignore              |    2 
 tools/quick_dump/Makefile.am             |   31 
 tools/quick_dump/base_display.txt        |  197 ++
 tools/quick_dump/base_interrupt.txt      |   20 
 tools/quick_dump/base_other.txt          |    7 
 tools/quick_dump/base_power.txt          |   21 
 tools/quick_dump/base_rings.txt          |   33 
 tools/quick_dump/chipset.i               |   32 
 tools/quick_dump/gen6_other.txt          |    1 
 tools/quick_dump/gen7_other.txt          |    1 
 tools/quick_dump/haswell                 |    1 
 tools/quick_dump/haswell_other.txt       |    7 
 tools/quick_dump/intel_chipset.c         |   28 
 tools/quick_dump/ivybridge               |    1 
 tools/quick_dump/quick_dump.py           |   72 
 tools/quick_dump/reg_access.py           |   57 
 tools/quick_dump/sandybridge             |    1 
 tools/quick_dump/valleyview              |    8 
 tools/quick_dump/vlv_display.txt         |   97 
 tools/quick_dump/vlv_dpio.txt            |   53 
 tools/quick_dump/vlv_dsi.txt             |  108 +
 tools/quick_dump/vlv_power.txt           |   14 
 308 files changed, 43574 insertions(+), 4968 deletions(-)

New commits:
commit be28ba071baf33afa1852ed0fd9b4efee699cdbd
Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Date:   Mon Sep 16 16:37:08 2013 -0300

    bump version to 1.4 and add the release date
    
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

diff --git a/NEWS b/NEWS
index 59e6617..c438843 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Release 1.4
+Release 1.4 (2013-09-16)
 -----------
 
 - Integration of the gen4+ assembler (Damien).
diff --git a/configure.ac b/configure.ac
index 9eafe63..d5c65c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([intel-gpu-tools],
-	[1.3],
+	[1.4],
 	[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 	[intel-gpu-tools])
 

commit a33d5576232bf7caf14c848828d632c3da886ee1
Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Date:   Fri Sep 13 16:54:56 2013 -0300

    NEWS: Fix dates of previous releases
    
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

diff --git a/NEWS b/NEWS
index bde1e74..59e6617 100644
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@ Release 1.4
   http://blog.ffwll.ch/2013/08/recent-drmi915-testsuite-improvements.html
   for an overview.
 
-Release 1.3 (2013-08-07)
+Release 1.3 (2012-08-27)
 ------------------------
 
 - massive improvements to the testsuite
@@ -45,7 +45,7 @@ Release 1.2 (2012-02-09)
 - fixed up intel_reg_read/write for platforms needing forcewake (needs a
   kernel patch which from 3.3 to work on ivb - Ben Widawsky)
 
-Release 1.1 (2011-12-23)
+Release 1.1 (2011-12-24)
 ------------------------
 
 Improved testsuite, usable for kernel regression testing!

commit 564a1dd99355ee0c626e43e4d547730c93b640c6
Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Date:   Mon Sep 16 15:34:27 2013 -0300

    overlay: fix link error due to missing -lrt
    
    CC: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

diff --git a/overlay/Makefile.am b/overlay/Makefile.am
index 426a3df..c648875 100644
--- a/overlay/Makefile.am
+++ b/overlay/Makefile.am
@@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \
 
 intel_gpu_overlay_SOURCES += $(both_x11_sources)
 
+intel_gpu_overlay_LDADD = $(LDADD) -lrt
+
 EXTRA_DIST=README

commit a031a1bf93b828585e7147f06145fc5030814547
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 13 16:43:22 2013 +0200

    lib/drmtest: ducttape over fork race
    
    Whatever the reason (and I've thought there isn't one) if we fork and
    kill right away the child seems to not reliably die. We can work
    around this little race by forcing the default SIGQUIT handler. This
    should break anything since we reset our atexit handling anyway, so if
    the helper needs any atexit handling the special signal helpers will
    be reinstated.
    
    Note that inserting sufficient amounts of printf between the fork and
    kill makes this unnecessary.
    
    While add it also add the retry loop for the waitpid call, in case
    there's another guy constantly interrupting us.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 1ba8cad..a3ff0d6 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -981,6 +981,7 @@ static void fork_helper_exit_handler(int sig)
 bool __igt_fork_helper(struct igt_helper_process *proc)
 {
 	pid_t pid;
+	sighandler_t oldsig;
 	int id;
 
 	assert(!proc->running);
@@ -991,6 +992,13 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
 
 	igt_install_exit_handler(fork_helper_exit_handler);
 
+	/*
+	 * XXX: There's a race between fork and the subsequent kill in
+	 * igt_stop_signal_helper if we don't ovewrite the SIGQUIT handler. Note
+	 * that inserting sufficient amounts of printf or other delays makes
+	 * this unnecessary.
+	 */
+	oldsig = signal(SIGQUIT, SIG_DFL);
 	switch (pid = fork()) {
 	case -1:
 		igt_assert(0);
@@ -1000,6 +1008,8 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
 
 		return true;
 	default:
+		signal(SIGQUIT, oldsig);
+
 		proc->running = true;
 		proc->pid = pid;
 		proc->id = id;
@@ -1023,7 +1033,9 @@ void igt_stop_helper(struct igt_helper_process *proc)
 	assert(proc->running);
 
 	assert(kill(proc->pid, SIGQUIT) == 0);
-	waitpid(proc->pid, &status, 0);
+	while (waitpid(proc->pid, &status, 0) == -1 &&
+	       errno == -EINTR)
+		;
 
 	proc->running = false;
 

commit 9298dfabd9658315df34616b1e9a10b3579a92bd
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 13 16:38:59 2013 +0200

    lib: add test for igt_fork_signal_helper
    
    If we're really fast we've trying to stop the signal helper again
    we somehow race somewhere and it'll never happen. So add a testcase for
    this. Since I expect more to come for testsuite tests add a separate
    make target for them. Run tests with
    
    $ make check
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/.gitignore b/tests/.gitignore
index f87010a..c75a6a4 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -93,6 +93,7 @@ gen3_render_tiledy_blits
 getclient
 getstats
 getversion
+igt_fork_helper
 kms_flip
 kms_render
 kms_setmode
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0cd151a..82ccb2b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,6 +5,7 @@ noinst_PROGRAMS = \
 	$(TESTS_progs) \
 	$(TESTS_progs_M) \
 	$(HANG) \
+	$(TESTS_testsuite)
 	$(NULL)
 
 if HAVE_NOUVEAU
@@ -151,7 +152,12 @@ kernel_tests = \
 	$(multi_kernel_tests) \
 	$(NULL)
 
+TESTS_testsuite = \
+	igt_fork_helper \
+	$(NULL)
+
 TESTS = \
+	$(TESTS_testsuite) \
 	$(NULL)
 
 list-single-tests:
@@ -179,7 +185,7 @@ scripts = \
 	drm_lib.sh \
 	$(NULL)
 
-EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG)
+EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite)
 EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts)
 CLEANFILES = $(EXTRA_PROGRAMS)
 
diff --git a/tests/igt_fork_helper.c b/tests/igt_fork_helper.c
new file mode 100644
index 0000000..a66ecde
--- /dev/null
+++ b/tests/igt_fork_helper.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright © 2013 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.
+ *
+ * Authors:
+ *    Daniel Vetter <daniel.vetter@ffwll.ch>
+ *
+ */
+
+#include "drmtest.h"
+
+int main(int argc, char **argv)
+{
+	for (int i = 0; i < 1000; i++) {
+		igt_fork_signal_helper();
+		igt_stop_signal_helper();
+	}
+}

commit 32f9c497957cf165a359d8b2c11f4d18dd5f743a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 13 16:28:15 2013 +0100

    NEWS: smelling fixes

diff --git a/NEWS b/NEWS
index cb5672e..bde1e74 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ Release 1.4
   counter kernel patches from Chris.
 
 - New register dumper quick_dump from Ben, with lots of work from Damien. This
-  will superseed intel_reg_dumper for newer platforms (which aren't yet
+  will superseed intel_reg_dumper for newer platforms (which are not yet
   released) since it will allow us to automatically generate register dumps from
   the internal xml register specifications.
 
@@ -19,7 +19,7 @@ Release 1.4
   The advantage here is that this bypasses any userspace drivers and so avoids
   that the corruptions get magically fixed when taking an X screenshot.
 
-- Tons of new testcases. Including subtests we're not at roughly 450 tests!
+- Tons of new testcases. Including subtests we are now at roughly 450 tests!
 
 - Improvements to the test framework infrastructure. See
   http://blog.ffwll.ch/2013/08/recent-drmi915-testsuite-improvements.html

commit 35ee50769e5ae24189ae353c2f719191dcf049ce
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 13 17:02:07 2013 +0200

    initial release notes for the next release
    
    Please amend/improve.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/NEWS b/NEWS
index b119128..cb5672e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,30 @@
+Release 1.4
+-----------
+
+- Integration of the gen4+ assembler (Damien).
+
+- Start of a new performance analysis tool from Chris Wilson with front-ends for
+  both X11 and plain kms. This uses the perf subsystem and the gpu performance
+  counter kernel patches from Chris.
+
+- New register dumper quick_dump from Ben, with lots of work from Damien. This
+  will superseed intel_reg_dumper for newer platforms (which aren't yet
+  released) since it will allow us to automatically generate register dumps from
+  the internal xml register specifications.
+
+- Tools to access the pletoria of new indirect register access functions on
+  newer platforms.
+
+- Framebuffer contents dumper to debug some of the nastier corruption issues.
+  The advantage here is that this bypasses any userspace drivers and so avoids
+  that the corruptions get magically fixed when taking an X screenshot.
+
+- Tons of new testcases. Including subtests we're not at roughly 450 tests!
+
+- Improvements to the test framework infrastructure. See
+  http://blog.ffwll.ch/2013/08/recent-drmi915-testsuite-improvements.html
+  for an overview.
+
 Release 1.3 (2013-08-07)
 ------------------------
 

commit 030c9c0f917155555bd09ff268c5defda6e94982
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 13 17:01:38 2013 +0200

    reconstruct NEWS file for the releases thus far
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..b119128
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,32 @@
+Release 1.3 (2013-08-07)
+------------------------
+
+- massive improvements to the testsuite
+- dpf tool for handling l3 remapping on gen7 (Ben)
+- robustify against wc gtt mappings (Chris)
+- improvements to the reg_dumper and register read/write tools
+- haswell support
+
+Release 1.2 (2012-02-09)
+------------------------
+
+- intel_audio_dump improvements (Wu Fengguang)
+- buildsystem improvements (Gaetan Nadon)
+- solaris support (Alan Coopersmith)
+- massive refactoring of testcases and rendercpy extraction
+- new tests
+- fixed up intel_reg_read/write for platforms needing forcewake (needs a
+  kernel patch which from 3.3 to work on ivb - Ben Widawsky)
+
+Release 1.1 (2011-12-23)
+------------------------
+
+Improved testsuite, usable for kernel regression testing!
+
+Release 1.0 (2009-04-27)
+------------------------
+
+Initial release:
+- miscellaneous userland tools that don't really fit into the 2D driver tree
+- standalone regression tests for the DRM (make check)
+- microbenchmarks of the DRM for kernel performance regression testing

commit 25dfea28a574988fa60278396433b65014ada809
Author: Damien Lespiau <damien.lespiau@intel.com>
Date:   Fri Sep 13 16:00:05 2013 +0100

    overlay: Fix stale mention to x11-position.c
    
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

diff --git a/overlay/Makefile.am b/overlay/Makefile.am
index 395b8ed..426a3df 100644
--- a/overlay/Makefile.am
+++ b/overlay/Makefile.am
@@ -47,7 +47,7 @@ intel_gpu_overlay_SOURCES += \
 endif
 
 if BUILD_OVERLAY_XVLIB
-both_x11_sources = x11/x11-position.c
+both_x11_sources = x11/position.c
 AM_CFLAGS += $(OVERLAY_XVLIB_CFLAGS) $(XRANDR_CFLAGS)
 LDADD += $(OVERLAY_XVLIB_LIBS) $(XRANDR_LIBS)
 intel_gpu_overlay_SOURCES += \

commit 3fda0b6714ae503e365ae6f130ae7b4074881b70
Author: Eero Tamminen <eero.t.tamminen@intel.com>
Date:   Fri Sep 13 15:32:43 2013 +0100

    man: Fixes typo in intel_lid.man
    
    Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

diff --git a/man/intel_lid.man b/man/intel_lid.man
index d06af79..fd554e8 100644
--- a/man/intel_lid.man
+++ b/man/intel_lid.man
@@ -2,7 +2,7 @@
 .ds q \N'34'
 .TH intel_lid __appmansuffix__ __xorgversion__
 .SH NAME
-intel_ \- Polls the values of different reports about laptop lid state.
+intel_lid \- Polls the values of different reports about laptop lid state.
 .SH SYNOPSIS
 .B intel_lid
 .SH DESCRIPTION

commit 932716dd918a25ee49a4c8a9931a9a65dfd60486
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Sep 12 14:00:09 2013 +0200

    lib/drmtest: skip suspend tests in simulation
    
    The simulator doesn't like this nor really support it :(
    
    v2: We've tried to a more gentle resume testing using the pm_test
    infrastructure, but that alos failed. So add a FIXME comment that we
    need to improve things a bit here.
    
    Cc: Ben Widawsky <benjamin.widawsky@intel.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index abd45b6..1ba8cad 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -2087,6 +2087,11 @@ void igt_system_suspend_autoresume(void)
 {
 	int ret;
 
+	/* FIXME: Simulation doesn't like suspend/resume, and not even a lighter
+	 * approach using /sys/power/pm_test to just test our driver's callbacks
+	 * seems to fare better. We need to investigate what's going on. */
+	igt_skip_on_simulation();
+
 	ret = system("rtcwake -s 30 -m mem");
 	igt_assert(ret == 0);
 }

commit 506ef293abfc83a79ae1e58193ee88bce5c667ce
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Sep 12 12:56:20 2013 +0200

    lib/drmtest: drop unused oldsig variabel
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 9d4c5da..abd45b6 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -981,7 +981,6 @@ static void fork_helper_exit_handler(int sig)
 bool __igt_fork_helper(struct igt_helper_process *proc)
 {
 	pid_t pid;
-	sighandler_t oldsig;
 	int id;
 
 	assert(!proc->running);

commit 212de08d0fd679069886d673fb719582f597503c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Sep 11 15:46:43 2013 +0200

    lib/drmtest: Restore default sighandlers
    
    Forked tests ended up restoring the sighandlers already inherited
    from the parent, resulting in endless signal loops through our
    atexit handler.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 0d4aa55..9d4c5da 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -1734,8 +1734,8 @@ static int install_sig_handler(int sig_num, sighandler_t handler)
 
 static void restore_sig_handler(int sig_num)
 {
-	if (orig_sig[sig_num].installed)
-		signal(sig_num, orig_sig[sig_num].handler);
+	/* Just restore the default so that we properly fall over. */
+	signal(sig_num, SIG_DFL);
 }
 
 static void restore_all_sig_handler(void)

commit 661f252f7e3ccb8fe936f2582d234408b8bb4764
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Sep 11 15:05:20 2013 +0200

    lib/drmtest: don't frob signals in __igt_fork_helper
    
    We shut up the exit handlers already by clearing the array.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index f2590d7..0d4aa55 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -992,7 +992,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
 
 	igt_install_exit_handler(fork_helper_exit_handler);
 
-	oldsig = signal(SIGQUIT, SIG_DFL);
 	switch (pid = fork()) {
 	case -1:
 		igt_assert(0);
@@ -1002,7 +1001,6 @@ bool __igt_fork_helper(struct igt_helper_process *proc)
 
 		return true;
 	default:
-		signal(SIGQUIT, oldsig);
 		proc->running = true;
 		proc->pid = pid;
 		proc->id = id;

commit 9fb316a6db16cd8cddba719d7acbdf068f9238ee
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Sep 11 14:29:00 2013 +0200

    lib/drmtest: clean up children in an exit handler
    
    Also be a bit more careful with killing them in general.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 969854c..f2590d7 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -967,8 +967,10 @@ static void fork_helper_exit_handler(int sig)
 			/* Someone forgot to fill up the array? */
 			assert(pid != 0);
 
-			kill(pid, SIGQUIT);
-			waitpid(pid, &status, 0);
+			assert(kill(pid, SIGQUIT) == 0);
+			while (waitpid(pid, &status, 0) == -1 &&
+			       errno == -EINTR)
+				;
 			helper_process_count--;
 		}
 	}
@@ -1023,7 +1025,7 @@ void igt_stop_helper(struct igt_helper_process *proc)
 
 	assert(proc->running);
 
-	kill(proc->pid, SIGQUIT);
+	assert(kill(proc->pid, SIGQUIT) == 0);
 	waitpid(proc->pid, &status, 0);
 
 	proc->running = false;
@@ -1032,11 +1034,29 @@ void igt_stop_helper(struct igt_helper_process *proc)
 	helper_process_count--;
 }
 
+static void children_exit_handler(int sig)
+{
+	assert(!test_child);
+
+	for (int nc = 0; nc < num_test_children; nc++) {
+		int status = -1;
+		assert(kill(test_children[nc], SIGQUIT) == 0);
+
+		while (waitpid(test_children[nc], &status, 0) == -1 &&
+		       errno == -EINTR)
+			;
+	}
+
+	num_test_children = 0;
+}
+
 bool __igt_fork(void)
 {
 	assert(!test_with_subtests || in_subtest);
 	assert(!test_child);
 
+	igt_install_exit_handler(children_exit_handler);
+
 	if (num_test_children >= test_children_sz) {
 		if (!test_children_sz)
 			test_children_sz = 4;

commit 1978aecf1d22f21265d64099e70565d6e5e384cc
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Sep 11 14:03:47 2013 +0200

    tests/gem_persisten_relocs: Update like gem_reloc_vs_pug
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/gem_persistent_relocs.c b/tests/gem_persistent_relocs.c
index bc1d52a..b76d770 100644
--- a/tests/gem_persistent_relocs.c
+++ b/tests/gem_persistent_relocs.c
@@ -284,10 +284,9 @@ static void do_test(int fd, bool faulting_reloc)
 static void do_forked_test(int fd, unsigned flags)
 {
 	int num_threads = sysconf(_SC_NPROCESSORS_ONLN);
-	pid_t pid = -1;
+	struct igt_helper_process thrasher = {};
 
 	if (flags & (THRASH | THRASH_INACTIVE)) {
-		sighandler_t oldsig;
 		char fname[FILENAME_MAX];
 		int drop_caches_fd;
 		const char *data = THRASH_INACTIVE ? "0xf" : "0x7";
@@ -299,10 +298,7 @@ static void do_forked_test(int fd, unsigned flags)
 		drop_caches_fd = open(fname, O_WRONLY);
 		igt_require(drop_caches_fd >= 0);
 
-		oldsig = signal(SIGQUIT, SIG_DFL);
-		pid = fork();
-		signal(SIGQUIT, oldsig);
-		if (pid == 0) {
+		igt_fork_helper(&thrasher) {
 			while (1) {
 				usleep(1000);
 				igt_assert(write(drop_caches_fd, data, strlen(data) + 1) == strlen(data) + 1);
@@ -325,13 +321,8 @@ static void do_forked_test(int fd, unsigned flags)
 	}
 
 	igt_waitchildren();
-
-	if (pid != -1) {
-		int exitcode;
-
-		kill(pid, SIGQUIT);
-		wait(&exitcode);
-	}
+	if (flags & (THRASH | THRASH_INACTIVE))
+		igt_stop_helper(&thrasher);
 }
 
 int fd;
@@ -370,7 +361,7 @@ int main(int argc, char **argv)
 			      flags & INTERRUPT ? "-interruptible" : "",
 			      flags & FAULTING ? "-faulting-reloc" : "",
 			      flags & THRASH ? "-thrashing" : "",
-			      flags & THRASH ? "-thrash-inactive" : "")
+			      flags & THRASH_INACTIVE ? "-thrash-inactive" : "")
 			do_forked_test(fd, flags);
 	}
 

commit 5dc424f70d34add563ed86875d6167ab16a7a764
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Sep 11 13:59:18 2013 +0200

    tests/gem_reloc_vs_gpu: some fixes
    
    - Clear the igt_helper_process struct to avoid hitting asserts.
    - Fix up the logic for enumerating forked processes.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
index 8c28cbc..cab726e 100644
--- a/tests/gem_reloc_vs_gpu.c
+++ b/tests/gem_reloc_vs_gpu.c
@@ -281,7 +281,7 @@ static void do_test(int fd, bool faulting_reloc)
 static void do_forked_test(int fd, unsigned flags)
 {
 	int num_threads = sysconf(_SC_NPROCESSORS_ONLN);
-	struct igt_helper_process thrasher;
+	struct igt_helper_process thrasher = {};
 
 	if (flags & (THRASH | THRASH_INACTIVE)) {


Reply to: