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

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



 NEWS                                       |   22 
 README                                     |    6 
 benchmarks/.gitignore                      |    3 
 benchmarks/Makefile.am                     |    5 
 benchmarks/Makefile.sources                |    3 
 benchmarks/README                          |    9 
 benchmarks/gem_blt.c                       |  312 ++++++
 benchmarks/gem_exec_ctx.c                  |   24 
 benchmarks/gem_exec_reloc.c                |    8 
 benchmarks/gem_set_domain.c                |  119 ++
 benchmarks/gem_wait.c                      |  303 ++++++
 benchmarks/intel_upload_blit_large.c       |    7 
 benchmarks/intel_upload_blit_large_gtt.c   |    8 
 benchmarks/intel_upload_blit_large_map.c   |    8 
 benchmarks/intel_upload_blit_small.c       |    8 
 configure.ac                               |    4 
 debugger/eudb.c                            |    2 
 demos/intel_sprite_on.c                    |    4 
 docs/reference/intel-gpu-tools/Makefile.am |    7 
 lib/drmtest.c                              |   46 
 lib/drmtest.h                              |   18 
 lib/igt.cocci                              |   30 
 lib/igt_aux.c                              |    8 
 lib/igt_core.c                             |   77 +
 lib/igt_core.h                             |   45 
 lib/igt_debugfs.c                          |   31 
 lib/igt_debugfs.h                          |   12 
 lib/igt_draw.c                             |    3 
 lib/igt_fb.c                               |   38 
 lib/igt_fb.h                               |    3 
 lib/igt_kms.c                              |   18 
 lib/igt_kms.h                              |    7 
 lib/instdone.c                             |   10 
 lib/instdone.h                             |    3 
 lib/intel_chipset.h                        |   70 +
 lib/ioctl_wrappers.c                       |   95 +
 lib/ioctl_wrappers.h                       |   25 
 lib/tests/.gitignore                       |    1 
 lib/tests/Makefile.sources                 |    1 
 lib/tests/igt_assert.c                     |  173 +++
 lib/tests/igt_segfault.c                   |    7 
 m4/ax_pkg_swig.m4                          |  135 --
 m4/ax_python_devel.m4                      |  324 ------
 m4/ax_swig_python.m4                       |   64 -
 overlay/gem-interrupts.c                   |    7 
 overlay/power.c                            |    2 
 scripts/display_debug.sh                   |  172 ---
 scripts/quick-testlist.py                  |   46 
 scripts/run-tests.sh                       |    2 
 tests/.gitignore                           |    6 
 tests/Makefile.am                          |    1 
 tests/Makefile.sources                     |    6 
 tests/core_auth.c                          |  161 +++
 tests/core_prop_blob.c                     |  301 ++++++
 tests/core_setmaster_vs_auth.c             |   76 +
 tests/ddx_intel_after_fbdev                |    8 
 tests/drm_auth.c                           |  161 ---
 tests/drm_import_export.c                  |   10 
 tests/drm_read.c                           |   58 +
 tests/drv_suspend.c                        |   10 
 tests/gem_bad_reloc.c                      |    8 
 tests/gem_concurrent_all.c                 |   94 +
 tests/gem_cs_prefetch.c                    |   10 
 tests/gem_ctx_exec.c                       |    9 
 tests/gem_ctx_param_basic.c                |    8 
 tests/gem_evict_everything.c               |    1 
 tests/gem_exec_big.c                       |    4 
 tests/gem_exec_faulting_reloc.c            |    5 
 tests/gem_exec_lut_handle.c                |    6 
 tests/gem_exec_nop.c                       |    4 
 tests/gem_fence_thrash.c                   |    7 
 tests/gem_fence_upload.c                   |   10 
 tests/gem_gtt_cpu_tlb.c                    |    4 
 tests/gem_gtt_hog.c                        |    8 
 tests/gem_gtt_speed.c                      |   27 
 tests/gem_largeobject.c                    |    3 
 tests/gem_madvise.c                        |    8 
 tests/gem_mmap.c                           |    2 
 tests/gem_mmap_gtt.c                       |   42 
 tests/gem_mmap_offset_exhaustion.c         |    3 
 tests/gem_mmap_wc.c                        |    7 
 tests/gem_persistent_relocs.c              |    6 
 tests/gem_pin.c                            |    4 
 tests/gem_ppgtt.c                          |   55 +
 tests/gem_pwrite.c                         |    1 
 tests/gem_pwrite_pread.c                   |   12 
 tests/gem_pwrite_snooped.c                 |   10 
 tests/gem_reg_read.c                       |    2 
 tests/gem_reloc_overflow.c                 |    2 
 tests/gem_reloc_vs_gpu.c                   |    5 
 tests/gem_render_linear_blits.c            |    2 
 tests/gem_render_tiled_blits.c             |    2 
 tests/gem_request_retire.c                 |  236 ++++
 tests/gem_set_tiling_vs_gtt.c              |    3 
 tests/gem_set_tiling_vs_pwrite.c           |    3 
 tests/gem_storedw_loop.c                   |    6 
 tests/gem_streaming_writes.c               |   24 
 tests/gem_tiled_pread_basic.c              |    3 
 tests/gem_tiled_pread_pwrite.c             |    5 
 tests/gem_tiled_swapping.c                 |   23 
 tests/gem_tiled_wb.c                       |    4 
 tests/gem_tiled_wc.c                       |    3 
 tests/gem_tiling_max_stride.c              |    3 
 tests/gem_userptr_blits.c                  |   11 
 tests/gen3_mixed_blits.c                   |    7 
 tests/gen3_render_mixed_blits.c            |    7 
 tests/gen3_render_tiledx_blits.c           |    7 
 tests/gen3_render_tiledy_blits.c           |    7 
 tests/gen7_forcewake_mt.c                  |    2 
 tests/kms_3d.c                             |    6 
 tests/kms_addfb_basic.c                    |   10 
 tests/kms_atomic.c                         | 1404 +++++++++++++++++++++++++++++
 tests/kms_cursor_crc.c                     |   42 
 tests/kms_draw_crc.c                       |    6 
 tests/kms_fbc_crc.c                        |    2 
 tests/kms_flip.c                           |   63 +
 tests/kms_force_connector.c                |   70 +
 tests/kms_frontbuffer_tracking.c           |  689 ++++++++++----
 tests/kms_panel_fitting.c                  |    2 
 tests/kms_pipe_b_c_ivb.c                   |   30 
 tests/kms_pipe_crc_basic.c                 |    6 
 tests/kms_plane_scaling.c                  |    2 
 tests/kms_psr_sink_crc.c                   |    3 
 tests/kms_rotation_crc.c                   |  270 +++++
 tests/kms_setmode.c                        |   26 
 tests/kms_universal_plane.c                |  107 ++
 tests/pm_backlight.c                       |   20 
 tests/pm_lpsp.c                            |    1 
 tests/pm_rc6_residency.c                   |   35 
 tests/pm_rpm.c                             |  133 ++
 tests/prime_self_import.c                  |    6 
 tests/testdisplay.c                        |   10 
 tools/Makefile.am                          |    2 
 tools/aubdump.c                            |    2 
 tools/intel_audio_dump.c                   |   13 
 tools/intel_display_poller.c               |    2 
 tools/intel_error_decode.c                 |    3 
 tools/intel_gpu_abrt                       |    2 
 tools/intel_gpu_frequency.c                |    2 
 tools/intel_reg_decode.c                   |    1 
 140 files changed, 5251 insertions(+), 1577 deletions(-)

New commits:
commit 2db78a4995a8ee298ae0cd68879baf80407a0e5e
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Dec 2 16:46:39 2015 +0000

    Update version to 1.13 and add the release date
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/NEWS b/NEWS
index 471117e..0ccac8a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Release 1.13 (XXXX-XX-XX)
+Release 1.13 (2015-12-02)
 -------------------------
 
 - New test: kms_atomic tests atomic mode setting (Daniel Stone)
diff --git a/configure.ac b/configure.ac
index 97de58a..ddfe696 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([intel-gpu-tools],
-	[1.12],
+	[1.13],
 	[https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel],
 	[intel-gpu-tools])
 

commit 17c6b5caf37bccd4a38d7d310cb53ea23a23b5f8
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Dec 2 16:45:42 2015 +0000

    NEWS: Updates
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/NEWS b/NEWS
index 65081c4..471117e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,25 @@
+Release 1.13 (XXXX-XX-XX)
+-------------------------
+
+- New test: kms_atomic tests atomic mode setting (Daniel Stone)
+
+- New test: core_prop_blob tests blob properties (Daniel Stone)
+
+- New test: gem_request_retire targets request retirement code paths
+  (Tvrtko Ursulin)
+
+- New test: core_setmaster_vs_auth checks that drop/setMaster correctly
+  transfer master state (Thomas Hellstrom/Daniel Vetter)
+
+- Wildcard characters are now accepted when using the --run-subtest command
+  line option to specify multiple subtests to run. (Thomas Wood)
+
+- Add support for Broxton in intel_audio_dump (Han Lu)
+
+- Added Kabylake support (Rodrigo Vivi/Wayne Boyer)
+
+- Many other bug fixes and improvements
+
 Release 1.12 (2015-09-11)
 -------------------------
 

commit 498fb6205e62c34495ea5ef09a9c156b9cf61f2f
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Dec 2 16:35:50 2015 +0000

    docs: remove references to tests/NAMING-CONVENTION
    
    The tests/NAMING-CONVENTION file has been removed and its contents is
    now included in the API documentation.
    
    Reported-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/README b/README
index 6235655..c7195d9 100644
--- a/README
+++ b/README
@@ -45,9 +45,9 @@ tests/
 	  -t <regex>      only include tests that match the regular expression
 	  -x <regex>      exclude tests that match the regular expression
 
-	Useful patterns for test filtering are described in
-	tests/NAMING-CONVENTION and the full list of tests and subtests can be
-	produced by passing -l to the run-tests.sh script.
+	Useful patterns for test filtering are described in the API
+	documentation and the full list of tests and subtests can be produced
+	by passing -l to the run-tests.sh script.
 
 	Results are written to a JSON file and an HTML summary can also be
 	created by passing -s to the run-tests.sh script. Further options are
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index d72fc05..99e6124 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -64,7 +64,7 @@ function print_help {
 	echo "  -n              do not retry incomplete tests when resuming a"
 	echo "                  test run with -R"
 	echo ""
-	echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION"
+	echo "Useful patterns for test filtering are described in the API documentation."
 }
 
 function list_tests {

commit 97bf3f9a55dbe20614479cbce63c0966f8e25df1
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Dec 2 10:49:03 2015 +0000

    tests/core_setmaster_vs_auth: add test description macro
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/tests/core_setmaster_vs_auth.c b/tests/core_setmaster_vs_auth.c
index 44ec752..7830333 100644
--- a/tests/core_setmaster_vs_auth.c
+++ b/tests/core_setmaster_vs_auth.c
@@ -45,6 +45,9 @@
 # include <pthread.h>
 #endif
 
+IGT_TEST_DESCRIPTION("Check that drop/setMaster correctly transfer master "
+		     "state");
+
 igt_simple_main
 {
 	int master1, master2, client;

commit 66dc90ed658fe345d98ef0f287df383c3b2f4a2c
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Wed Dec 2 10:46:33 2015 +0000

    tests/core_setmaster_vs_auth: use igt_simple_main
    
    This test has no subtests, so should use igt_simple_main.
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/tests/core_setmaster_vs_auth.c b/tests/core_setmaster_vs_auth.c
index efb27b1..44ec752 100644
--- a/tests/core_setmaster_vs_auth.c
+++ b/tests/core_setmaster_vs_auth.c
@@ -45,7 +45,7 @@
 # include <pthread.h>
 #endif
 
-igt_main
+igt_simple_main
 {
 	int master1, master2, client;
 	drm_magic_t magic;

commit b3ff11232681ab615794c293de8abfebb8921ad7
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Tue Dec 1 15:12:07 2015 +0000

    docs: exclude gpgpu_fill.h
    
    gpgpu_fill.h is only used internally by the library.
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/docs/reference/intel-gpu-tools/Makefile.am b/docs/reference/intel-gpu-tools/Makefile.am
index 0363014..f5719d4 100644
--- a/docs/reference/intel-gpu-tools/Makefile.am
+++ b/docs/reference/intel-gpu-tools/Makefile.am
@@ -125,9 +125,10 @@ EXTRA_HFILES=
 # Header files or dirs to ignore when scanning. Use base file/dir names
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
 IGNORE_HFILES=gen6_render.h gen7_media.h gen7_render.h gen8_media.h \
-	      gen8_render.h i830_reg.h i915_3d.h i915_pciids.h i915_reg.h \
-	      intel_reg.h debug.h instdone.h media_fill.h rendercopy.h \
-	      media_spin.h media_fill_gen9.h gen9_render.h version.h
+	      gen8_render.h gpgpu_fill.h i830_reg.h i915_3d.h i915_pciids.h \
+	      i915_reg.h intel_reg.h debug.h instdone.h media_fill.h \
+	      rendercopy.h media_spin.h media_fill_gen9.h gen9_render.h \
+	      version.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png

commit 0874c770eb016c26c148323b7b7b3a7c2d829441
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Tue Dec 1 15:07:10 2015 +0000

    docs: document intel_pipe_crc_source enum values
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index ee9ff40..bbf7f69 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -77,6 +77,17 @@ typedef struct {
 
 /**
  * intel_pipe_crc_source:
+ * @INTEL_PIPE_CRC_SOURCE_NONE: No source
+ * @INTEL_PIPE_CRC_SOURCE_PLANE1: Plane 1
+ * @INTEL_PIPE_CRC_SOURCE_PLANE2: Plane 2
+ * @INTEL_PIPE_CRC_SOURCE_PF: Panel Filter
+ * @INTEL_PIPE_CRC_SOURCE_PIPE: Pipe
+ * @INTEL_PIPE_CRC_SOURCE_TV: TV
+ * @INTEL_PIPE_CRC_SOURCE_DP_B: DisplayPort B
+ * @INTEL_PIPE_CRC_SOURCE_DP_C: DisplayPort C
+ * @INTEL_PIPE_CRC_SOURCE_DP_D: DisplayPort D
+ * @INTEL_PIPE_CRC_SOURCE_AUTO: Automatic source selection
+ * @INTEL_PIPE_CRC_SOURCE_MAX: Number of available sources
  *
  * Enumeration of all supported pipe CRC sources. Not all platforms and all
  * outputs support all of them. Generic tests should just use

commit 683316cb886dced1674876f21c782836fe40f9ff
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Mon Nov 30 16:36:16 2015 +0000

    docs: add missing documentation for drm open functions
    
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 16a3638..2896af0 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -225,11 +225,10 @@ int drm_get_card(void)
 
 /**
  * __drm_open_driver:
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
  *
  * Open the first DRM device we can find, searching up to 16 device nodes
  *
- * @chipset: OR'd flags for each chipset to search, eg. DRIVER_INTEL
- *
  * Returns:
  * An open DRM fd or -1 on error
  */
@@ -313,6 +312,7 @@ static void quiescent_gpu_at_exit_render(int sig)
 
 /**
  * drm_open_driver:
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
  *
  * Open a drm legacy device node. This function always returns a valid
  * file descriptor.
@@ -340,6 +340,7 @@ int drm_open_driver(int chipset)
 
 /**
  * drm_open_driver_master:
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
  *
  * Open a drm legacy device node and ensure that it is drm master.
  *
@@ -359,6 +360,7 @@ int drm_open_driver_master(int chipset)
 
 /**
  * drm_open_driver_render:
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
  *
  * Open a drm render device node.
  *

commit 0394844a478e500740389e2cbbf2fdee0c4054c7
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Mon Nov 30 15:35:46 2015 +0000

    tests/gem_request_retire: add test description
    
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: Thomas Wood <thomas.wood@intel.com>

diff --git a/tests/gem_request_retire.c b/tests/gem_request_retire.c
index 0c7c45e..545a245 100644
--- a/tests/gem_request_retire.c
+++ b/tests/gem_request_retire.c
@@ -49,6 +49,9 @@
 
 #include "intel_bufmgr.h"
 
+IGT_TEST_DESCRIPTION("Collection of tests targeting request retirement code"
+		     " paths.");
+
 #define WIDTH 4096
 #define HEIGHT 4096
 #define BO_SIZE (WIDTH * HEIGHT * sizeof(uint32_t))

commit 72b6bec370451ae722ddc1c5457f4cfa6a55b188
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed Nov 25 10:50:31 2015 +0200

    tests: fix ddx_intel_after_fbdev to use intel_reg
    
    intel_reg_dumper is gone, replaced by 'intel_reg dump'.
    
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

diff --git a/tests/ddx_intel_after_fbdev b/tests/ddx_intel_after_fbdev
index bcd2c29..f068209 100755
--- a/tests/ddx_intel_after_fbdev
+++ b/tests/ddx_intel_after_fbdev
@@ -40,8 +40,8 @@ cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.1.before.fbdev
 # run fbdev
 xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.fbdev & 
 sleep 5
-if [ -f `which intel_reg_dumper` ]; then
-`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.1.fbdev
+if [ -f `which intel_reg` ]; then
+`which intel_reg` dump > $TMPDIR/intel_reg_dump.1.fbdev
 fi
 killall X
 
@@ -54,8 +54,8 @@ sleep 5
 # run intel
 xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.intel & 
 sleep 5 
-if [ -f `which intel_reg_dumper` ]; then
-`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.2.intel
+if [ -f `which intel_reg` ]; then
+`which intel_reg` dump > $TMPDIR/intel_reg_dump.2.intel
 fi
 killall X
 

commit 4fe60a6e1c1f2a8853d57c19c6c16be408d1cd19
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed Nov 25 10:46:40 2015 +0200

    tools: fix intel_gpu_abrt to use intel_reg
    
    intel_reg_dumper is gone, replaced by 'intel_reg dump'.
    
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index a38137d..bde6fb0 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -55,7 +55,7 @@ get /etc/X11/xorg.conf.d/ X
 dmesg > $tardir/dmesg
 lspci -nn > $tardir/lspci
 
-$igtdir/intel_reg_dumper > $tardir/intel_reg_dumper.txt
+$igtdir/intel_reg dump > $tardir/intel_reg_dump.txt
 $igtdir/intel_bios_dumper $tardir/intel_bios_dump
 $igtdir/intel_stepping > $tardir/intel_stepping
 

commit 96d3658d0be9479168586f01101a493aa030c9d4
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed Nov 25 10:25:44 2015 +0200

    scripts: remove display_debug.sh as obsolete
    
    The script uses the obsoleted and removed intel_reg_read tool. Rather
    than mechanically fix this to use intel_reg, observe that the hardcoded
    register offsets are platform specific. A quick glance suggests they are
    for PCH split platforms with FDI, and as such useful only on a minority
    of platforms. Remove the script as obsolete.
    
    If the need for such a script arises, it should be based around using
    'intel_reg dump' with display-only register spec files.
    
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

diff --git a/scripts/display_debug.sh b/scripts/display_debug.sh
deleted file mode 100755
index f854f90..0000000
--- a/scripts/display_debug.sh
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/bash
-
-# FBC_CFB_BASE 0x43200
-../tools/intel_reg_read 0x43200
-# FBC_CTL 0x43208
-../tools/intel_reg_read 0x43208
-# ERR_INT 0x44040
-../tools/intel_reg_read 0x44040
-# DE_RRMR 0x44050
-../tools/intel_reg_read 0x44050
-# ARB_CTL 0x45000
-../tools/intel_reg_read 0x45000
-# ARB_CTL2 0x45004
-../tools/intel_reg_read 0x45004
-# MSG_CTL 0x45010
-../tools/intel_reg_read 0x45010
-# Watermarks
-../tools/intel_reg_read 0x45100
-../tools/intel_reg_read 0x45104
-../tools/intel_reg_read 0x45200
-../tools/intel_reg_read 0x45108
-../tools/intel_reg_read 0x4510C
-../tools/intel_reg_read 0x45110
-../tools/intel_reg_read 0x45120
-../tools/intel_reg_read 0x45124
-../tools/intel_reg_read 0x45128
-# Pipe A timing 0x60000-0x6004C
-../tools/intel_reg_read 0x60000 -c 0x13;
-# Pipe B timing 0x61000-0x6104C
-../tools/intel_reg_read 0x61000 -c 0x13;
-# Pipe C timing 0x62000-0x6204C
-../tools/intel_reg_read 0x62000 -c 0x13;
-# FDI A 0x60100
-# FDI B 0x61100
-# FDI C 0x62100
-# EDP 0x64000
-../tools/intel_reg_read 0x60100
-../tools/intel_reg_read 0x61100
-../tools/intel_reg_read 0x62100
-../tools/intel_reg_read 0x64000
-# Panel fitter A window size 0x68074
-# Panel fitter A control 0x68080
-../tools/intel_reg_read 0x68074
-../tools/intel_reg_read 0x68080
-# Panel fitter B window size 0x68874
-# Panel fitter B control 0x68880
-../tools/intel_reg_read 0x68874
-../tools/intel_reg_read 0x68880
-# Panel fitter C window size 0x69074
-# Panel fitter C control 0x69080
-../tools/intel_reg_read 0x69074
-../tools/intel_reg_read 0x69080
-# Pipe A config 0x70008
-# Pipe B config 0x71008
-# Pipe C config 0x72008
-../tools/intel_reg_read 0x70008
-../tools/intel_reg_read 0x71008
-../tools/intel_reg_read 0x72008
-# Cursor A control 0x70080
-# Cursor B control 0x71080
-# Cursor C control 0x72080
-../tools/intel_reg_read 0x70080
-../tools/intel_reg_read 0x71080
-../tools/intel_reg_read 0x72080
-# Primary A control 0x70180
-# Primary B control 0x71180
-# Primary C control 0x72180
-../tools/intel_reg_read 0x70180
-../tools/intel_reg_read 0x71180
-../tools/intel_reg_read 0x72180
-# Sprite A control 0x70280
-# Sprite B control 0x71280
-# Sprite C control 0x72280
-../tools/intel_reg_read 0x70280
-../tools/intel_reg_read 0x71280
-../tools/intel_reg_read 0x72280
-# Sprite A size 0x70290
-# Sprite B size 0x71290
-# Sprite C size 0x72290
-../tools/intel_reg_read 0x70290
-../tools/intel_reg_read 0x71290
-../tools/intel_reg_read 0x72290
-# Sprite A scaling 0x70304
-# Sprite B scaling 0x71304
-# Sprite C scaling 0x72304
-../tools/intel_reg_read 0x70304
-../tools/intel_reg_read 0x71304
-../tools/intel_reg_read 0x72304
-# PCH DE Interrupt enable 0xC400C
-../tools/intel_reg_read 0xC400C
-# PCH DE Interrupt IIR 0xC4008
-../tools/intel_reg_read 0xC4008
-# PCH DE hotplug 0xC4030
-../tools/intel_reg_read 0xC4030
-# SERR_INT 0xC4040
-../tools/intel_reg_read 0xC4040
-# PCH DPLL A CTL 0xC6014
-# PCH DPLL A Divisor 0 0xC6040
-# PCH DPLL A Divisor 1 0xC6044
-../tools/intel_reg_read 0xC6014
-../tools/intel_reg_read 0xC6040
-../tools/intel_reg_read 0xC6044
-# PCH DPLL B CTL 0xC6018
-# PCH DPLL B Divisor 0 0xC6048
-# PCH DPLL B Divisor 1 0xC604C
-../tools/intel_reg_read 0xC6018
-../tools/intel_reg_read 0xC6048
-../tools/intel_reg_read 0xC604C
-# PCH DPLL DREF CTL 0xC6200
-../tools/intel_reg_read 0xC6200
-# PCH DPLL SEL 0xC7000
-../tools/intel_reg_read 0xC7000
-# PCH Panel Status 0xC7200
-../tools/intel_reg_read 0xC7200
-# PCH Panel Control 0xC7204
-../tools/intel_reg_read 0xC7204
-# Transcoder A timing 0xE0000-0xE004F
-# Transcoder B timing 0xE1000-0xE104F
-# Transcoder C timing 0xE2000-0xE204F
-../tools/intel_reg_read 0xE0000 -c 0x14;
-../tools/intel_reg_read 0xE1000 -c 0x14;
-../tools/intel_reg_read 0xE2000 -c 0x14;
-# Transcoder A DP CTL 0xE0300
-# Transcoder B DP CTL 0xE1300
-# Transcoder C DP CTL 0xE2300
-../tools/intel_reg_read 0xE0300
-../tools/intel_reg_read 0xE1300
-../tools/intel_reg_read 0xE2300
-# CRT DAC CTL 0xE1100
-../tools/intel_reg_read 0xE1100
-# HDMI/DVI B CTL 0xE1140
-# HDMI/DVI C CTL 0xE1150
-# HDMI/DVI D CTL 0xE1160
-../tools/intel_reg_read 0xE1140
-../tools/intel_reg_read 0xE1150
-../tools/intel_reg_read 0xE1160
-# LVDS 0xE1180
-../tools/intel_reg_read 0xE1180
-# DP B CTL 0xE4100
-# DP C CTL 0xE4200
-# DP D CTL 0xE4300
-../tools/intel_reg_read 0xE4100
-../tools/intel_reg_read 0xE4200
-../tools/intel_reg_read 0xE4300
-# Transcoder A config 0xF0008
-# FDI RX A CTL 0xF000C
-# FDI RX A MISC 0xF0010
-# FDI RX A IIR 0xF0014
-# FDI RX A IMR 0xF0018
-../tools/intel_reg_read 0xF0008 -c 5;
-# Transcoder B config 0xF1008
-# FDI RX B CTL 0xF100C
-# FDI RX B MISC 0xF1010
-# FDI RX B IIR 0xF1014
-# FDI RX B IMR 0xF1018
-../tools/intel_reg_read 0xF1008 -c 5;
-# Transcoder C config 0xF2008
-# FDI RX C CTL 0xF200C
-# FDI RX C MISC 0xF2010
-# FDI RX C IIR 0xF2014
-# FDI RX C IMR 0xF2018
-../tools/intel_reg_read 0xF2008 -c 5;
-#Check if frame and line counters are running
-../tools/intel_reg_read 0x44070
-../tools/intel_reg_read 0x70050
-../tools/intel_reg_read 0x71050
-../tools/intel_reg_read 0x72050
-sleep 2;
-../tools/intel_reg_read 0x44070
-../tools/intel_reg_read 0x70050
-../tools/intel_reg_read 0x71050
-../tools/intel_reg_read 0x72050

commit 5830a7a04be49516e947eaefb47c2d214da9d2ab
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 1 18:33:17 2015 +0100

    tests: Add core_setmaster_vs_auth.c
    
    Embarrasingly I noticed that I need to git add the file when resolving
    the conflict and manually applying my patch. But then I added the
    wrong file ... Reported by Thomas Wood.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

diff --git a/tests/core_setmaster_vs_auth.c b/tests/core_setmaster_vs_auth.c
new file mode 100644
index 0000000..efb27b1
--- /dev/null
+++ b/tests/core_setmaster_vs_auth.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright © 2015 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>
+ *
+ * Based upon a test program provided by Thomas Hellstrom <thellstrom@vmware.com>
+ */
+
+/*
+ * Testcase: Check that drop/setMaster correctly transfer master state
+ *
+ * Test approach is only checking auth state (which is part of master state) by
+ * trying to authenticate a client against the wrong master.
+ */
+
+#define _GNU_SOURCE
+#include "igt.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef __linux__
+# include <sys/syscall.h>
+#else
+# include <pthread.h>
+#endif
+
+igt_main
+{
+	int master1, master2, client;
+	drm_magic_t magic;
+
+	master1 = drm_open_driver(DRIVER_ANY);
+	do_or_die(drmSetMaster(master1));
+
+	/* Get an authentication magic from the first master */
+	client = drm_open_driver(DRIVER_ANY);
+	do_or_die(drmGetMagic(client, &magic));
+
+	/* Open an fd an make it master */
+	master2 = drm_open_driver(DRIVER_ANY);
+	do_or_die(drmDropMaster(master1));
+	do_or_die(drmSetMaster(master2));
+
+	/* Auth shouldn't work since we're authenticating with a different
+	 * master than the one we got the magic from. */
+	igt_assert_neq(drmAuthMagic(master2, magic), 0);
+	igt_assert_eq(errno, EINVAL);
+
+	close(client);
+	close(master2);
+	close(master1);
+}

commit 80546d45762a7b1e20885c557a08a41ef6d7fc10
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 1 17:37:40 2015 +0100

    tests/pm_rpm: Don't compare edid blob IDs
    
    The kernel is free to allocate blob ids however it wants to. And also
    to reallocate them whenever it sees fit. The only thing we are allowed
    to compare is the length and the actual date.
    
    Removing this bogus check makes drm-resources-equal on my snb.
    
    Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546
    Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index e9ba9ea..476666a 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -510,7 +510,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
 		return;
 	igt_assert(e1 && e2);
 
-	COMPARE(e1, e2, id);
 	COMPARE(e1, e2, length);
 
 	igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);

commit 8133295d02730dfc800d974e673dcb4b07460911
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 1 08:44:00 2015 +0100

    tests: add core_setmaster_vs_auth
    
    Tests that master state isn't leaked to new masters by checking
    that auth magics for the old master don't work any more.
    
    Based upon a simple test program provided by Thomas.
    
    v2: Use comment Thomas suggested on intel-gfx.
    
    Cc: Thomas Hellstrom <thellstrom@vmware.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

diff --git a/tests/.gitignore b/tests/.gitignore
index 6291c04..ba1becd 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -5,6 +5,7 @@ core_getclient
 core_getstats
 core_getversion
 core_prop_blob
+core_setmaster_vs_auth
 drm_import_export
 drm_read
 drm_vma_limiter
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index ac3994d..cfcffe7 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -103,6 +103,7 @@ TESTS_progs = \
 	core_getstats \
 	core_getversion \
 	core_prop_blob \
+	core_setmaster_vs_auth \
 	drm_import_export \
 	drm_read \
 	drm_vma_limiter \

commit 92e83cb379cd36c72ce1a254a1b80320b21a3ae1
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Nov 30 16:03:46 2015 +0100

    tests: Rename drm_auth to core_auth
    
    It really is a core drm testcase and not a libdrm testcase. While at it
    also make it generic, since it is.
    
    Cc: Daniel Stone <daniels@collabora.com>
    Acked-by: Daniel Stone <daniels@collabora.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

diff --git a/tests/.gitignore b/tests/.gitignore
index 85936ea..6291c04 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,10 +1,10 @@
 # Please keep sorted alphabetically
+core_auth
 core_get_client_auth
 core_getclient
 core_getstats
 core_getversion
 core_prop_blob
-drm_auth
 drm_import_export
 drm_read
 drm_vma_limiter
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index ff178f7..ac3994d 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -98,11 +98,11 @@ TESTS_progs_M = \
 	$(NULL)
 
 TESTS_progs = \
+	core_auth \
 	core_getclient \
 	core_getstats \
 	core_getversion \
 	core_prop_blob \
-	drm_auth \
 	drm_import_export \
 	drm_read \
 	drm_vma_limiter \
diff --git a/tests/core_auth.c b/tests/core_auth.c
new file mode 100644
index 0000000..79bd587
--- /dev/null
+++ b/tests/core_auth.c
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
+ *
+ * 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.
+ */
+
+/*
+ * Testcase: drmGetMagic() and drmAuthMagic()
+ */
+
+#include "igt.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/poll.h>
+#include "drm.h"
+
+IGT_TEST_DESCRIPTION("Call drmGetMagic() and drmAuthMagic() and see if it behaves.");
+
+static int magic_cmp(const void *p1, const void *p2)
+{
+	return *(const drm_magic_t*)p1 < *(const drm_magic_t*)p2;
+}
+
+static void test_many_magics(int master)
+{
+	drm_magic_t magic, *magics = NULL;
+	unsigned int i, j, ns, allocated = 0;
+	char path[512];
+	int *fds = NULL, slave;
+
+	sprintf(path, "/proc/self/fd/%d", master);
+
+	for (i = 0; ; ++i) {
+		/* open slave and make sure it's NOT a master */
+		slave = open(path, O_RDWR | O_CLOEXEC);
+		if (slave < 0) {
+			igt_assert(errno == EMFILE);
+			break;
+		}
+		igt_assert(drmSetMaster(slave) < 0);
+
+		/* resize magic-map */
+		if (i >= allocated) {
+			ns = allocated * 2;
+			igt_assert(ns >= allocated);
+
+			if (!ns)
+				ns = 128;
+
+			magics = realloc(magics, sizeof(*magics) * ns);
+			igt_assert(magics);
+
+			fds = realloc(fds, sizeof(*fds) * ns);
+			igt_assert(fds);
+
+			allocated = ns;
+		}
+
+		/* insert magic */
+		igt_assert(drmGetMagic(slave, &magic) == 0);
+		igt_assert(magic > 0);
+
+		magics[i] = magic;


Reply to: