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

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



 .gitignore                               |    3 
 NEWS                                     |   79 ++
 autogen.sh                               |    4 
 benchmarks/.gitignore                    |    1 
 benchmarks/Makefile.am                   |    7 
 benchmarks/Makefile.sources              |    2 
 benchmarks/ezbench.d/gem_blt.test        |   38 
 benchmarks/ezbench.d/gem_create.test     |   11 
 benchmarks/ezbench.d/gem_exec_ctx.test   |   25 
 benchmarks/ezbench.d/gem_exec_fault.test |   22 
 benchmarks/ezbench.d/gem_exec_nop.test   |   19 
 benchmarks/ezbench.d/gem_exec_reloc.test |   20 
 benchmarks/ezbench.d/gem_exec_trace.test |   19 
 benchmarks/ezbench.d/gem_latency.test    |   79 ++
 benchmarks/ezbench.d/gem_mmap.test       |   14 
 benchmarks/ezbench.d/gem_prw.test        |   20 
 benchmarks/ezbench.d/gem_syslatency.test |   12 
 benchmarks/gem_blt.c                     |   51 -
 benchmarks/gem_create.c                  |   62 +
 benchmarks/gem_exec_ctx.c                |  121 ++-
 benchmarks/gem_exec_fault.c              |  199 +++++
 benchmarks/gem_exec_nop.c                |   93 +-
 benchmarks/gem_exec_reloc.c              |    4 
 benchmarks/gem_latency.c                 |   92 +-
 benchmarks/gem_syslatency.c              |  333 ++++++++
 configure.ac                             |   28 
 debugger/Makefile.am                     |    2 
 demos/Makefile.am                        |    5 
 lib/Makefile.am                          |   12 
 lib/drmtest.c                            |   71 -
 lib/drmtest.h                            |    8 
 lib/igt_aux.c                            |  365 ++++++++-
 lib/igt_aux.h                            |   46 +
 lib/igt_core.c                           |  123 +--
 lib/igt_core.h                           |   67 +
 lib/igt_debugfs.c                        |   40 -
 lib/igt_debugfs.h                        |    1 
 lib/igt_fb.c                             |  208 ++++-
 lib/igt_fb.h                             |   16 
 lib/igt_gt.c                             |  148 ---
 lib/igt_gt.h                             |   42 -
 lib/igt_kms.c                            |  544 +++++++++++++-
 lib/igt_kms.h                            |  147 +++
 lib/igt_stats.h                          |   34 
 lib/intel_chipset.c                      |    2 
 lib/intel_chipset.h                      |   14 
 lib/intel_os.c                           |   55 -
 lib/ioctl_wrappers.c                     |  264 +++---
 lib/ioctl_wrappers.h                     |   18 
 lib/tests/.gitignore                     |    2 
 lib/tests/Makefile.am                    |    2 
 lib/tests/Makefile.sources               |    2 
 lib/tests/igt_exit_handler.c             |  128 +++
 lib/tests/igt_subtest_group.c            |   83 ++
 man/.gitignore                           |    1 
 man/Makefile.am                          |   62 -
 man/intel_aubdump.man                    |   38 
 man/intel_aubdump.rst                    |   55 +
 man/intel_audio_dump.man                 |   11 
 man/intel_audio_dump.rst                 |   30 
 man/intel_bios_dumper.man                |   14 
 man/intel_bios_dumper.rst                |   36 
 man/intel_bios_reader.man                |   15 
 man/intel_bios_reader.rst                |   69 +
 man/intel_error_decode.man               |   20 
 man/intel_error_decode.rst               |   38 
 man/intel_gpu_frequency.man              |   58 -
 man/intel_gpu_frequency.rst              |   79 ++
 man/intel_gpu_top.man                    |   41 -
 man/intel_gpu_top.rst                    |   64 +
 man/intel_gtt.man                        |   14 
 man/intel_gtt.rst                        |   32 
 man/intel_infoframes.man                 |   26 
 man/intel_infoframes.rst                 |   51 +
 man/intel_lid.man                        |   12 
 man/intel_lid.rst                        |   31 
 man/intel_panel_fitter.man               |   50 -
 man/intel_panel_fitter.rst               |   77 ++
 man/intel_reg.rst                        |  106 +-
 man/intel_stepping.man                   |   15 
 man/intel_stepping.rst                   |   37 
 man/intel_upload_blit_large.man          |   18 
 man/intel_upload_blit_large.rst          |   34 
 man/intel_upload_blit_large_gtt.man      |   18 
 man/intel_upload_blit_large_gtt.rst      |   34 
 man/intel_upload_blit_large_map.man      |   18 
 man/intel_upload_blit_large_map.rst      |   34 
 man/intel_upload_blit_small.man          |   18 
 man/intel_upload_blit_small.rst          |   34 
 overlay/Makefile.am                      |    3 
 scripts/Makefile.am                      |    3 
 scripts/intel-gfx-trybot                 |   13 
 scripts/run-tests.sh                     |    2 
 tests/Android.mk                         |    5 
 tests/Makefile.am                        |   20 
 tests/Makefile.sources                   |   37 
 tests/core_getversion.c                  |   10 
 tests/drm_read.c                         |   62 -
 tests/drv_hangman.c                      |   14 
 tests/drv_missed_irq_hang                |   29 
 tests/drv_module_reload_basic            |  115 +--
 tests/gem_bad_reloc.c                    |  158 +---
 tests/gem_busy.c                         |  207 +++++
 tests/gem_close_race.c                   |  178 +---
 tests/gem_concurrent_all.c               |  960 +++++++++++++++----------
 tests/gem_cs_prefetch.c                  |    2 
 tests/gem_ctx_create.c                   |  166 +++-
 tests/gem_ctx_param.c                    |  167 ++++
 tests/gem_ctx_param_basic.c              |  167 ----
 tests/gem_ctx_switch.c                   |  176 ++++
 tests/gem_dummy_reloc_loop.c             |  312 --------
 tests/gem_evict_alignment.c              |   13 
 tests/gem_evict_everything.c             |   14 
 tests/gem_exec_basic.c                   |   65 +
 tests/gem_exec_blt.c                     |   18 
 tests/gem_exec_create.c                  |  168 ++++
 tests/gem_exec_flush.c                   |  598 +++++++++++++++
 tests/gem_exec_gttfill.c                 |  218 +++++
 tests/gem_exec_lut_handle.c              |    6 
 tests/gem_exec_nop.c                     |  171 +++-
 tests/gem_exec_parallel.c                |  291 +++++++
 tests/gem_exec_parse.c                   |  120 +++
 tests/gem_exec_reloc.c                   |  116 +++
 tests/gem_exec_store.c                   |  228 +++++
 tests/gem_exec_suspend.c                 |  268 +++++++
 tests/gem_exec_whisper.c                 |  400 ++++++++++
 tests/gem_mocs_settings.c                |  612 ++++++++++++++++
 tests/gem_multi_bsd_sync_loop.c          |  162 ----
 tests/gem_ppgtt.c                        |   41 -
 tests/gem_pwrite.c                       |  147 +++
 tests/gem_reloc_overflow.c               |  353 +++++----
 tests/gem_render_tiled_blits.c           |    4 
 tests/gem_reset_stats.c                  |    2 
 tests/gem_ring_sync_loop.c               |   12 
 tests/gem_ringfill.c                     |   92 +-
 tests/gem_shrink.c                       |  325 ++++++++
 tests/gem_softpin.c                      |   64 +
 tests/gem_sync.c                         |  101 +-
 tests/kms_addfb_basic.c                  |  208 +++--
 tests/kms_atomic.c                       |    6 
 tests/kms_cursor_legacy.c                |  176 ++++
 tests/kms_draw_crc.c                     |   21 
 tests/kms_fbcon_fbt.c                    |   12 
 tests/kms_flip.c                         |  130 +--
 tests/kms_flip_event_leak.c              |    8 
 tests/kms_frontbuffer_tracking.c         |  167 +++-
 tests/kms_mmap_write_crc.c               |   19 
 tests/kms_panel_fitting.c                |   38 
 tests/kms_pipe_color.c                   | 1184 +++++++++++++++++++++++++++++++
 tests/kms_pipe_crc_basic.c               |   56 -
 tests/kms_plane.c                        |   18 
 tests/kms_render.c                       |   21 
 tests/kms_rotation_crc.c                 |   12 
 tests/kms_setmode.c                      |   46 +
 tests/kms_sink_crc_basic.c               |   36 
 tests/kms_vblank.c                       |    2 
 tests/pm_backlight.c                     |   51 -
 tests/pm_lpsp.c                          |   35 
 tests/pm_rpm.c                           |   87 --
 tests/pm_rps.c                           |   20 
 tests/prime_mmap_coherency.c             |  107 ++
 tests/prime_mmap_kms.c                   |  275 +++++++
 tests/testdisplay.c                      |   20 
 tools/Makefile.am                        |    6 
 tools/intel_audio_dump.c                 |    3 
 tools/intel_bios_reader.c                |  404 +++++++---
 tools/intel_reg.c                        |    2 
 tools/intel_reg_decode.c                 |   18 
 tools/intel_residency.c                  |   15 
 tools/intel_watermark.c                  |   46 -
 tools/registers/cherryview               |    1 
 tools/registers/chv_pipe_b_extra.txt     |  240 ++++++
 172 files changed, 12430 insertions(+), 3572 deletions(-)

New commits:
commit 3ce58b6f9502329d03207a786301d077e7f0cf6c
Author: Marius Vlad <marius.c.vlad@intel.com>
Date:   Tue May 31 18:33:24 2016 +0300

    Updated NEWS, and bumped to 1.15.
    
    Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

diff --git a/NEWS b/NEWS
index 62985cb..fba7ac4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,33 +1,81 @@
-Release 1.15 (XXXX-XX-XX)
+Release 1.15 (2016-05-31)
 -------------------------
 
-- prime_mmap_kms: show case dma-buf new API and processes restrictions
-(Tiago Vignatti)
+- New KMS test: tests/kms_cursor_legacy (Stress legacy cursor ioctl)
+(Chris Wilson)
+
+- Several GEM tests have been removed from BAT: tests/gem_exec_whisper,
+tests/gem_sync (dropped individual engines), test/gem_cs_prefetch (replaced
+by test/gem_exec_gttfill), tests/gem_ctx_param_basic (got relabeled
+to tests/gem_ctx_param) (Chris Wilson)
+
+- build: Skip configure step if is NOCONFIGURE set (Tomeu Vizoso)
+
+- tools/intel_bios_reader: Added options for dumping individual panels, specific
+section, hex format and other various fixes (Jani Nikula)
+
+- build: Add optional --enable-werror
+(hard-fail in case of compiler warnings) (Marius Vlad)
+
+- New KMS test: tests/prime_mmap_kms (show case dma-buf new API
+and processes restrictions) (Tiago Vignatti)
+
+- Several tests have gained to ability to be run on different platforms
+than Intel: tests/testdisplay (Tomeu Vizoso), tests/kms_panel_fitting
+(Robert Foss), tests/kms_flip_event_leak, tests/kms_flip (Tomeu Vizoso).
 
 - compute exitcode first: In the case of running multiple subtests which all
 happen to be skipped, igt_exitcode is 0, but the final exit code will be 77.
 (Chris Wilson)
 
-- Shorten basic tests (Tvrtko Ursulin)
+- Shorten tests/kms_flip test (Tvrtko Ursulin)
 
 - Half the timeout for suspend to RAM and a third for suspend to disk
 (Marius Vlad)
 
 - lib: Pass format instead of bpp to create_bo_for_fb (Ville Syrjälä)
 
-- Removed from tests/test-list.txt, tests/gem_concurrent_all/blt and added 
+- Removed from tests/test-list.txt, tests/gem_concurrent_all and added
 tests/test-list-full.txt that contains all the tests. This will speed
 up considerably piglit when starting tests. (Gabriel Feceoru)
 
 - piglit changed its behaviour to prevent overwriting the results. A fairly new
 version of piglit is required to run i-g-t tests. (Gabriel Feceoru)
 
-- Added COMMIT_ATOMIC (lib/igt_kms, w/ test kms_rotation_crc).
+- lib: Replace drmIoctl() with a layer of indirection (Chris Wilson)
+
+- Adding missing Broxton PCI IDs (Rodrigo Vivi)
+
+- Added COMMIT_ATOMIC (lib/igt_kms, w/ tests/kms_rotation_crc).
 Requires nuclear_pageflip parameter turned on in the i915 driver.
 (Mayuresh Gharpure, Pratik Vishwakarma)
 
+- man/: rewrite manual pages in reStructuredText (Jani Nikula)
+
+- tests/drv_module_reload_basic: perform fault injection (Chris Wilson)
+with various improvements (Imre Deak)
+
+- Removed tests/gem_multi_bsd_sync_loop which was superseded by
+tests/gem_ring_sync_loop and tests/gem_dummy_reloc_loop by
+tests/gem_exec_reloc (Chris Wilson)
+
+- New GEM tests: tests/gem_exec_whisper, tests/gem_exec_store,
+test/gem_exec_gttfill, tests/gem_exec_suspend, tests/gem_exec_flush
+(Chris Wilson)
+
+- New benchmarks: benchmarks/gem_syslatency, benchmarks/gem_exec_fault
+(Chris Wilson)
+
+- tests/gem_exec_nop included in BAT (Chris Wilson)
+
+- tests/pm_rpm: Fix crash on machines that lack LLC (David Weinehall)
+
+- lib/igt_fb: Fix domain tracking for GTT cairo surfaces (Chris Wilson)
+
 - Add igt_subtest_group to allow igt_fixture for only a subset of subtests
-  without skipping/failing all subsequent subtests. (Daniel Vetter)
+without skipping/failing all subsequent subtests. (Daniel Vetter)
+
+- Many more fixes and improvements.
 
 Release 1.14 (2016-03-01)
 -------------------------
diff --git a/configure.ac b/configure.ac
index 11b1d46..0405c8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([intel-gpu-tools],
-	[1.14],
+	[1.15],
 	[https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel],
 	[intel-gpu-tools])
 
@@ -322,7 +322,7 @@ echo "       Overlay            : X: ${enable_overlay_xlib}, Xv: ${enable_overla
 echo "       x86-specific tools : ${build_x86}"
 echo ""
 echo " • API-Documentation      : ${enable_gtk_doc}"
-echo " • Fail on warnings:      : ${enable_werror}"
+echo " • Fail on warnings       : ${enable_werror}"
 echo ""
 
 # vim: set ft=config ts=8 sw=8 tw=0 noet :

commit 7be235c1247a8cf51f55938ef05cb41708924b8f
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date:   Fri Apr 22 11:08:45 2016 +0200

    lib: Actually use provided size when creating BO
    
    When reworking igt_create_fb_with_bo_size to use
    igt_create_bo_with_dimensions, we mistakenly stopped acknowledging
    non-zero size parameters.
    
    To fix this, we move the core of the code to create_bo_for_fb and teach
    it to use the GEM APIs when a size is passed.
    
    igt_create_bo_with_dimensions ends up calling just create_bo_for_fb with
    a zero size because now the later is more generic than the former.
    
    Also, create_bo_for_fb now returns the handle of the BO that was
    created, as there's no point anymore in having it be a parameter passed
    by reference.
    
    Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 3e53d3b..61205f3 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -180,39 +180,24 @@ void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
 	*size_ret = size;
 }
 
-/**
- * igt_create_bo_with_dimensions:
- * @fd: open drm file descriptor
- * @width: width of the buffer object in pixels
- * @height: height of the buffer object in pixels
- * @format: drm fourcc pixel format code
- * @modifier: modifier corresponding to the tiling layout of the buffer object
- * @stride: stride of the buffer object in bytes (0 for automatic stride)
- * @size_ret: size of the buffer object as created by the kernel
- * @stride_ret: stride of the buffer object as created by the kernel
- * @is_dumb: whether the created buffer object is a dumb buffer or not
- *
- * This function allocates a gem buffer object matching the requested
- * properties.
- *
- * Returns:
- * The kms id of the created buffer object.
- */
-int igt_create_bo_with_dimensions(int fd, int width, int height,
-				  uint32_t format, uint64_t modifier,
-				  unsigned stride, unsigned *size_ret,
-				  unsigned *stride_ret, bool *is_dumb)
+/* helpers to create nice-looking framebuffers */
+static int create_bo_for_fb(int fd, int width, int height, uint32_t format,
+			    uint64_t tiling, unsigned size, unsigned stride,
+			    unsigned *size_ret, unsigned *stride_ret,
+			    bool *is_dumb)
 {
 	int bpp = igt_drm_format_to_bpp(format);
 	int bo;
 
-	if (modifier || stride) {
-		unsigned size, calculated_stride;
+	if (tiling || size || stride) {
+		unsigned calculated_size, calculated_stride;
 
-		igt_calc_fb_size(fd, width, height, bpp, modifier, &size,
-				 &calculated_stride);
+		igt_calc_fb_size(fd, width, height, bpp, tiling,
+				 &calculated_size, &calculated_stride);
 		if (stride == 0)
 			stride = calculated_stride;
+		if (size == 0)
+			size = calculated_size;
 
 		if (is_dumb)
 			*is_dumb = false;
@@ -220,7 +205,7 @@ int igt_create_bo_with_dimensions(int fd, int width, int height,
 		if (is_i915_device(fd)) {
 
 			bo = gem_create(fd, size);
-			gem_set_tiling(fd, bo, modifier, stride);
+			gem_set_tiling(fd, bo, tiling, stride);
 
 			if (size_ret)
 				*size_ret = size;
@@ -230,9 +215,9 @@ int igt_create_bo_with_dimensions(int fd, int width, int height,
 
 			return bo;
 		} else {
-			bool driver_has_tiling_support = false;
+			bool driver_has_gem_api = false;
 
-			igt_require(driver_has_tiling_support);
+			igt_require(driver_has_gem_api);
 			return -EINVAL;
 		}
 	} else {
@@ -244,23 +229,31 @@ int igt_create_bo_with_dimensions(int fd, int width, int height,
 	}
 }
 
-/* helpers to create nice-looking framebuffers */
-static int create_bo_for_fb(int fd, int width, int height, uint32_t format,
-			    uint64_t tiling, unsigned bo_size,
-			    unsigned bo_stride, uint32_t *gem_handle_ret,
-			    unsigned *size_ret, unsigned *stride_ret,
-			    bool *is_dumb)
+/**
+ * igt_create_bo_with_dimensions:
+ * @fd: open drm file descriptor
+ * @width: width of the buffer object in pixels
+ * @height: height of the buffer object in pixels
+ * @format: drm fourcc pixel format code
+ * @modifier: modifier corresponding to the tiling layout of the buffer object
+ * @stride: stride of the buffer object in bytes (0 for automatic stride)
+ * @size_ret: size of the buffer object as created by the kernel
+ * @stride_ret: stride of the buffer object as created by the kernel
+ * @is_dumb: whether the created buffer object is a dumb buffer or not
+ *
+ * This function allocates a gem buffer object matching the requested
+ * properties.
+ *
+ * Returns:
+ * The kms id of the created buffer object.
+ */
+int igt_create_bo_with_dimensions(int fd, int width, int height,
+				  uint32_t format, uint64_t modifier,
+				  unsigned stride, unsigned *size_ret,
+				  unsigned *stride_ret, bool *is_dumb)
 {
-	uint32_t gem_handle;
-	int ret = 0;
-
-	gem_handle = igt_create_bo_with_dimensions(fd, width, height, format,
-						   tiling, bo_stride, size_ret,
-						   stride_ret, is_dumb);
-
-	*gem_handle_ret = gem_handle;
-
-	return ret;
+	return create_bo_for_fb(fd, width, height, format, modifier, 0, stride,
+			     size_ret, stride_ret, is_dumb);
 }
 
 /**
@@ -600,9 +593,10 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 
 	igt_debug("%s(width=%d, height=%d, format=0x%x, tiling=0x%"PRIx64", size=%d)\n",
 		  __func__, width, height, format, tiling, bo_size);
-	do_or_die(create_bo_for_fb(fd, width, height, format, tiling, bo_size,
-				   bo_stride, &fb->gem_handle, &fb->size,
-				   &fb->stride, &fb->is_dumb));
+	fb->gem_handle = create_bo_for_fb(fd, width, height, format, tiling,
+					  bo_size, bo_stride, &fb->size,
+					  &fb->stride, &fb->is_dumb);
+	igt_assert(fb->gem_handle > 0);
 
 	igt_debug("%s(handle=%d, pitch=%d)\n",
 		  __func__, fb->gem_handle, fb->stride);
@@ -1006,7 +1000,6 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 	struct fb_blit_upload *blit;
 	cairo_format_t cairo_format;
 	unsigned int obj_tiling = fb_mod_to_obj_tiling(fb->tiling);
-	int ret;
 
 	blit = malloc(sizeof(*blit));
 	igt_assert(blit);
@@ -1016,14 +1009,14 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 	 * cairo). This linear bo will be then blitted to its final
 	 * destination, tiling it at the same time.
 	 */
-	ret = create_bo_for_fb(fd, fb->width, fb->height, fb->drm_format,
-				LOCAL_DRM_FORMAT_MOD_NONE, 0, 0,
-				&blit->linear.handle,
-				&blit->linear.size,
-				&blit->linear.stride,
-				&blit->linear.is_dumb);
-
-	igt_assert(ret == 0);
+	blit->linear.handle = create_bo_for_fb(fd, fb->width, fb->height,
+					       fb->drm_format,
+					       LOCAL_DRM_FORMAT_MOD_NONE, 0,
+					       0, &blit->linear.size,
+					       &blit->linear.stride,
+					       &blit->linear.is_dumb);
+
+	igt_assert(blit->linear.handle > 0);
 
 	blit->fd = fd;
 	blit->fb = fb;

commit 303b380d728bc870c399ba46525854d323f894e7
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Thu May 26 16:02:05 2016 -0700

    igt_core: Search "." as final fallback for igt_fopen_data()
    
    Some validation teams seem to run tests out of source directories that
    have been nfs mounted or rsync'd to different locations on the target
    machine.  This causes the igt_srcdir that the tests were built with to
    be invalid on the machine the tests get run on.  Add the current
    directory as a final fallback for data file searches.
    
    Reference: https://bugs.freedesktop.org/show_bug.cgi?id=92248
    Cc: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
    Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 56061c3..92a875c 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1882,6 +1882,10 @@ FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
 		snprintf(path, sizeof(path), "%s/%s", igt_srcdir, filename);
 		fp = fopen(path, "r");
 	}
+	if (!fp) {
+		snprintf(path, sizeof(path), "./%s", filename);
+		fp = fopen(path, "r");
+	}
 
 	if (!fp)
 		igt_critical("Could not open data file \"%s\": %s", filename,
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 1b62371..5995233 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -842,8 +842,8 @@ FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
  * igt_fopen_data:
  * @filename: filename to open.
  *
- * Open a datafile for test, first try from installation directory
- * then from build directory.
+ * Open a datafile for test, first try from installation directory,
+ * then from build directory, and finally from current directory.
  */
 #define igt_fopen_data(filename) \
 	__igt_fopen_data(IGT_SRCDIR, IGT_DATADIR, filename)

commit 04b8f0e025d92b7b8f08a14c22ebe0686b9ba5ea
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 25 14:53:34 2016 +0100

    igt/kms_cursor_legacy: Fixup !fixture
    
    igt_fixture and its byzantine requirements
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 14281d1..7fa0032 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -132,11 +132,13 @@ igt_main
 
 	igt_subtest_group {
 		for (int n = 0; n < 26; n++) {
-			uint32_t *crtcs = &data.resources->crtcs[n];
+			uint32_t *crtcs = NULL;
 
 			errno = 0;
-			igt_fixture
+			igt_fixture {
 				igt_skip_on(n >= data.resources->count_crtcs);
+				crtcs = &data.resources->crtcs[n];
+			}
 
 			igt_subtest_f("single-%c-bo", 'A' + n)
 				stress(&data, crtcs, 1, 1, DRM_MODE_CURSOR_BO, 20);

commit cce2ff084eeb0e2f95d56b2b1d8b74515c589a9e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 25 08:34:25 2016 +0100

    igt/kms_cursor_legacy: Stress each CRTC individually as well
    
    Just to compare handling of plane->mutexes
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index de63dac..14281d1 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -32,6 +32,7 @@ IGT_TEST_DESCRIPTION("Stress legacy cursor ioctl");
 
 struct data {
 	int fd;
+	drmModeRes *resources;
 };
 
 static uint32_t state = 0x12345678;
@@ -45,9 +46,10 @@ hars_petruska_f54_1_random (void)
 }
 
 static void stress(struct data *data,
-		   int num_children, unsigned mode, int timeout)
+		   uint32_t *crtc_id, unsigned num_crtcs,
+		   int num_children, unsigned mode,
+		   int timeout)
 {
-	drmModeRes *r;
 	struct drm_mode_cursor arg;
 	uint64_t *results;
 	int n;
@@ -55,9 +57,6 @@ static void stress(struct data *data,
 	results = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 	igt_assert(results != MAP_FAILED);
 
-	r = drmModeGetResources(data->fd);
-	igt_assert(r);
-
 	memset(&arg, 0, sizeof(arg));
 	arg.flags = DRM_MODE_CURSOR_BO;
 	arg.crtc_id = 0;
@@ -65,8 +64,10 @@ static void stress(struct data *data,
 	arg.height = 64;
 	arg.handle = gem_create(data->fd, 4*64*64);
 
-	for (n = 0; n < r->count_crtcs; n++)
+	for (n = 0; n < num_crtcs; n++) {
+		arg.crtc_id = crtc_id[n];
 		drmIoctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
+	}
 
 	arg.flags = mode;
 	igt_fork(child, num_children) {
@@ -82,7 +83,7 @@ static void stress(struct data *data,
 
 		state ^= child;
 		igt_until_timeout(timeout) {
-			arg.crtc_id = r->crtcs[hars_petruska_f54_1_random() % r->count_crtcs];
+			arg.crtc_id = crtc_id[hars_petruska_f54_1_random() % num_crtcs];
 			do_ioctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
 			count++;
 		}
@@ -111,7 +112,6 @@ static void stress(struct data *data,
 	}
 
 	gem_close(data->fd, arg.handle);
-	drmModeFreeResources(r);
 	munmap(results, 4096);
 }
 
@@ -125,18 +125,50 @@ igt_main
 	igt_fixture {
 		data.fd = drm_open_driver_master(DRIVER_INTEL);
 		kmstest_set_vt_graphics_mode();
+
+		data.resources = drmModeGetResources(data.fd);
+		igt_assert(data.resources);
 	}
 
-	igt_subtest("single-bo")
-		stress(&data, 1, DRM_MODE_CURSOR_BO, 20);
-	igt_subtest("single-move")
-		stress(&data, 1, DRM_MODE_CURSOR_MOVE, 20);
+	igt_subtest_group {
+		for (int n = 0; n < 26; n++) {
+			uint32_t *crtcs = &data.resources->crtcs[n];
+
+			errno = 0;
+			igt_fixture
+				igt_skip_on(n >= data.resources->count_crtcs);
+
+			igt_subtest_f("single-%c-bo", 'A' + n)
+				stress(&data, crtcs, 1, 1, DRM_MODE_CURSOR_BO, 20);
+			igt_subtest_f("single-%c-move", 'A' + n)
+				stress(&data, crtcs, 1, 1, DRM_MODE_CURSOR_MOVE, 20);
+
+			igt_subtest_f("forked-%c-bo", 'A' + n)
+				stress(&data, crtcs, 1, ncpus, DRM_MODE_CURSOR_BO, 20);
+			igt_subtest_f("forked-%c-move", 'A' + n)
+				stress(&data, crtcs, 1, ncpus, DRM_MODE_CURSOR_MOVE, 20);
+		}
+	}
 
-	igt_subtest("forked-bo")
-		stress(&data, ncpus, DRM_MODE_CURSOR_BO, 20);
-	igt_subtest("forked-move")
-		stress(&data, ncpus, DRM_MODE_CURSOR_MOVE, 20);
+	igt_subtest("single-all-bo")
+		stress(&data,
+		       data.resources->crtcs, data.resources->count_crtcs,
+		       1, DRM_MODE_CURSOR_BO, 20);
+	igt_subtest("single-all-move")
+		stress(&data,
+		       data.resources->crtcs, data.resources->count_crtcs,
+		       1, DRM_MODE_CURSOR_MOVE, 20);
+
+	igt_subtest("forked-all-bo")
+		stress(&data,
+		       data.resources->crtcs, data.resources->count_crtcs,
+		       ncpus, DRM_MODE_CURSOR_BO, 20);
+	igt_subtest("forked-all-move")
+		stress(&data,
+		       data.resources->crtcs, data.resources->count_crtcs,
+		       ncpus, DRM_MODE_CURSOR_MOVE, 20);
 
 	igt_fixture {
+		drmModeFreeResources(data.resources);
 	}
 }

commit c74e07121085bb9d1957e8e8795a2464e43bd592
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue May 24 16:24:15 2016 +0100

    igt/kms_cursor_legacy: Show basic stats of iterations per child
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index aff3ff5..de63dac 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -26,6 +26,7 @@
 #include <sched.h>
 
 #include "igt.h"
+#include "igt_stats.h"
 
 IGT_TEST_DESCRIPTION("Stress legacy cursor ioctl");
 
@@ -48,8 +49,12 @@ static void stress(struct data *data,
 {
 	drmModeRes *r;
 	struct drm_mode_cursor arg;
+	uint64_t *results;
 	int n;
 
+	results = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+	igt_assert(results != MAP_FAILED);
+
 	r = drmModeGetResources(data->fd);
 	igt_assert(r);
 
@@ -82,12 +87,32 @@ static void stress(struct data *data,
 			count++;
 		}
 
-		igt_info("[%d] count=%lu\n", child, count);
+		igt_debug("[%d] count=%lu\n", child, count);
+		results[child] = count;
 	}
 	igt_waitchildren();
 
+	if (num_children > 1) {
+		igt_stats_t stats;
+
+		igt_stats_init_with_size(&stats, num_children);
+		results[num_children] = 0;
+		for (int child = 0; child < num_children; child++) {
+			igt_stats_push(&stats, results[child]);
+			results[num_children] += results[child];
+		}
+		igt_info("Total updates %llu (median of %d processes is %.2f)\n",
+			 (long long)results[num_children],
+			 num_children,
+			 igt_stats_get_median(&stats));
+		igt_stats_fini(&stats);
+	} else {
+		igt_info("Total updates %llu\n", (long long)results[0]);
+	}
+
 	gem_close(data->fd, arg.handle);
 	drmModeFreeResources(r);
+	munmap(results, 4096);
 }
 
 igt_main

commit dab6b6b62dce6baf041ea5387af197626737c8a2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue May 24 16:14:32 2016 +0100

    igt/kms_cursor_legacy: Add uncontended cursor updates
    
    Looking at the uncontended cases reveals a major contention cliff.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 84c74e3..aff3ff5 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -43,7 +43,8 @@ hars_petruska_f54_1_random (void)
 #undef rol
 }
 
-static void stress(struct data *data, unsigned mode, int timeout)
+static void stress(struct data *data,
+		   int num_children, unsigned mode, int timeout)
 {
 	drmModeRes *r;
 	struct drm_mode_cursor arg;
@@ -63,7 +64,7 @@ static void stress(struct data *data, unsigned mode, int timeout)
 		drmIoctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
 
 	arg.flags = mode;
-	igt_fork(child, sysconf(_SC_NPROCESSORS_ONLN)) {
+	igt_fork(child, num_children) {
 		struct sched_param rt = {.sched_priority = 99 };
 		cpu_set_t allowed;
 		unsigned long count = 0;
@@ -91,6 +92,7 @@ static void stress(struct data *data, unsigned mode, int timeout)
 
 igt_main
 {
+	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
 	struct data data = { .fd = -1 };
 
 	igt_skip_on_simulation();
@@ -100,10 +102,15 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 	}
 
-	igt_subtest("stress-bo")
-		stress(&data, DRM_MODE_CURSOR_BO, 20);
-	igt_subtest("stress-move")
-		stress(&data, DRM_MODE_CURSOR_MOVE, 20);
+	igt_subtest("single-bo")
+		stress(&data, 1, DRM_MODE_CURSOR_BO, 20);
+	igt_subtest("single-move")
+		stress(&data, 1, DRM_MODE_CURSOR_MOVE, 20);
+
+	igt_subtest("forked-bo")
+		stress(&data, ncpus, DRM_MODE_CURSOR_BO, 20);
+	igt_subtest("forked-move")
+		stress(&data, ncpus, DRM_MODE_CURSOR_MOVE, 20);
 
 	igt_fixture {
 	}

commit 2da624e28ce7485a1c67e7650355b5273d88d690
Author: Derek Morton <derek.j.morton@intel.com>
Date:   Tue May 24 15:32:35 2016 +0100

    tests/Android.mk: Update cairo dependant test list
    
    drm_read
    gem_exec_blt
    prime_mmap_kms
    Have cairo dependency through igt_kms.c so add to skip_tests_list
    to fix android build errors.
    
    Signed-off-by: Derek Morton <derek.j.morton@intel.com>
    Reviewed-by: Tim Gore <tim.gore@intel.com>
    Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

diff --git a/tests/Android.mk b/tests/Android.mk
index 8457125..3186a2a 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -56,7 +56,10 @@ else
 # the following tests depend on cairo, so skip them
     skip_tests_list += \
     gem_render_copy \
-    pm_lpsp
+    pm_lpsp \
+	drm_read \
+	gem_exec_blt \
+	prime_mmap_kms
 
 # All kms tests depend on cairo
     tmp_list := $(foreach test_name, $(TESTS_progs),\

commit 9c67adfe88786cb0a1f4fcc4ff11cdaeeaa617cb
Author: Feceoru, Gabriel <gabriel.feceoru@intel.com>
Date:   Tue May 17 15:05:47 2016 +0300

    tests: Moved gem_concurrent_blit back to the normal set
    
    Repairing the damage I caused not reading properly Daniel's comment in:
    https://patchwork.freedesktop.org/patch/81600/
    
    Leaving gem_concurrent_all only in the EXTRA set
    
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Marius Vlad <marius.c.vlad@intel.com>
    Acked-By: Daniel Vetter <daniel.vetter@intel.com>
    Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
    Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 96740f0..c81eeeb 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -20,6 +20,7 @@ TESTS_progs_M = \
 	gem_busy \
 	gem_caching \
 	gem_close_race \
+	gem_concurrent_blit \
 	gem_create \
 	gem_cs_tlb \
 	gem_ctx_bad_exec \
@@ -121,7 +122,6 @@ TESTS_progs_M = \
 	$(NULL)
 
 TESTS_progs_XM = \
-    gem_concurrent_blit \
     gem_concurrent_all \
     $(NULL)
 

commit e4e18ddc59155ba30b2df30cc9dfd18767b03cec
Author: Robert Foss <robert.foss@collabora.com>
Date:   Fri May 20 18:59:30 2016 -0400

    tests/gem_render_tiled_blits: Switched to new aliases of intel specific functions.
    
    Switched from drm_XXX aliases drm_intel_XXX aliases for symbols where that
    switch is possible.
    
    Signed-off-by: Robert Foss <robert.foss@collabora.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
index fb2f39d..9f0e588 100644
--- a/tests/gem_render_tiled_blits.c
+++ b/tests/gem_render_tiled_blits.c
@@ -72,7 +72,7 @@ check_bo(struct intel_batchbuffer *batch, struct igt_buf *buf, uint32_t val)
 
 	render_copy(batch, NULL, buf, 0, 0, WIDTH, HEIGHT, &tmp, 0, 0);
 	if (snoop) {
-		do_or_die(dri_bo_map(linear, 0));
+		do_or_die(drm_intel_bo_map(linear, 0));
 		ptr = linear->virtual;
 	} else {
 		do_or_die(drm_intel_bo_get_subdata(linear, 0, sizeof(data), data));
@@ -86,7 +86,7 @@ check_bo(struct intel_batchbuffer *batch, struct igt_buf *buf, uint32_t val)
 		val++;
 	}
 	if (ptr != data)
-		dri_bo_unmap(linear);
+		drm_intel_bo_unmap(linear);
 }
 
 static void run_test (int fd, int count)

commit 29f080d5fb942badc8f02d459bc9174a23e9ee7c
Author: Robert Foss <robert.foss@collabora.com>
Date:   Fri May 20 18:59:29 2016 -0400

    tests/gem_ppgtt: Switched to new aliases of intel specific functions.
    
    Switched from drm_XXX aliases drm_intel_XXX aliases for symbols where that
    switch is possible.
    
    Signed-off-by: Robert Foss <robert.foss@collabora.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index 1a620ad..eb15ca5 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -74,11 +74,11 @@ static void scratch_buf_init(struct igt_buf *buf,
 
 static void scratch_buf_fini(struct igt_buf *buf)
 {
-	dri_bo_unreference(buf->bo);
+	drm_intel_bo_unreference(buf->bo);
 	memset(buf, 0, sizeof(*buf));
 }
 
-static void fork_rcs_copy(int target, dri_bo **dst, int count, unsigned flags)
+static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned flags)
 #define CREATE_CONTEXT 0x1
 {
 	igt_render_copyfunc_t render_copy;
@@ -143,7 +143,7 @@ static void fork_rcs_copy(int target, dri_bo **dst, int count, unsigned flags)
 	}
 }
 
-static void fork_bcs_copy(int target, dri_bo **dst, int count)
+static void fork_bcs_copy(int target, drm_intel_bo **dst, int count)
 {
 	int devid;
 
@@ -167,7 +167,7 @@ static void fork_bcs_copy(int target, dri_bo **dst, int count)
 		igt_assert(batch);
 
 		for (int i = 0; i <= target; i++) {
-			dri_bo *src[2];
+			drm_intel_bo *src[2];
 
 			src[0] = create_bo(dst[child]->bufmgr,
 					   ~0);
@@ -177,13 +177,13 @@ static void fork_bcs_copy(int target, dri_bo **dst, int count)
 			intel_copy_bo(batch, src[0], src[1], SIZE);
 			intel_copy_bo(batch, dst[child], src[0], SIZE);
 
-			dri_bo_unreference(src[1]);
-			dri_bo_unreference(src[0]);
+			drm_intel_bo_unreference(src[1]);
+			drm_intel_bo_unreference(src[0]);
 		}
 	}


Reply to: