All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/gem_tiled_pread: Skip on unknown swizzling
@ 2019-01-07 11:28 ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2019-01-07 11:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If we do not know the underlying swizzle on the HW, we do not know the
full tiling pattern and cannot predict the expected results. This is
often because the swizzle varies between pages and is not as constant as
we naively expected.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_tiled_pread_basic.c  | 23 ++++++++++++++++++++++-
 tests/i915/gem_tiled_pread_pwrite.c | 23 ++++++++++++++++++++++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
index 425bb07e7..48b1b37e2 100644
--- a/tests/i915/gem_tiled_pread_basic.c
+++ b/tests/i915/gem_tiled_pread_basic.c
@@ -61,6 +61,27 @@ static int tile_width;
 static int tile_height;
 static int tile_size;
 
+static void
+get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
+{
+	struct drm_i915_gem_get_tiling2 {
+		uint32_t handle;
+		uint32_t tiling_mode;
+		uint32_t swizzle_mode;
+		uint32_t phys_swizzle_mode;
+	} arg;
+#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
+
+	memset(&arg, 0, sizeof(arg));
+	arg.handle = handle;
+
+	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
+	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
+
+	*tiling = arg.tiling_mode;
+	*swizzle = arg.swizzle_mode;
+}
+
 static uint32_t
 create_bo(int fd)
 {
@@ -125,7 +146,7 @@ igt_simple_main
 	fd = drm_open_driver(DRIVER_INTEL);
 
 	handle = create_bo(fd);
-	igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
+	get_tiling(fd, handle, &tiling, &swizzle);
 
 	devid = intel_get_drm_devid(fd);
 
diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 313daa388..59afae896 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -69,6 +69,27 @@ static uint32_t current_tiling_mode;
 
 #define PAGE_SIZE 4096
 
+static void
+get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
+{
+	struct drm_i915_gem_get_tiling2 {
+		uint32_t handle;
+		uint32_t tiling_mode;
+		uint32_t swizzle_mode;
+		uint32_t phys_swizzle_mode;
+	} arg;
+#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
+
+	memset(&arg, 0, sizeof(arg));
+	arg.handle = handle;
+
+	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
+	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
+
+	*tiling = arg.tiling_mode;
+	*swizzle = arg.swizzle_mode;
+}
+
 static uint32_t
 create_bo_and_fill(int fd)
 {
@@ -122,7 +143,7 @@ igt_simple_main
 		current_tiling_mode = I915_TILING_X;
 
 		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+		get_tiling(fd, handle, &tiling, &swizzle);
 
 		gem_read(fd, handle, 0, linear, sizeof(linear));
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] i915/gem_tiled_pread: Skip on unknown swizzling
@ 2019-01-07 11:28 ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2019-01-07 11:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If we do not know the underlying swizzle on the HW, we do not know the
full tiling pattern and cannot predict the expected results. This is
often because the swizzle varies between pages and is not as constant as
we naively expected.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_tiled_pread_basic.c  | 23 ++++++++++++++++++++++-
 tests/i915/gem_tiled_pread_pwrite.c | 23 ++++++++++++++++++++++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
index 425bb07e7..48b1b37e2 100644
--- a/tests/i915/gem_tiled_pread_basic.c
+++ b/tests/i915/gem_tiled_pread_basic.c
@@ -61,6 +61,27 @@ static int tile_width;
 static int tile_height;
 static int tile_size;
 
+static void
+get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
+{
+	struct drm_i915_gem_get_tiling2 {
+		uint32_t handle;
+		uint32_t tiling_mode;
+		uint32_t swizzle_mode;
+		uint32_t phys_swizzle_mode;
+	} arg;
+#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
+
+	memset(&arg, 0, sizeof(arg));
+	arg.handle = handle;
+
+	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
+	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
+
+	*tiling = arg.tiling_mode;
+	*swizzle = arg.swizzle_mode;
+}
+
 static uint32_t
 create_bo(int fd)
 {
@@ -125,7 +146,7 @@ igt_simple_main
 	fd = drm_open_driver(DRIVER_INTEL);
 
 	handle = create_bo(fd);
-	igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
+	get_tiling(fd, handle, &tiling, &swizzle);
 
 	devid = intel_get_drm_devid(fd);
 
diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 313daa388..59afae896 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -69,6 +69,27 @@ static uint32_t current_tiling_mode;
 
 #define PAGE_SIZE 4096
 
+static void
+get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
+{
+	struct drm_i915_gem_get_tiling2 {
+		uint32_t handle;
+		uint32_t tiling_mode;
+		uint32_t swizzle_mode;
+		uint32_t phys_swizzle_mode;
+	} arg;
+#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
+
+	memset(&arg, 0, sizeof(arg));
+	arg.handle = handle;
+
+	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
+	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
+
+	*tiling = arg.tiling_mode;
+	*swizzle = arg.swizzle_mode;
+}
+
 static uint32_t
 create_bo_and_fill(int fd)
 {
@@ -122,7 +143,7 @@ igt_simple_main
 		current_tiling_mode = I915_TILING_X;
 
 		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+		get_tiling(fd, handle, &tiling, &swizzle);
 
 		gem_read(fd, handle, 0, linear, sizeof(linear));
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_tiled_pread: Skip on unknown swizzling
  2019-01-07 11:28 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-01-07 12:06 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-01-07 12:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_tiled_pread: Skip on unknown swizzling
URL   : https://patchwork.freedesktop.org/series/54802/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5367 -> IGTPW_2187
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2187 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2187, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/54802/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2187:

### IGT changes ###

#### Warnings ####

  * igt@pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       SKIP -> PASS

  
Known issues
------------

  Here are the changes found in IGTPW_2187 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@i915_module_load@reload-no-display:
    - fi-byt-clapper:     PASS -> WARN [fdo#108688]

  
#### Possible fixes ####

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         INCOMPLETE [fdo#103927] -> PASS

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-cfl-8109u:       INCOMPLETE [fdo#106070] / [fdo#108126] -> PASS

  * igt@pm_rpm@basic-rte:
    - fi-bsw-kefka:       FAIL [fdo#108800] -> PASS

  
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108126]: https://bugs.freedesktop.org/show_bug.cgi?id=108126
  [fdo#108688]: https://bugs.freedesktop.org/show_bug.cgi?id=108688
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800


Participating hosts (47 -> 43)
------------------------------

  Missing    (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


Build changes
-------------

    * IGT: IGT_4756 -> IGTPW_2187

  CI_DRM_5367: 38c6e01d18abf5168a1ac5bc65e8e810f6f83d1c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2187: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2187/
  IGT_4756: 75081c6bfb9998bd7cbf35a7ac0578c683fe55a8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2187/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_tiled_pread: Skip on unknown swizzling
  2019-01-07 11:28 ` [igt-dev] " Chris Wilson
  (?)
  (?)
@ 2019-01-07 14:49 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-01-07 14:49 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_tiled_pread: Skip on unknown swizzling
URL   : https://patchwork.freedesktop.org/series/54802/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5367_full -> IGTPW_2187_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_2187_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_2187_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/54802/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_2187_full:

### IGT changes ###

#### Warnings ####

  * igt@perf_pmu@rc6:
    - shard-kbl:          PASS -> SKIP

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@runner@aborted}:
    - shard-snb:          ( 20 FAIL ) [fdo#107469] / [fdo#108784] -> ( 18 FAIL ) [fdo#108929]

  
Known issues
------------

  Here are the changes found in IGTPW_2187_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_available_modes_crc@available_mode_test_crc:
    - shard-snb:          NOTRUN -> FAIL [fdo#106641]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-hang-newfb-render-a:
    - shard-apl:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
    - shard-apl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  * igt@kms_cursor_crc@cursor-128x42-onscreen:
    - shard-glk:          PASS -> FAIL [fdo#103232] +8

  * igt@kms_cursor_crc@cursor-128x42-sliding:
    - shard-kbl:          PASS -> FAIL [fdo#103232]
    - shard-apl:          PASS -> FAIL [fdo#103232] +4

  * igt@kms_cursor_crc@cursor-64x64-random:
    - shard-glk:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-glk:          PASS -> FAIL [fdo#103167] +5

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-apl:          PASS -> FAIL [fdo#103167] +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
    - shard-kbl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-apl:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-onoff:
    - shard-glk:          NOTRUN -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-2p-rte:
    - shard-glk:          PASS -> FAIL [fdo#103167] / [fdo#105682]

  * igt@kms_plane@pixel-format-pipe-b-planes:
    - shard-apl:          PASS -> FAIL [fdo#103166] +3

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-glk:          NOTRUN -> FAIL [fdo#103166]

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145] +1

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
    - shard-kbl:          PASS -> FAIL [fdo#103166] +2

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          NOTRUN -> FAIL [fdo#103166]

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> DMESG-FAIL [fdo#108950]
    - shard-glk:          PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]

  * igt@kms_setmode@basic:
    - shard-apl:          PASS -> FAIL [fdo#99912]

  * igt@kms_universal_plane@universal-plane-pipe-c-functional:
    - shard-glk:          PASS -> FAIL [fdo#103166] +8
    - shard-kbl:          NOTRUN -> FAIL [fdo#103166]

  
#### Possible fixes ####

  * igt@gem_userptr_blits@readonly-unsync:
    - shard-apl:          INCOMPLETE [fdo#103927] -> PASS

  * igt@kms_color@pipe-b-legacy-gamma:
    - shard-apl:          FAIL [fdo#104782] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          FAIL [fdo#103191] / [fdo#103232] -> PASS +1

  * igt@kms_cursor_crc@cursor-128x42-sliding:
    - shard-glk:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-256x256-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +3

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
    - shard-glk:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
    - shard-glk:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-kbl:          FAIL [fdo#103166] -> PASS +1
    - shard-glk:          FAIL [fdo#103166] -> PASS

  * igt@pm_rps@min-max-config-loaded:
    - shard-glk:          FAIL [fdo#102250] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
  [fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108784]: https://bugs.freedesktop.org/show_bug.cgi?id=108784
  [fdo#108929]: https://bugs.freedesktop.org/show_bug.cgi?id=108929
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4756 -> IGTPW_2187
    * Piglit: piglit_4509 -> None

  CI_DRM_5367: 38c6e01d18abf5168a1ac5bc65e8e810f6f83d1c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2187: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2187/
  IGT_4756: 75081c6bfb9998bd7cbf35a7ac0578c683fe55a8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2187/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_tiled_pread: Skip on unknown swizzling
  2019-01-07 11:28 ` [igt-dev] " Chris Wilson
@ 2019-01-11 13:48   ` Tvrtko Ursulin
  -1 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 13:48 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 07/01/2019 11:28, Chris Wilson wrote:
> If we do not know the underlying swizzle on the HW, we do not know the
> full tiling pattern and cannot predict the expected results. This is
> often because the swizzle varies between pages and is not as constant as
> we naively expected.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_tiled_pread_basic.c  | 23 ++++++++++++++++++++++-
>   tests/i915/gem_tiled_pread_pwrite.c | 23 ++++++++++++++++++++++-
>   2 files changed, 44 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
> index 425bb07e7..48b1b37e2 100644
> --- a/tests/i915/gem_tiled_pread_basic.c
> +++ b/tests/i915/gem_tiled_pread_basic.c
> @@ -61,6 +61,27 @@ static int tile_width;
>   static int tile_height;
>   static int tile_size;
>   
> +static void
> +get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
> +{
> +	struct drm_i915_gem_get_tiling2 {
> +		uint32_t handle;
> +		uint32_t tiling_mode;
> +		uint32_t swizzle_mode;
> +		uint32_t phys_swizzle_mode;
> +	} arg;
> +#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
> +
> +	memset(&arg, 0, sizeof(arg));
> +	arg.handle = handle;
> +
> +	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
> +	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
> +
> +	*tiling = arg.tiling_mode;
> +	*swizzle = arg.swizzle_mode;
> +}

Awooga! Third copy consolidates. ;)

Common gem_get_tiling and igt_require in the callers? Hm wait, 
gem_get_tiling looks identical. What's the catch?

Regards,

Tvrtko

> +
>   static uint32_t
>   create_bo(int fd)
>   {
> @@ -125,7 +146,7 @@ igt_simple_main
>   	fd = drm_open_driver(DRIVER_INTEL);
>   
>   	handle = create_bo(fd);
> -	igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
> +	get_tiling(fd, handle, &tiling, &swizzle);
>   
>   	devid = intel_get_drm_devid(fd);
>   
> diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
> index 313daa388..59afae896 100644
> --- a/tests/i915/gem_tiled_pread_pwrite.c
> +++ b/tests/i915/gem_tiled_pread_pwrite.c
> @@ -69,6 +69,27 @@ static uint32_t current_tiling_mode;
>   
>   #define PAGE_SIZE 4096
>   
> +static void
> +get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
> +{
> +	struct drm_i915_gem_get_tiling2 {
> +		uint32_t handle;
> +		uint32_t tiling_mode;
> +		uint32_t swizzle_mode;
> +		uint32_t phys_swizzle_mode;
> +	} arg;
> +#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
> +
> +	memset(&arg, 0, sizeof(arg));
> +	arg.handle = handle;
> +
> +	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
> +	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
> +
> +	*tiling = arg.tiling_mode;
> +	*swizzle = arg.swizzle_mode;
> +}
> +
>   static uint32_t
>   create_bo_and_fill(int fd)
>   {
> @@ -122,7 +143,7 @@ igt_simple_main
>   		current_tiling_mode = I915_TILING_X;
>   
>   		handle = create_bo_and_fill(fd);
> -		gem_get_tiling(fd, handle, &tiling, &swizzle);
> +		get_tiling(fd, handle, &tiling, &swizzle);
>   
>   		gem_read(fd, handle, 0, linear, sizeof(linear));
>   
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] i915/gem_tiled_pread: Skip on unknown swizzling
@ 2019-01-11 13:48   ` Tvrtko Ursulin
  0 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 13:48 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 07/01/2019 11:28, Chris Wilson wrote:
> If we do not know the underlying swizzle on the HW, we do not know the
> full tiling pattern and cannot predict the expected results. This is
> often because the swizzle varies between pages and is not as constant as
> we naively expected.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_tiled_pread_basic.c  | 23 ++++++++++++++++++++++-
>   tests/i915/gem_tiled_pread_pwrite.c | 23 ++++++++++++++++++++++-
>   2 files changed, 44 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
> index 425bb07e7..48b1b37e2 100644
> --- a/tests/i915/gem_tiled_pread_basic.c
> +++ b/tests/i915/gem_tiled_pread_basic.c
> @@ -61,6 +61,27 @@ static int tile_width;
>   static int tile_height;
>   static int tile_size;
>   
> +static void
> +get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
> +{
> +	struct drm_i915_gem_get_tiling2 {
> +		uint32_t handle;
> +		uint32_t tiling_mode;
> +		uint32_t swizzle_mode;
> +		uint32_t phys_swizzle_mode;
> +	} arg;
> +#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
> +
> +	memset(&arg, 0, sizeof(arg));
> +	arg.handle = handle;
> +
> +	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
> +	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
> +
> +	*tiling = arg.tiling_mode;
> +	*swizzle = arg.swizzle_mode;
> +}

Awooga! Third copy consolidates. ;)

Common gem_get_tiling and igt_require in the callers? Hm wait, 
gem_get_tiling looks identical. What's the catch?

Regards,

Tvrtko

> +
>   static uint32_t
>   create_bo(int fd)
>   {
> @@ -125,7 +146,7 @@ igt_simple_main
>   	fd = drm_open_driver(DRIVER_INTEL);
>   
>   	handle = create_bo(fd);
> -	igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
> +	get_tiling(fd, handle, &tiling, &swizzle);
>   
>   	devid = intel_get_drm_devid(fd);
>   
> diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
> index 313daa388..59afae896 100644
> --- a/tests/i915/gem_tiled_pread_pwrite.c
> +++ b/tests/i915/gem_tiled_pread_pwrite.c
> @@ -69,6 +69,27 @@ static uint32_t current_tiling_mode;
>   
>   #define PAGE_SIZE 4096
>   
> +static void
> +get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
> +{
> +	struct drm_i915_gem_get_tiling2 {
> +		uint32_t handle;
> +		uint32_t tiling_mode;
> +		uint32_t swizzle_mode;
> +		uint32_t phys_swizzle_mode;
> +	} arg;
> +#define DRM_IOCTL_I915_GEM_GET_TILING2	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling2)
> +
> +	memset(&arg, 0, sizeof(arg));
> +	arg.handle = handle;
> +
> +	do_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING2, &arg);
> +	igt_require(arg.phys_swizzle_mode == arg.swizzle_mode);
> +
> +	*tiling = arg.tiling_mode;
> +	*swizzle = arg.swizzle_mode;
> +}
> +
>   static uint32_t
>   create_bo_and_fill(int fd)
>   {
> @@ -122,7 +143,7 @@ igt_simple_main
>   		current_tiling_mode = I915_TILING_X;
>   
>   		handle = create_bo_and_fill(fd);
> -		gem_get_tiling(fd, handle, &tiling, &swizzle);
> +		get_tiling(fd, handle, &tiling, &swizzle);
>   
>   		gem_read(fd, handle, 0, linear, sizeof(linear));
>   
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH i-g-t v2] i915/gem_tiled_pread: Skip on unknown swizzling
  2019-01-07 11:28 ` [igt-dev] " Chris Wilson
@ 2019-01-11 13:54   ` Chris Wilson
  -1 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2019-01-11 13:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If we do not know the underlying swizzle on the HW, we do not know the
full tiling pattern and cannot predict the expected results. This is
often because the swizzle varies between pages and is not as constant as
we naively expected.

v2: gem_get_tiling() does the physical==reported check, we just need to
add an acquire

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <tvrtko.ursulin@linux.intel.com>
---
 tests/i915/gem_tiled_pread_pwrite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 313daa388..fcf0780af 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -122,7 +122,7 @@ igt_simple_main
 		current_tiling_mode = I915_TILING_X;
 
 		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
 
 		gem_read(fd, handle, 0, linear, sizeof(linear));
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v2] i915/gem_tiled_pread: Skip on unknown swizzling
@ 2019-01-11 13:54   ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2019-01-11 13:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If we do not know the underlying swizzle on the HW, we do not know the
full tiling pattern and cannot predict the expected results. This is
often because the swizzle varies between pages and is not as constant as
we naively expected.

v2: gem_get_tiling() does the physical==reported check, we just need to
add an acquire

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <tvrtko.ursulin@linux.intel.com>
---
 tests/i915/gem_tiled_pread_pwrite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 313daa388..fcf0780af 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -122,7 +122,7 @@ igt_simple_main
 		current_tiling_mode = I915_TILING_X;
 
 		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
 
 		gem_read(fd, handle, 0, linear, sizeof(linear));
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH i-g-t v2] i915/gem_tiled_pread: Skip on unknown swizzling
  2019-01-11 13:54   ` [igt-dev] " Chris Wilson
@ 2019-01-11 14:00     ` Tvrtko Ursulin
  -1 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 14:00 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 11/01/2019 13:54, Chris Wilson wrote:
> If we do not know the underlying swizzle on the HW, we do not know the
> full tiling pattern and cannot predict the expected results. This is
> often because the swizzle varies between pages and is not as constant as
> we naively expected.
> 
> v2: gem_get_tiling() does the physical==reported check, we just need to
> add an acquire
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: <tvrtko.ursulin@linux.intel.com>
> ---
>   tests/i915/gem_tiled_pread_pwrite.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
> index 313daa388..fcf0780af 100644
> --- a/tests/i915/gem_tiled_pread_pwrite.c
> +++ b/tests/i915/gem_tiled_pread_pwrite.c
> @@ -122,7 +122,7 @@ igt_simple_main
>   		current_tiling_mode = I915_TILING_X;
>   
>   		handle = create_bo_and_fill(fd);
> -		gem_get_tiling(fd, handle, &tiling, &swizzle);
> +		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
>   
>   		gem_read(fd, handle, 0, linear, sizeof(linear));
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v2] i915/gem_tiled_pread: Skip on unknown swizzling
@ 2019-01-11 14:00     ` Tvrtko Ursulin
  0 siblings, 0 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-01-11 14:00 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev


On 11/01/2019 13:54, Chris Wilson wrote:
> If we do not know the underlying swizzle on the HW, we do not know the
> full tiling pattern and cannot predict the expected results. This is
> often because the swizzle varies between pages and is not as constant as
> we naively expected.
> 
> v2: gem_get_tiling() does the physical==reported check, we just need to
> add an acquire
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: <tvrtko.ursulin@linux.intel.com>
> ---
>   tests/i915/gem_tiled_pread_pwrite.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
> index 313daa388..fcf0780af 100644
> --- a/tests/i915/gem_tiled_pread_pwrite.c
> +++ b/tests/i915/gem_tiled_pread_pwrite.c
> @@ -122,7 +122,7 @@ igt_simple_main
>   		current_tiling_mode = I915_TILING_X;
>   
>   		handle = create_bo_and_fill(fd);
> -		gem_get_tiling(fd, handle, &tiling, &swizzle);
> +		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
>   
>   		gem_read(fd, handle, 0, linear, sizeof(linear));
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_tiled_pread: Skip on unknown swizzling (rev2)
  2019-01-07 11:28 ` [igt-dev] " Chris Wilson
                   ` (4 preceding siblings ...)
  (?)
@ 2019-01-11 14:30 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-01-11 14:30 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_tiled_pread: Skip on unknown swizzling (rev2)
URL   : https://patchwork.freedesktop.org/series/54802/
State : failure

== Summary ==

Series 54802 revision 2 was fully merged or fully failed: no git log

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-01-11 14:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 11:28 [PATCH i-g-t] i915/gem_tiled_pread: Skip on unknown swizzling Chris Wilson
2019-01-07 11:28 ` [igt-dev] " Chris Wilson
2019-01-07 12:06 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-07 14:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-11 13:48 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
2019-01-11 13:48   ` Tvrtko Ursulin
2019-01-11 13:54 ` [PATCH i-g-t v2] " Chris Wilson
2019-01-11 13:54   ` [igt-dev] " Chris Wilson
2019-01-11 14:00   ` Tvrtko Ursulin
2019-01-11 14:00     ` [igt-dev] " Tvrtko Ursulin
2019-01-11 14:30 ` [igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_tiled_pread: Skip on unknown swizzling (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.