Skip to contentSkip to conversation

drm/i915: Use correct huge page manager for MTL

PATCH Superseded Jonathan Cavitt 3 participants 7 messages Feb 24, 2023 – Feb 27, 2023

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Use correct huge page manager for MTL

MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is because MTL reports as not supporting 64K pages, or more accurately, the system that reports whether a platform has 64K pages reports false for MTL. This is only half correct, as the 64K page support reporting system only cares about 64K page support for LMEM, which MTL doesn't have.

MTL should be using xehpsdv_ppgtt_insert_huge. However, simply changing over to using that manager doesn't resolve the issue because MTL is expecting the virtual address space for the page table to be flushed after initialization, so we must also add a flush statement there.

The changes made to the huge page manager selection indirectly impacted some of the mock hugepage selftests. Due to the use of pte level hints, rather than pde level hints, we now expect 64K page sizes to be properly reported by the GTT, so we should correct the expected test results to reflect this change.

---
 drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 11 ++++-------
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c            |  3 ++-
 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +4 -7
index defece0bcb81..06554717495f 100644
@@ -784,9 +784,6 @@ static int igt_mock_ppgtt_huge_fill(void *arg)
 		GEM_BUG_ON(!expected_gtt);
 		GEM_BUG_ON(size);
 
-		if (expected_gtt & I915_GTT_PAGE_SIZE_4K)
-			expected_gtt &= ~I915_GTT_PAGE_SIZE_64K;
-
 		i915_vma_unpin(vma);
 
 		if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) {
@@ -849,7 +846,7 @@ static int igt_mock_ppgtt_64K(void *arg)
 		},
 		{
 			.size = SZ_64K + SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
 			.offset = 0,
 		},
 		{
@@ -864,7 +861,7 @@ static int igt_mock_ppgtt_64K(void *arg)
 		},
 		{
 			.size = SZ_2M - SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
 			.offset = 0,
 		},
 		{
@@ -886,12 +883,12 @@ static int igt_mock_ppgtt_64K(void *arg)
 		{
 			.size = SZ_64K,
 			.offset = SZ_2M,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
 		},
 		{
 			.size = SZ_128K,
 			.offset = SZ_2M - SZ_64K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
 		},
 	};
 	struct i915_vma *vma;
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +2 -1
index 4daaa6f55668..9c571185395f 100644
@@ -570,6 +570,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
 			}
 		} while (rem >= page_size && index < max);
 
+		drm_clflush_virt_range(vaddr, PAGE_SIZE);
 		vma_res->page_sizes_gtt |= page_size;
 	} while (iter->sg && sg_dma_len(iter->sg));
 }
@@ -707,7 +708,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
 	struct sgt_dma iter = sgt_dma(vma_res);
 
 	if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
-		if (HAS_64K_PAGES(vm->i915))
+		if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50))
 			xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
 		else
 			gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
Signature · 1 line
2.25.1
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use correct huge page manager for MTL (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915: Use correct huge page manager for MTL (rev2)
URL : https://patchwork.freedesktop.org/series/114259/
State : warning

== Summary ==

Error: dim checkpatch failed
e3e53cca9170 drm/i915: Use correct huge page manager for MTL
-:6: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #6:
MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is because

total: 0 errors, 1 warnings, 0 checks, 54 lines checked

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use correct huge page manager for MTL (rev2)

In reply to Jonathan Cavitt
== Series Details ==

== Series Details ==

Series: drm/i915: Use correct huge page manager for MTL (rev2)
URL : https://patchwork.freedesktop.org/series/114259/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12776 -> Patchwork_114259v2
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/index.html

Participating hosts (39 -> 38)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][1] -> [DMESG-FAIL][2] ([i915#5334])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@hangcheck:
- bat-dg2-8: [PASS][3] -> [DMESG-FAIL][4] ([i915#6998])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/bat-dg2-8/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-dg2-8/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-2: NOTRUN -> [DMESG-FAIL][5] ([i915#6367])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-rpls-2: NOTRUN -> [SKIP][6] ([i915#7828])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-2/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-2: NOTRUN -> [SKIP][7] ([i915#1845])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@guc:
- bat-rpls-1: [DMESG-WARN][8] ([i915#7852]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/bat-rpls-1/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][10] ([i915#4983]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/bat-rpls-2/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-1: [DMESG-FAIL][12] ([i915#6367]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/bat-rpls-1/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/bat-rpls-1/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: [INCOMPLETE][14] ([i915#7913]) -> [INCOMPLETE][15] ([i915#7156] / [i915#7913])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/fi-kbl-soraka/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/fi-kbl-soraka/igt@i915_selftest@[email protected]

[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6998]: https://gitlab.freedesktop.org/drm/intel/issues/6998
[i915#7156]: https://gitlab.freedesktop.org/drm/intel/issues/7156
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7852]: https://gitlab.freedesktop.org/drm/intel/issues/7852
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913

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

* Linux: CI_DRM_12776 -> Patchwork_114259v2

CI-20190529: 20190529
CI_DRM_12776: f86cdb8690c1cd968b6763b613a4a0fde424895e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7173: deab4e0bdf5a9366b67d0a44f478f3da3c9a943b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_114259v2: f86cdb8690c1cd968b6763b613a4a0fde424895e @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

c997e84171f8 drm/i915: Use correct huge page manager for MTL

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/index.html

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Use correct huge page manager for MTL (rev2)

In reply to Jonathan Cavitt
== Series Details ==

== Series Details ==

Series: drm/i915: Use correct huge page manager for MTL (rev2)
URL : https://patchwork.freedesktop.org/series/114259/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12776_full -> Patchwork_114259v2_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- shard-tglu-9: NOTRUN -> [SKIP][1] ([i915#7456])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_ccs@block-multicopy-compressed:
- shard-tglu-9: NOTRUN -> [SKIP][2] ([i915#5325])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_ccs@ctrl-surf-copy:
- shard-tglu-9: NOTRUN -> [SKIP][3] ([i915#3555] / [i915#5325])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_ctx_persistence@engines-mixed-process:
- shard-snb: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1099]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-snb5/igt@[email protected]

* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-tglu-9: NOTRUN -> [FAIL][5] ([i915#2842])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@gem_exec_fair@[email protected]

* igt@gem_exec_params@rsvd2-dirt:
- shard-tglu-9: NOTRUN -> [SKIP][6] ([fdo#109283])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_lmem_swapping@verify:
- shard-tglu-9: NOTRUN -> [SKIP][7] ([i915#4613]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_pxp@create-regular-context-2:
- shard-tglu-9: NOTRUN -> [SKIP][8] ([i915#4270]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_softpin@evict-snoop:
- shard-tglu-9: NOTRUN -> [SKIP][9] ([fdo#109312])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-tglu-9: NOTRUN -> [FAIL][10] ([i915#3318])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gen7_exec_parse@bitmasks:
- shard-tglu-9: NOTRUN -> [SKIP][11] ([fdo#109289])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@gen9_exec_parse@bb-chained:
- shard-tglu-9: NOTRUN -> [SKIP][12] ([i915#2527] / [i915#2856]) +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@i915_pm_backlight@bad-brightness:
- shard-tglu-9: NOTRUN -> [SKIP][13] ([i915#7561])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@i915_pm_rpm@drm-resources-equal:
- shard-tglu-9: NOTRUN -> [SKIP][14] ([i915#3547])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@i915_pm_rpm@modeset-pc8-residency-stress:
- shard-tglu-9: NOTRUN -> [SKIP][15] ([fdo#109506])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_big_joiner@2x-modeset:
- shard-tglu-9: NOTRUN -> [SKIP][16] ([i915#2705])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_ccs@pipe-c-ccs-on-another-bo-yf_tiled_ccs:
- shard-tglu-9: NOTRUN -> [SKIP][17] ([fdo#111615] / [i915#1845] / [i915#7651]) +5 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@kms_ccs@pipe-c-ccs-on-another-bo-yf_tiled_ccs.html

* igt@kms_chamelium_color@ctm-0-50:
- shard-tglu-9: NOTRUN -> [SKIP][18] ([fdo#111827]) +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_chamelium_hpd@dp-hpd-storm:
- shard-tglu-9: NOTRUN -> [SKIP][19] ([i915#7828]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_color@ctm-negative:
- shard-tglu-9: NOTRUN -> [SKIP][20] ([i915#3546])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-128x42:
- shard-tglu-9: NOTRUN -> [SKIP][21] ([i915#1845]) +11 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-apl: [PASS][22] -> [FAIL][23] ([i915#2346])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_dsc@dsc-with-formats:
- shard-tglu-9: NOTRUN -> [SKIP][24] ([i915#1845] / [i915#7651]) +51 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_flip@2x-flip-vs-rmfb-interruptible:
- shard-tglu-9: NOTRUN -> [SKIP][25] ([fdo#109274] / [i915#3637]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_flip@bo-too-big-interruptible:
- shard-tglu-9: NOTRUN -> [SKIP][26] ([i915#3637]) +4 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-tglu-9: NOTRUN -> [SKIP][27] ([i915#1849]) +32 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
- shard-tglu-10: NOTRUN -> [SKIP][28] ([fdo#110189])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-10/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen.html

* igt@kms_plane_alpha_blend@alpha-basic:
- shard-tglu-9: NOTRUN -> [SKIP][29] ([i915#7128] / [i915#7294])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_plane_alpha_blend@coverage-7efc:
- shard-tglu-9: NOTRUN -> [SKIP][30] ([i915#7128])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-rotation@pipe-a-vga-1:
- shard-snb: NOTRUN -> [SKIP][31] ([fdo#109271]) +89 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-snb4/igt@kms_plane_scaling@[email protected]

* igt@kms_plane_scaling@plane-upscale-with-rotation-20x20:
- shard-tglu-9: NOTRUN -> [SKIP][32] ([i915#3555]) +4 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-75:
- shard-tglu-9: NOTRUN -> [SKIP][33] ([i915#3555] / [i915#6953])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-75.html

* igt@kms_psr2_sf@cursor-plane-move-continuous-sf:
- shard-tglu-9: NOTRUN -> [SKIP][34] ([i915#658])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_psr2_sf@cursor-plane-update-sf:
- shard-tglu-9: NOTRUN -> [SKIP][35] ([fdo#111068] / [i915#658])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@[email protected]

* igt@kms_psr@primary_page_flip:
- shard-tglu-9: NOTRUN -> [SKIP][36] ([fdo#110189]) +2 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@kms_psr@primary_page_flip.html

* igt@v3d/v3d_perfmon@get-values-valid-perfmon:
- shard-tglu-9: NOTRUN -> [SKIP][37] ([fdo#109315] / [i915#2575]) +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@v3d/[email protected]

* igt@vc4/vc4_mmap@mmap-bad-handle:
- shard-tglu-9: NOTRUN -> [SKIP][38] ([i915#2575]) +3 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-tglu-9/igt@vc4/[email protected]

#### Possible fixes ####

* igt@gem_ctx_persistence@hang:
- {shard-rkl}: [SKIP][39] ([i915#6252]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-5/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-3/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- {shard-rkl}: [FAIL][41] ([fdo#103375]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-4/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@[email protected]

* igt@gem_eio@suspend:
- {shard-rkl}: [FAIL][43] ([i915#5115] / [i915#7052]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-2/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][45] ([i915#2842]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-glk5/igt@gem_exec_fair@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-glk2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- {shard-rkl}: [FAIL][47] ([i915#2842]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-5/igt@gem_exec_fair@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-write-read-noreloc:
- {shard-rkl}: [SKIP][49] ([i915#3281]) -> [PASS][50] +9 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-4/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@[email protected]

* igt@gem_mmap_gtt@fault-concurrent-x:
- shard-snb: [ABORT][51] ([i915#5161]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-snb2/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-snb5/igt@[email protected]

* igt@gem_partial_pwrite_pread@writes-after-reads-display:
- {shard-rkl}: [SKIP][53] ([i915#3282]) -> [PASS][54] +2 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@[email protected]

* igt@gen9_exec_parse@basic-rejected-ctx-param:
- {shard-rkl}: [SKIP][55] ([i915#2527]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-4/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@[email protected]

* igt@i915_hangman@gt-engine-error@bcs0:
- {shard-rkl}: [SKIP][57] ([i915#6258]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-5/igt@i915_hangman@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-1/igt@i915_hangman@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle@vcs0:
- {shard-rkl}: [WARN][59] ([i915#2681]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-5/igt@i915_pm_rc6_residency@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-5/igt@i915_pm_rc6_residency@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [DMESG-FAIL][61] ([i915#5334]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-apl3/igt@i915_selftest@live@gt_heartbeat.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-apl7/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [FAIL][63] ([i915#2346]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-glk9/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-glk7/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [FAIL][65] ([i915#4767]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-apl1/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-apl6/igt@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][67] ([i915#2122]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-glk9/igt@kms_flip@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-glk2/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a2:
- shard-glk: [FAIL][69] ([i915#79]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-glk5/igt@kms_flip@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-glk7/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
- {shard-rkl}: [SKIP][71] ([i915#1849] / [i915#4098]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12776/shard-rkl-4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen.html

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

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2436]: https://gitlab.freedesktop.org/drm/intel/issues/2436
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
[i915#5161]: https://gitlab.freedesktop.org/drm/intel/issues/5161
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5431]: https://gitlab.freedesktop.org/drm/intel/issues/5431
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6333]: https://gitlab.freedesktop.org/drm/intel/issues/6333
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
[i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
[i915#8152]: https://gitlab.freedesktop.org/drm/intel/issues/8152

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

* Linux: CI_DRM_12776 -> Patchwork_114259v2

CI-20190529: 20190529
CI_DRM_12776: f86cdb8690c1cd968b6763b613a4a0fde424895e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7173: deab4e0bdf5a9366b67d0a44f478f3da3c9a943b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_114259v2: f86cdb8690c1cd968b6763b613a4a0fde424895e @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114259v2/index.html

#4 lore raw
In reply to Jonathan Cavitt
Quoted 11 lines · Jonathan Cavitt

MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is because MTL reports as not supporting 64K pages, or more accurately, the system that reports whether a platform has 64K pages reports false for MTL. This is only half correct, as the 64K page support reporting system only cares about 64K page support for LMEM, which MTL doesn't have.

MTL should be using xehpsdv_ppgtt_insert_huge. However, simply changing over to using that manager doesn't resolve the issue because MTL is expecting the virtual address space for the page table to be flushed after initialization, so we must also add a flush statement there.

Quoted 4 lines

The changes made to the huge page manager selection indirectly impacted some of the mock hugepage selftests. Due to the use of pte level hints, rather than pde level hints, we now expect 64K page sizes to be properly reported by the GTT, so we should correct the expected test results to reflect this change.

For future submissions, please add the version number for each new submission of the same patch, and also please include the changelog.

Quoted 42 lines
---
  drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 11 ++++-------
  drivers/gpu/drm/i915/gt/gen8_ppgtt.c            |  3 ++-
  2 files changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -5
index defece0bcb81..06554717495f 100644
@@ -784,9 +784,6 @@ static int igt_mock_ppgtt_huge_fill(void *arg)
  		GEM_BUG_ON(!expected_gtt);
  		GEM_BUG_ON(size);
 
-		if (expected_gtt & I915_GTT_PAGE_SIZE_4K)
-			expected_gtt &= ~I915_GTT_PAGE_SIZE_64K;
-
  		i915_vma_unpin(vma);
 
  		if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) {
@@ -849,7 +846,7 @@ static int igt_mock_ppgtt_64K(void *arg)
  		},
  		{
  			.size = SZ_64K + SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
  			.offset = 0,
  		},
  		{
@@ -864,7 +861,7 @@ static int igt_mock_ppgtt_64K(void *arg)
  		},
  		{
  			.size = SZ_2M - SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
  			.offset = 0,
  		},
  		{
@@ -886,12 +883,12 @@ static int igt_mock_ppgtt_64K(void *arg)
  		{
  			.size = SZ_64K,

drivers/gpu/drm/i915/gem/selftests/huge_pages.c static int igt_mock_ppgtt_64K(void *arg) · line 892

Quoted 10 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -2
  			.offset = SZ_2M,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
  		},
  		{
  			.size = SZ_128K,
  			.offset = SZ_2M - SZ_64K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
  		},

Did you consider the suggestion with possibly making this a live test instead?

The first comment in igt_mock_ppgtt_64K() describing the test is:

/*
* Sanity check some of the trickiness with 64K pages -- either we can
* safely mark the whole page-table(2M block) as 64K, or we have to
* always fallback to 4K.
*/

That doesn't really apply to the new 64K GTT model it seems (which is why it now fails), so trying to adjust the test just because the mock device underneath is now using the newer model doesn't seem correct to me. If we instead make it a live test and only run it on devices with the old 64K GTT model, then we still retain the same test coverage. Alternatively, we could potentially run on both HW models with slightly different test expectations. IMO the test is too HW specific for a mock test.

Quoted 23 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +0 -0
  	};
  	struct i915_vma *vma;
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +2 -1
index 4daaa6f55668..9c571185395f 100644
@@ -570,6 +570,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
  			}
  		} while (rem >= page_size && index < max);
 
+		drm_clflush_virt_range(vaddr, PAGE_SIZE);
  		vma_res->page_sizes_gtt |= page_size;
  	} while (iter->sg && sg_dma_len(iter->sg));
  }
@@ -707,7 +708,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
  	struct sgt_dma iter = sgt_dma(vma_res);
 
  	if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
-		if (HAS_64K_PAGES(vm->i915))
+		if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50))
  			xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
  		else
  			gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
#5 lore raw

-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: Monday, February 27, 2023 3:20 AM
To: Cavitt, Jonathan <[email protected]>; [email protected]
Cc: Dutt, Sudeep <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; De Marchi, Lucas <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/i915: Use correct huge page manager for MTL

Quoted 13 lines · Jonathan Cavitt
Quoted 11 lines

MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is because MTL reports as not supporting 64K pages, or more accurately, the system that reports whether a platform has 64K pages reports false for MTL. This is only half correct, as the 64K page support reporting system only cares about 64K page support for LMEM, which MTL doesn't have.

MTL should be using xehpsdv_ppgtt_insert_huge. However, simply changing over to using that manager doesn't resolve the issue because MTL is expecting the virtual address space for the page table to be flushed after initialization, so we must also add a flush statement there.

Quoted 7 lines
Quoted 4 lines

The changes made to the huge page manager selection indirectly impacted some of the mock hugepage selftests. Due to the use of pte level hints, rather than pde level hints, we now expect 64K page sizes to be properly reported by the GTT, so we should correct the expected test results to reflect this change.

For future submissions, please add the version number for each new submission of the same patch, and also please include the changelog.

I thought we weren't supposed to include that information? Or is that just a "from internal to upstream" thing? -Jonathan Cavitt

Quoted 98 lines
Quoted 43 lines
---
  drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 11 ++++-------
  drivers/gpu/drm/i915/gt/gen8_ppgtt.c            |  3 ++-
  2 files changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -5
index defece0bcb81..06554717495f 100644
@@ -784,9 +784,6 @@ static int igt_mock_ppgtt_huge_fill(void *arg)
  		GEM_BUG_ON(!expected_gtt);
  		GEM_BUG_ON(size);
 
-		if (expected_gtt & I915_GTT_PAGE_SIZE_4K)
-			expected_gtt &= ~I915_GTT_PAGE_SIZE_64K;
-
  		i915_vma_unpin(vma);
 
  		if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) {
@@ -849,7 +846,7 @@ static int igt_mock_ppgtt_64K(void *arg)
  		},
  		{
  			.size = SZ_64K + SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
  			.offset = 0,
  		},
  		{
@@ -864,7 +861,7 @@ static int igt_mock_ppgtt_64K(void *arg)
  		},
  		{
  			.size = SZ_2M - SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
  			.offset = 0,
  		},
  		{
@@ -886,12 +883,12 @@ static int igt_mock_ppgtt_64K(void *arg)
  		{
  			.size = SZ_64K,

drivers/gpu/drm/i915/gem/selftests/huge_pages.c static int igt_mock_ppgtt_64K(void *arg) · line 892

Quoted 10 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -2
  			.offset = SZ_2M,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
  		},
  		{
  			.size = SZ_128K,
  			.offset = SZ_2M - SZ_64K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
  		},

Did you consider the suggestion with possibly making this a live test instead?

The first comment in igt_mock_ppgtt_64K() describing the test is:

/*
* Sanity check some of the trickiness with 64K pages -- either we can
* safely mark the whole page-table(2M block) as 64K, or we have to
* always fallback to 4K.
*/

That doesn't really apply to the new 64K GTT model it seems (which is why it now fails), so trying to adjust the test just because the mock device underneath is now using the newer model doesn't seem correct to me. If we instead make it a live test and only run it on devices with the old 64K GTT model, then we still retain the same test coverage. Alternatively, we could potentially run on both HW models with slightly different test expectations. IMO the test is too HW specific for a mock test.

Quoted 23 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +0 -0
  	};
  	struct i915_vma *vma;
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +2 -1
index 4daaa6f55668..9c571185395f 100644
@@ -570,6 +570,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
  			}
  		} while (rem >= page_size && index < max);
 
+		drm_clflush_virt_range(vaddr, PAGE_SIZE);
  		vma_res->page_sizes_gtt |= page_size;
  	} while (iter->sg && sg_dma_len(iter->sg));
  }
@@ -707,7 +708,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
  	struct sgt_dma iter = sgt_dma(vma_res);
 
  	if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
-		if (HAS_64K_PAGES(vm->i915))
+		if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50))
  			xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
  		else
  			gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
#6 lore raw
Quoted 24 lines · Jonathan

-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: Monday, February 27, 2023 3:20 AM
To: Cavitt, Jonathan <[email protected]>; [email protected]
Cc: Dutt, Sudeep <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; De Marchi, Lucas <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/i915: Use correct huge page manager for MTL

Quoted 18 lines · Jonathan Cavitt
Quoted 15 lines

MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is because MTL reports as not supporting 64K pages, or more accurately, the system that reports whether a platform has 64K pages reports false for MTL. This is only half correct, as the 64K page support reporting system only cares about 64K page support for LMEM, which MTL doesn't have.

MTL should be using xehpsdv_ppgtt_insert_huge. However, simply changing over to using that manager doesn't resolve the issue because MTL is expecting the virtual address space for the page table to be flushed after initialization, so we must also add a flush statement there.

The changes made to the huge page manager selection indirectly impacted some of the mock hugepage selftests. Due to the use of pte level hints, rather than pde level hints, we now expect 64K page sizes to be properly reported by the GTT, so we should correct the expected test results to reflect this change.

Quoted 4 lines
Quoted 2 lines

For future submissions, please add the version number for each new submission of the same patch, and also please include the changelog.

I thought we weren't supposed to include that information? Or is that just a "from internal to upstream" thing?

Yeah, we don't include the original changelog (if there is one) when just going from "internal to upstream", since that changelog is kind of meaningless from upstream pov. Normally that just gets scrubbed, along with any a-b/r-b etc. However, this patch has now gone through a few revisions on @intel-gfx, and each one those should have a version and changelog, as per the usual patch review process.

Also please see my comments below, in case you missed them.

Quoted 100 lines

-Jonathan Cavitt

Quoted 98 lines
Quoted 43 lines
---
   drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 11 ++++-------
   drivers/gpu/drm/i915/gt/gen8_ppgtt.c            |  3 ++-
   2 files changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -5
index defece0bcb81..06554717495f 100644
@@ -784,9 +784,6 @@ static int igt_mock_ppgtt_huge_fill(void *arg)
   		GEM_BUG_ON(!expected_gtt);
   		GEM_BUG_ON(size);
 
-		if (expected_gtt & I915_GTT_PAGE_SIZE_4K)
-			expected_gtt &= ~I915_GTT_PAGE_SIZE_64K;
-
   		i915_vma_unpin(vma);
 
   		if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) {
@@ -849,7 +846,7 @@ static int igt_mock_ppgtt_64K(void *arg)
   		},
   		{
   			.size = SZ_64K + SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
   			.offset = 0,
   		},
   		{
@@ -864,7 +861,7 @@ static int igt_mock_ppgtt_64K(void *arg)
   		},
   		{
   			.size = SZ_2M - SZ_4K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_4K,
   			.offset = 0,
   		},
   		{
@@ -886,12 +883,12 @@ static int igt_mock_ppgtt_64K(void *arg)
   		{
   			.size = SZ_64K,

drivers/gpu/drm/i915/gem/selftests/huge_pages.c static int igt_mock_ppgtt_64K(void *arg) · line 892

Quoted 10 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +2 -2
   			.offset = SZ_2M,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
   		},
   		{
   			.size = SZ_128K,
   			.offset = SZ_2M - SZ_64K,
-			.gtt = I915_GTT_PAGE_SIZE_4K,
+			.gtt = I915_GTT_PAGE_SIZE_64K,
   		},

Did you consider the suggestion with possibly making this a live test instead?

The first comment in igt_mock_ppgtt_64K() describing the test is:

/*
* Sanity check some of the trickiness with 64K pages -- either we can
* safely mark the whole page-table(2M block) as 64K, or we have to
* always fallback to 4K.
*/

That doesn't really apply to the new 64K GTT model it seems (which is why it now fails), so trying to adjust the test just because the mock device underneath is now using the newer model doesn't seem correct to me. If we instead make it a live test and only run it on devices with the old 64K GTT model, then we still retain the same test coverage. Alternatively, we could potentially run on both HW models with slightly different test expectations. IMO the test is too HW specific for a mock test.

Quoted 23 lines
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +0 -0
   	};
   	struct i915_vma *vma;
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +2 -1
index 4daaa6f55668..9c571185395f 100644
@@ -570,6 +570,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm,
   			}
   		} while (rem >= page_size && index < max);
 
+		drm_clflush_virt_range(vaddr, PAGE_SIZE);
   		vma_res->page_sizes_gtt |= page_size;
   	} while (iter->sg && sg_dma_len(iter->sg));
   }
@@ -707,7 +708,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm,
   	struct sgt_dma iter = sgt_dma(vma_res);
 
   	if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) {
-		if (HAS_64K_PAGES(vm->i915))
+		if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50))
   			xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);
   		else
   			gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags);