drm/i915/selftests: scrub 64K
Subsystems (2)
PATCH 1/1 drm/i915/selftests: scrub 64K
We write out all PTEs when operating in 64K mode, which is acceptable given the assertion that the hw only cares about every 16th PTE and so will ignore everything else. However this may hide potential issues, for example the hw could be sneakily operating in 4K mode and we would be none the wiser, so make sure this doesn't escape us in the selftests.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 20 ++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/selftests/huge_pages.c | 3 +++ 3 files changed, 24 insertions(+)
drivers/gpu/drm/i915/i915_gem_gtt.c +20 -0
@@ -1161,6 +1161,26 @@ static void gen8_ppgtt_insert_huge_entries(struct i915_vma *vma, vaddr[idx.pde] |=GEN8_PDE_IPS_64K ;kunmap_atomic (vaddr); page_size =I915_GTT_PAGE_SIZE_64K ; + +/* +* For simplicity we choose to write out all PTEs when +* operating in 64K mode, which is acceptable given the +* assertion that the hw only cares about every 16th PTE +* and so will ignore everything else. However this may +* hide potential issues, so make sure this doesn't +* escape us in the selftests. +*/ +if (I915_SELFTEST_ONLY (vma->vm->scrub_64K)) { +u16 i; + + encode = pte_encode | vma->vm->scratch_page.daddr; + vaddr =kmap_atomic_px (pd->page_table[idx.pde]); + +for (i =1 ; i < index; i +=16 ) +memset64 (vaddr + i, encode,15 ); + +kunmap_atomic (vaddr); + } } vma->page_sizes.gtt |= page_size;
drivers/gpu/drm/i915/i915_gem_gtt.h +1 -0
@@ -342,6 +342,7 @@ struct i915_address_space {void (*clear_pages)(struct i915_vma *vma); I915_SELFTEST_DECLARE(struct fault_attr fault_attr); + I915_SELFTEST_DECLARE(bool scrub_64K); };#define i915_is_ggtt (V ) (!(V)->file)
drivers/gpu/drm/i915/selftests/huge_pages.c +3 -0
@@ -1757,6 +1757,9 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *dev_priv) goto out_unlock; } +if (ctx->ppgtt) + ctx->ppgtt->base.scrub_64K = true; + err =i915_subtests (tests, ctx); out_unlock:
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2018-05-10 20:00:06)
Quoted 5 lines
We write out all PTEs when operating in 64K mode, which is acceptable given the assertion that the hw only cares about every 16th PTE and so will ignore everything else. However this may hide potential issues, for example the hw could be sneakily operating in 4K mode and we would be none the wiser, so make sure this doesn't escape us in the selftests.
For selftesting, don't you want to do the opposite and set the ignored addresses to something that will explode, and not something safe? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Chris Wilson
Quoting Matthew Auld (2018-05-10 20:00:06)
Quoted 5 lines
We write out all PTEs when operating in 64K mode, which is acceptable given the assertion that the hw only cares about every 16th PTE and so will ignore everything else. However this may hide potential issues, for example the hw could be sneakily operating in 4K mode and we would be none the wiser, so make sure this doesn't escape us in the selftests.
For selftesting, don't you want to do the opposite and set the ignored addresses to something that will explode, and not something safe?
The tests will fail, when we do write_huge some of our writes will land in scratch, and cpu_check will throw a fit.
Quoted 5 lines
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2018-05-10 22:12:13)
Quoted 8 lines · Chris Wilson
Quoted 7 lines
Quoting Matthew Auld (2018-05-10 20:00:06)
Quoted 5 lines
We write out all PTEs when operating in 64K mode, which is acceptable given the assertion that the hw only cares about every 16th PTE and so will ignore everything else. However this may hide potential issues, for example the hw could be sneakily operating in 4K mode and we would be none the wiser, so make sure this doesn't escape us in the selftests.
Quoted 5 lines
Quoted 2 lines
For selftesting, don't you want to do the opposite and set the ignored addresses to something that will explode, and not something safe?
The tests will fail, when we do
write_hugesome of our writes will land in scratch, andcpu_checkwill throw a fit.
From reading the comment I was mightily confused, the commitmsg is better for it included an extra clause of explanation.
/*
* We write all 4K page entries, even when using 64K pages. In order
* to verify that the HW isn't cheating by using the 4K PTE instead
* of the 64K PTE, we want to remove all the surplus entries. If the HW
* skipped the 64K PTE, it will read/write into the scratch page instead -
* which we detect as missing results during selftests.
*/
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/selftests: scrub 64K
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/selftests: scrub 64K
URL : https://patchwork.freedesktop.org/series/43023/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4164 -> Patchwork_8974 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/43023/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_8974 that come from known issues:
=== IGT changes ===
==== Possible fixes ====
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: FAIL (fdo#102575) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-cnl-psr: DMESG-WARN (fdo#104951) -> PASS fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
== Participating hosts (40 -> 37) ==
Additional (1): fi-byt-j1900
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4164 -> Patchwork_8974
CI_DRM_4164: a44969bdb6d69244a063eac7f76ea46353960409 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8974: 3877d1bf8190cbeb5c1c163dfa0127cfb96a878c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit
== Linux commits ==
3877d1bf8190 drm/i915/selftests: scrub 64K
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8974/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/selftests: scrub 64K
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/selftests: scrub 64K
URL : https://patchwork.freedesktop.org/series/43023/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4164_full -> Patchwork_8974_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8974_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8974_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/43023/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8974_full:
=== IGT changes ===
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-dirty-render:
shard-kbl: PASS -> SKIP +1
igt@gem_pwrite@big-cpu-random:
shard-glk: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_8974_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105363, fdo#102887)
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-hsw: PASS -> FAIL (fdo#103060)
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-glk: PASS -> FAIL (fdo#100368) +1
igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
shard-hsw: PASS -> DMESG-WARN (fdo#102614)
==== Possible fixes ====
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@plain-flip-ts-check:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-gtt:
shard-hsw: DMESG-FAIL (fdo#103167, fdo#104724) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
== Participating hosts (9 -> 9) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4164 -> Patchwork_8974
CI_DRM_4164: a44969bdb6d69244a063eac7f76ea46353960409 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8974: 3877d1bf8190cbeb5c1c163dfa0127cfb96a878c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8974/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/selftests: scrub 64K
In reply to Matthew AuldWe write all 4K page entries, even when using 64K pages. In order to verify that the HW isn't cheating by using the 4K PTE instead of the 64K PTE, we want to remove all the surplus entries. If the HW skipped the 64K PTE, it will read/write into the scratch page instead - which we detect as missing results during selftests.
v2: much improved commentary(Chris)
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/selftests/huge_pages.c | 3 +++ 3 files changed, 25 insertions(+)
drivers/gpu/drm/i915/i915_gem_gtt.c +21 -0
@@ -1161,6 +1161,27 @@ static void gen8_ppgtt_insert_huge_entries(struct i915_vma *vma, vaddr[idx.pde] |=GEN8_PDE_IPS_64K ;kunmap_atomic (vaddr); page_size =I915_GTT_PAGE_SIZE_64K ; + +/* +* We write all 4K page entries, even when using 64K +* pages. In order to verify that the HW isn't cheating +* by using the 4K PTE instead of the 64K PTE, we want +* to remove all the surplus entries. If the HW skipped +* the 64K PTE, it will read/write into the scratch page +* instead - which we detect as missing results during +* selftests. +*/ +if (I915_SELFTEST_ONLY (vma->vm->scrub_64K)) { +u16 i; + + encode = pte_encode | vma->vm->scratch_page.daddr; + vaddr =kmap_atomic_px (pd->page_table[idx.pde]); + +for (i =1 ; i < index; i +=16 ) +memset64 (vaddr + i, encode,15 ); + +kunmap_atomic (vaddr); + } } vma->page_sizes.gtt |= page_size;
drivers/gpu/drm/i915/i915_gem_gtt.h +1 -0
@@ -342,6 +342,7 @@ struct i915_address_space {void (*clear_pages)(struct i915_vma *vma); I915_SELFTEST_DECLARE(struct fault_attr fault_attr); + I915_SELFTEST_DECLARE(bool scrub_64K); };#define i915_is_ggtt (V ) (!(V)->file)
drivers/gpu/drm/i915/selftests/huge_pages.c +3 -0
@@ -1757,6 +1757,9 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *dev_priv) goto out_unlock; } +if (ctx->ppgtt) + ctx->ppgtt->base.scrub_64K = true; + err =i915_subtests (tests, ctx); out_unlock:
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2018-05-11 10:51:40)
Quoted 11 lines
We write all 4K page entries, even when using 64K pages. In order to verify that the HW isn't cheating by using the 4K PTE instead of the 64K PTE, we want to remove all the surplus entries. If the HW skipped the 64K PTE, it will read/write into the scratch page instead - which we detect as missing results during selftests.
v2: much improved commentary(Chris)
Signed-off-by Matthew Auld <[email protected]>Cc Chris Wilson <[email protected]>Cc Changbin Du <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Chris Wilson (2018-05-11 10:58:36)
Quoted 7 lines
Quoting Matthew Auld (2018-05-11 10:51:40)
Quoted 6 lines
We write all 4K page entries, even when using 64K pages. In order to verify that the HW isn't cheating by using the 4K PTE instead of the 64K PTE, we want to remove all the surplus entries. If the HW skipped the 64K PTE, it will read/write into the scratch page instead - which we detect as missing results during selftests.
Quoted 6 lines
Quoted 5 lines
v2: much improved commentary(Chris)
Signed-off-by Matthew Auld <[email protected]>Cc Chris Wilson <[email protected]>Cc Changbin Du <[email protected]>Reviewed-by Chris Wilson <[email protected]>
And pushed, thanks for the test case.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/selftests: scrub 64K (rev2)
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/selftests: scrub 64K (rev2)
URL : https://patchwork.freedesktop.org/series/43023/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4166 -> Patchwork_8979 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8979 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8979, 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/43023/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8979:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_8979 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: PASS -> DMESG-WARN (fdo#105128)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-cnl-psr: PASS -> DMESG-WARN (fdo#104951)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: DMESG-WARN (fdo#106248) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
== Participating hosts (41 -> 37) ==
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4166 -> Patchwork_8979
CI_DRM_4166: 974787811b2e4047519b0f81930e9d15f0cebd01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8979: 297875f058080adc541d694b5ad31503c8c9808c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit
== Linux commits ==
297875f05808 drm/i915/selftests: scrub 64K
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8979/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/selftests: scrub 64K (rev2)
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/selftests: scrub 64K (rev2)
URL : https://patchwork.freedesktop.org/series/43023/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4166_full -> Patchwork_8979_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8979_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8979_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/43023/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8979_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: PASS -> SKIP +1
igt@gem_pwrite@big-cpu-random:
shard-apl: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_8979_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@absolute-wf_vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#106087)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105707)
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-glk: PASS -> FAIL (fdo#100368) +2
==== Possible fixes ====
igt@gem_eio@in-flight-10ms:
shard-glk: FAIL (fdo#105957) -> PASS
igt@kms_flip@absolute-wf_vblank-interruptible:
shard-apl: FAIL (fdo#106087) -> PASS
igt@kms_flip@blocking-absolute-wf_vblank-interruptible:
shard-kbl: FAIL -> PASS
igt@kms_flip@dpms-vs-vblank-race-interruptible:
shard-glk: FAIL (fdo#103060) -> PASS
igt@kms_flip@flip-vs-wf_vblank-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-hsw: FAIL (fdo#103060) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
fdo#106087 https://bugs.freedesktop.org/show_bug.cgi?id=106087
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4166 -> Patchwork_8979
CI_DRM_4166: 974787811b2e4047519b0f81930e9d15f0cebd01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4475: 35f08c12aa216d5b62a5b9984b575cee6905098f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8979: 297875f058080adc541d694b5ad31503c8c9808c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4475: 3ba0657bff4216d1ec7179935590261855f1651e @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8979/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx