Skip to contentSkip to conversation

tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling

PATCH In review Tvrtko Ursulin 4 participants 7 messages Oct 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling

From: Tvrtko Ursulin <[email protected]>

Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575
Cc: Chris Wilson <[email protected]>
---
Eeek confidence level low - is this correct?

---
 tests/gem_set_tiling_vs_pwrite.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
tests/gem_set_tiling_vs_pwrite.c +18 -0
index f0126b6484b7..3be908dbd103 100644
@@ -42,6 +42,18 @@ IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency.");
 #define OBJECT_SIZE (1024*1024)
 #define TEST_STRIDE (1024*4)
 
+static bool known_swizzling(int fd, uint32_t handle)
+{
+	struct drm_i915_gem_get_tiling arg = {
+		.handle = handle,
+	};
+
+	if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING, &arg))
+		return false;
+
+	return arg.phys_swizzle_mode == arg.swizzle_mode;
+}
+
 /**
  * Testcase: Check set_tiling vs pwrite coherency
  */
@@ -66,6 +78,12 @@ igt_simple_main
 
 	gem_set_tiling(fd, handle, I915_TILING_X, TEST_STRIDE);
 
+	/*
+	 * As we want to compare our template pattern against
+	 * the target bo, we need consistent swizzling on both.
+	 */
+	igt_require(known_swizzling(fd, handle));
+
 	/* touch it */
 	gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
 	*ptr = 0xdeadbeef;
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

Quoting Tvrtko Ursulin (2018-10-11 13:30:27)

Quoted 11 lines

From: Tvrtko Ursulin <[email protected]>

Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575
Cc: Chris Wilson <[email protected]>
---
Eeek confidence level low - is this correct?

Actually this is a slightly more subtle problem,
https://patchwork.freedesktop.org/patch/240327/
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw
Quoted 7 lines · Chris Wilson

Quoting Tvrtko Ursulin (2018-10-11 13:30:27)

Quoted 6 lines

From: Tvrtko Ursulin <[email protected]>

Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible.

Quoted 8 lines
Quoted 5 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575
Cc: Chris Wilson <[email protected]>
---
Eeek confidence level low - is this correct?

Actually this is a slightly more subtle problem,
https://patchwork.freedesktop.org/patch/240327/

So assuming your patch is in, this IGT cannot actually work if any swizzling is in effect? Or without your patch, it should skip based on known_swizzling? Or is even that not enough?

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

Quoting Tvrtko Ursulin (2018-10-11 13:42:31)

Quoted 15 lines · Chris Wilson
Quoted 13 lines

Quoting Tvrtko Ursulin (2018-10-11 13:30:27)

Quoted 11 lines

From: Tvrtko Ursulin <[email protected]>

Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575
Cc: Chris Wilson <[email protected]>
---
Eeek confidence level low - is this correct?

Quoted 5 lines
Quoted 2 lines

Actually this is a slightly more subtle problem,
https://patchwork.freedesktop.org/patch/240327/

So assuming your patch is in, this IGT cannot actually work if any swizzling is in effect?

With the kernel patch, pwrite is a pure linear write to physical address, not guaranteeing layout on the gpu (the gpu sees it through the tile + swizzle combo). So set-tiling no longer affects pwrite and the test should see identical in/out.

Quoted 2 lines

Or without your patch, it should skip based on
known_swizzling? Or is even that not enough?

Without the patch, we would need to take swizzling into account and so skip as we cannot know the swizzling in this case. The test illustrates that currently we do the swizzling asymmetrically, our API is bust. The test further illustrates that at times we cannot even know when swizzling is required (due to L-shape eccentricities and the swizzling changing within an object) and so the concept of handling swizzling on the API boundary on behalf of the user is unworkable.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw
Quoted 19 lines · Chris Wilson

Quoting Tvrtko Ursulin (2018-10-11 13:42:31)

Quoted 18 lines · Chris Wilson
Quoted 15 lines

Quoting Tvrtko Ursulin (2018-10-11 13:30:27)

Quoted 11 lines

From: Tvrtko Ursulin <[email protected]>

Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575
Cc: Chris Wilson <[email protected]>
---
Eeek confidence level low - is this correct?

Actually this is a slightly more subtle problem,
https://patchwork.freedesktop.org/patch/240327/

Quoted 7 lines
Quoted 2 lines

So assuming your patch is in, this IGT cannot actually work if any swizzling is in effect?

With the kernel patch, pwrite is a pure linear write to physical address, not guaranteeing layout on the gpu (the gpu sees it through the tile + swizzle combo). So set-tiling no longer affects pwrite and the test should see identical in/out.

Yes of course..

Quoted 10 lines
Quoted 2 lines

Or without your patch, it should skip based on
known_swizzling? Or is even that not enough?

Without the patch, we would need to take swizzling into account and so skip as we cannot know the swizzling in this case. The test illustrates that currently we do the swizzling asymmetrically, our API is bust. The test further illustrates that at times we cannot even know when swizzling is required (due to L-shape eccentricities and the swizzling changing within an object) and so the concept of handling swizzling on the API boundary on behalf of the user is unworkable.

Sounds believable to me. So I am happy to review that patch on the technical level, just ask you to gather some more acks. Sounds like a plan?

Is there any risk that there were no bug reports due the affected platform being old?

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling
URL : https://patchwork.freedesktop.org/series/50865/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4958 -> IGTPW_1939 =

== Summary - SUCCESS ==

No regressions found.

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

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_evict:
      fi-bsw-kefka:       PASS -> DMESG-WARN (fdo#107709)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@pm_rpm@basic-pci-d3-state:
      fi-skl-6600u:       FAIL (fdo#107707) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107707 https://bugs.freedesktop.org/show_bug.cgi?id=107707
fdo#107709 https://bugs.freedesktop.org/show_bug.cgi?id=107709

== Participating hosts (48 -> 41) ==

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-byt-n2820

== Build changes ==

* IGT: IGT_4672 -> IGTPW_1939

CI_DRM_4958: 9990e1665029dc2ef4a9c0632b8a2f516263e595 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1939: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1939/
IGT_4672: 4497591d2572831a9f07fd9e48a2571bfcffe354 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1939/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#6 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling
URL : https://patchwork.freedesktop.org/series/50865/
State : failure

== Summary ==

= CI Bug Log - changes from IGT_4672_full -> IGTPW_1939_full =

== Summary - FAILURE ==

Serious unknown changes coming with IGTPW_1939_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1939_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/50865/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@kms_concurrent@pipe-a:
      shard-kbl:          PASS -> DMESG-WARN

    
    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          PASS -> SKIP

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_busy@close-race:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_cursor_crc@cursor-128x128-random:
      shard-apl:          PASS -> FAIL (fdo#103232) +4
      shard-kbl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-128x42-sliding:
      shard-glk:          PASS -> FAIL (fdo#103232) +2

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-kbl:          PASS -> FAIL (fdo#103191, fdo#103232)
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_flip@modeset-vs-vblank-race-interruptible:
      shard-kbl:          PASS -> FAIL (fdo#103060)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-apl:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
      shard-glk:          PASS -> FAIL (fdo#103167) +1
      shard-kbl:          PASS -> FAIL (fdo#103167)

    igt@kms_frontbuffer_tracking@fbc-1p-rte:
      shard-glk:          PASS -> FAIL (fdo#103167, fdo#105682)
      shard-kbl:          PASS -> FAIL (fdo#103167, fdo#105682)
      shard-apl:          PASS -> FAIL (fdo#103167, fdo#105682)

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-glk:          PASS -> FAIL (fdo#108145)
      shard-kbl:          PASS -> FAIL (fdo#108145) +1
      shard-apl:          PASS -> FAIL (fdo#108145)

    igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
      shard-glk:          PASS -> FAIL (fdo#103166) +1
      shard-apl:          PASS -> FAIL (fdo#103166)

    
    ==== Possible fixes ====

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-apl:          FAIL (fdo#103232) -> PASS +2

    igt@kms_cursor_crc@cursor-256x256-sliding:
      shard-glk:          FAIL (fdo#103232) -> PASS +3

    igt@kms_cursor_crc@cursor-64x64-sliding:
      shard-kbl:          FAIL (fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-glk:          INCOMPLETE (k.org#198133, fdo#103359) -> PASS
      shard-apl:          FAIL (fdo#103191, fdo#103232) -> PASS

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
      shard-hsw:          FAIL (fdo#105767) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
      shard-apl:          FAIL (fdo#103167) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
      shard-glk:          FAIL (fdo#103167) -> PASS +1

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          FAIL (fdo#103166) -> PASS +3

    igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
      shard-apl:          FAIL (fdo#103166) -> PASS +2

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS
      shard-kbl:          FAIL (fdo#99912) -> PASS

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
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#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (6 -> 5) ==

Missing (1): shard-skl

== Build changes ==

* IGT: IGT_4672 -> IGTPW_1939
* Linux: CI_DRM_4952 -> CI_DRM_4958

CI_DRM_4952: a62e43ba13605a478b22307ea1790d48aea029a6 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4958: 9990e1665029dc2ef4a9c0632b8a2f516263e595 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1939: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1939/
IGT_4672: 4497591d2572831a9f07fd9e48a2571bfcffe354 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1939/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev