* [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media
@ 2023-04-20 11:38 Nirmoy Das
2023-04-20 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Nirmoy Das @ 2023-04-20 11:38 UTC (permalink / raw)
To: intel-gfx; +Cc: Andrzej Hajda, Nirmoy Das, dri-devel
From: Fei Yang <fei.yang@intel.com>
This patch implements Wa_22016122933.
In MTL, memory writes initiated by Media tile update the whole
cache line even for partial writes. This creates a coherency
problem for cacheable memory if both CPU and GPU are writing data
to different locations within a single cache line. CTB communication
is impacted by this issue because the head and tail pointers are
adjacent words within a cache line (see struct guc_ct_buffer_desc),
where one is written by GuC and the other by the host.
This patch circumvents the issue by making CPU/GPU shared memory
uncacheable (WC on CPU side, and PAT index 2 for GPU). Also for
CTB which is being updated by both CPU and GuC, mfence instruction
is added to make sure the CPU writes are visible to GPU right away
(flush the write combining buffer).
While fixing the CTB issue, we noticed some random GSC firmware
loading failure because the share buffers are cacheable (WB) on CPU
side but uncached on GPU side. To fix these issues we need to map
such shared buffers as WC on CPU side. Since such allocations are
not all done through GuC allocator, to avoid too many code changes,
the i915_coherent_map_type() is now hard coded to return WC for MTL.
BSpec: 45101
Signed-off-by: Fei Yang <fei.yang@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 5 ++++-
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 13 +++++++++++++
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++++++
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++++++
4 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index ecd86130b74f..89fc8ea6bcfc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -469,7 +469,10 @@ enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915,
struct drm_i915_gem_object *obj,
bool always_coherent)
{
- if (i915_gem_object_is_lmem(obj))
+ /*
+ * Wa_22016122933: always return I915_MAP_WC for MTL
+ */
+ if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915))
return I915_MAP_WC;
if (HAS_LLC(i915) || always_coherent)
return I915_MAP_WB;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
index 1d9fdfb11268..236673c02f9a 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
@@ -110,6 +110,13 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
if (obj->base.size < gsc->fw.size)
return -ENOSPC;
+ /*
+ * Wa_22016122933: For MTL the shared memory needs to be mapped
+ * as WC on CPU side and UC (PAT index 2) on GPU side
+ */
+ if (IS_METEORLAKE(i915))
+ i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
+
dst = i915_gem_object_pin_map_unlocked(obj,
i915_coherent_map_type(i915, obj, true));
if (IS_ERR(dst))
@@ -125,6 +132,12 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
memset(dst, 0, obj->base.size);
memcpy(dst, src, gsc->fw.size);
+ /*
+ * Wa_22016122933: Making sure the data in dst is
+ * visible to GSC right away
+ */
+ intel_guc_write_barrier(>->uc.guc);
+
i915_gem_object_unpin_map(gsc->fw.obj);
i915_gem_object_unpin_map(obj);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index e89f16ecf1ae..c9f20385f6a0 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -744,6 +744,13 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size)
if (IS_ERR(obj))
return ERR_CAST(obj);
+ /*
+ * Wa_22016122933: For MTL the shared memory needs to be mapped
+ * as WC on CPU side and UC (PAT index 2) on GPU side
+ */
+ if (IS_METEORLAKE(gt->i915))
+ i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
+
vma = i915_vma_instance(obj, >->ggtt->vm, NULL);
if (IS_ERR(vma))
goto err;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 1803a633ed64..99a0a89091e7 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -902,6 +902,12 @@ static int ct_read(struct intel_guc_ct *ct, struct ct_incoming_msg **msg)
/* now update descriptor */
WRITE_ONCE(desc->head, head);
+ /*
+ * Wa_22016122933: Making sure the head update is
+ * visible to GuC right away
+ */
+ intel_guc_write_barrier(ct_to_guc(ct));
+
return available - len;
corrupted:
--
2.39.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: workaround coherency issue for Media
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
@ 2023-04-20 15:15 ` Patchwork
2023-04-20 20:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-04-20 15:15 UTC (permalink / raw)
To: Nirmoy Das; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]
== Series Details ==
Series: drm/i915/mtl: workaround coherency issue for Media
URL : https://patchwork.freedesktop.org/series/116751/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13034 -> Patchwork_116751v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/index.html
Participating hosts (37 -> 36)
------------------------------
Missing (1): fi-snb-2520m
Known issues
------------
Here are the changes found in Patchwork_116751v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@reset:
- bat-rpls-1: NOTRUN -> [ABORT][1] ([i915#4983] / [i915#7981])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/bat-rpls-1/igt@i915_selftest@live@reset.html
- bat-adlp-6: [PASS][2] -> [ABORT][3] ([i915#4983] / [i915#7913])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/bat-adlp-6/igt@i915_selftest@live@reset.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/bat-adlp-6/igt@i915_selftest@live@reset.html
* igt@i915_selftest@live@workarounds:
- bat-rpls-1: [PASS][4] -> [DMESG-FAIL][5] ([i915#6763])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/bat-rpls-1/igt@i915_selftest@live@workarounds.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/bat-rpls-1/igt@i915_selftest@live@workarounds.html
#### Possible fixes ####
* igt@i915_selftest@live@mman:
- bat-rpls-1: [TIMEOUT][6] ([i915#6794]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/bat-rpls-1/igt@i915_selftest@live@mman.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/bat-rpls-1/igt@i915_selftest@live@mman.html
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6763]: https://gitlab.freedesktop.org/drm/intel/issues/6763
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
Build changes
-------------
* Linux: CI_DRM_13034 -> Patchwork_116751v1
CI-20190529: 20190529
CI_DRM_13034: bf6a3fbb5a6d7afbbaeb93043fd0001d6b83591b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7263: a6bd8f415c4ec41b5a014c7db47e46c81ffd0074 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116751v1: bf6a3fbb5a6d7afbbaeb93043fd0001d6b83591b @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
20e858c4a176 drm/i915/mtl: workaround coherency issue for Media
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/index.html
[-- Attachment #2: Type: text/html, Size: 3584 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/mtl: workaround coherency issue for Media
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
2023-04-20 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-04-20 20:42 ` Patchwork
2023-04-20 21:30 ` [Intel-gfx] [PATCH] " Matt Roper
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-04-20 20:42 UTC (permalink / raw)
To: Nirmoy Das; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 13536 bytes --]
== Series Details ==
Series: drm/i915/mtl: workaround coherency issue for Media
URL : https://patchwork.freedesktop.org/series/116751/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13034_full -> Patchwork_116751v1_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_116751v1_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_116751v1_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_116751v1_full:
### IGT changes ###
#### Possible regressions ####
* igt@i915_pm_rps@engine-order:
- shard-glk: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-glk1/igt@i915_pm_rps@engine-order.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-glk4/igt@i915_pm_rps@engine-order.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@kms_flip@2x-flip-vs-fences-interruptible:
- {shard-dg1}: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-dg1-16/igt@kms_flip@2x-flip-vs-fences-interruptible.html
Known issues
------------
Here are the changes found in Patchwork_116751v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [PASS][4] -> [FAIL][5] ([i915#2842])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-apl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gen9_exec_parse@allowed-single:
- shard-apl: [PASS][6] -> [ABORT][7] ([i915#5566])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-apl7/igt@gen9_exec_parse@allowed-single.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-apl7/igt@gen9_exec_parse@allowed-single.html
* igt@kms_color@ctm-0-25@pipe-b-vga-1:
- shard-snb: NOTRUN -> [SKIP][8] ([fdo#109271]) +8 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-snb7/igt@kms_color@ctm-0-25@pipe-b-vga-1.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-glk: [PASS][9] -> [FAIL][10] ([i915#2346])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-glk8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-glk5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
#### Possible fixes ####
* igt@gem_barrier_race@remote-request@rcs0:
- {shard-rkl}: [ABORT][11] ([i915#8211]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-rkl-7/igt@gem_barrier_race@remote-request@rcs0.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-rkl-4/igt@gem_barrier_race@remote-request@rcs0.html
* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}: [FAIL][13] ([i915#6268]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-rkl-6/igt@gem_ctx_exec@basic-nohangcheck.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-rkl-2/igt@gem_ctx_exec@basic-nohangcheck.html
* igt@gem_exec_endless@dispatch@rcs0:
- {shard-tglu}: [TIMEOUT][15] ([i915#3778]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-tglu-8/igt@gem_exec_endless@dispatch@rcs0.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-tglu-4/igt@gem_exec_endless@dispatch@rcs0.html
* igt@gem_exec_fair@basic-deadline:
- shard-apl: [FAIL][17] ([i915#2846]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-apl4/igt@gem_exec_fair@basic-deadline.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-apl6/igt@gem_exec_fair@basic-deadline.html
- shard-glk: [FAIL][19] ([i915#2846]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-glk7/igt@gem_exec_fair@basic-deadline.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-glk6/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-none@vcs0:
- {shard-rkl}: [FAIL][21] ([i915#2842]) -> [PASS][22] +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-rkl-7/igt@gem_exec_fair@basic-none@vcs0.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-rkl-4/igt@gem_exec_fair@basic-none@vcs0.html
* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
- {shard-rkl}: [SKIP][23] ([i915#1937]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-rkl-3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-rkl-7/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
- {shard-dg1}: [SKIP][25] ([i915#1937]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-dg1-18/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-dg1-14/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
* igt@i915_pm_rpm@modeset-lpsp-stress-no-wait:
- {shard-dg1}: [SKIP][27] ([i915#1397]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-dg1-18/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-dg1-14/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html
* igt@kms_cursor_legacy@forked-bo@pipe-b:
- {shard-rkl}: [INCOMPLETE][29] ([i915#8011]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-rkl-7/igt@kms_cursor_legacy@forked-bo@pipe-b.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-rkl-4/igt@kms_cursor_legacy@forked-bo@pipe-b.html
* igt@kms_flip@flip-vs-expired-vblank@c-dp1:
- shard-apl: [FAIL][31] ([i915#79]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13034/shard-apl1/igt@kms_flip@flip-vs-expired-vblank@c-dp1.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v1/shard-apl4/igt@kms_flip@flip-vs-expired-vblank@c-dp1.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[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#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[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#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[i915#3938]: https://gitlab.freedesktop.org/drm/intel/issues/3938
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[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#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[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#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[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#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
Build changes
-------------
* Linux: CI_DRM_13034 -> Patchwork_116751v1
CI-20190529: 20190529
CI_DRM_13034: bf6a3fbb5a6d7afbbaeb93043fd0001d6b83591b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7263: a6bd8f415c4ec41b5a014c7db47e46c81ffd0074 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116751v1: bf6a3fbb5a6d7afbbaeb93043fd0001d6b83591b @ 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_116751v1/index.html
[-- Attachment #2: Type: text/html, Size: 9813 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
2023-04-20 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-20 20:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2023-04-20 21:30 ` Matt Roper
2023-04-21 7:57 ` Das, Nirmoy
2023-04-20 22:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: workaround coherency issue for Media (rev2) Patchwork
2023-04-21 7:11 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
4 siblings, 1 reply; 7+ messages in thread
From: Matt Roper @ 2023-04-20 21:30 UTC (permalink / raw)
To: Nirmoy Das; +Cc: intel-gfx, dri-devel, Andrzej Hajda
On Thu, Apr 20, 2023 at 01:38:59PM +0200, Nirmoy Das wrote:
> From: Fei Yang <fei.yang@intel.com>
>
> This patch implements Wa_22016122933.
>
> In MTL, memory writes initiated by Media tile update the whole
> cache line even for partial writes. This creates a coherency
> problem for cacheable memory if both CPU and GPU are writing data
> to different locations within a single cache line. CTB communication
> is impacted by this issue because the head and tail pointers are
> adjacent words within a cache line (see struct guc_ct_buffer_desc),
> where one is written by GuC and the other by the host.
> This patch circumvents the issue by making CPU/GPU shared memory
> uncacheable (WC on CPU side, and PAT index 2 for GPU). Also for
> CTB which is being updated by both CPU and GuC, mfence instruction
> is added to make sure the CPU writes are visible to GPU right away
> (flush the write combining buffer).
I posted a note about the commit message here on the original series
about an hour ago:
https://lore.kernel.org/intel-gfx/20230420205238.GA4085390@mdroper-desk1.amr.corp.intel.com/
Patch itself looks fine, I just think the last sentence above should be
simplified to avoid inaccuracy.
Matt
>
> While fixing the CTB issue, we noticed some random GSC firmware
> loading failure because the share buffers are cacheable (WB) on CPU
> side but uncached on GPU side. To fix these issues we need to map
> such shared buffers as WC on CPU side. Since such allocations are
> not all done through GuC allocator, to avoid too many code changes,
> the i915_coherent_map_type() is now hard coded to return WC for MTL.
>
> BSpec: 45101
>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> Acked-by: Nirmoy Das <nirmoy.das@intel.com>
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_pages.c | 5 ++++-
> drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 13 +++++++++++++
> drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++++++
> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++++++
> 4 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> index ecd86130b74f..89fc8ea6bcfc 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> @@ -469,7 +469,10 @@ enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915,
> struct drm_i915_gem_object *obj,
> bool always_coherent)
> {
> - if (i915_gem_object_is_lmem(obj))
> + /*
> + * Wa_22016122933: always return I915_MAP_WC for MTL
> + */
> + if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915))
> return I915_MAP_WC;
> if (HAS_LLC(i915) || always_coherent)
> return I915_MAP_WB;
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> index 1d9fdfb11268..236673c02f9a 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> @@ -110,6 +110,13 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
> if (obj->base.size < gsc->fw.size)
> return -ENOSPC;
>
> + /*
> + * Wa_22016122933: For MTL the shared memory needs to be mapped
> + * as WC on CPU side and UC (PAT index 2) on GPU side
> + */
> + if (IS_METEORLAKE(i915))
> + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
> +
> dst = i915_gem_object_pin_map_unlocked(obj,
> i915_coherent_map_type(i915, obj, true));
> if (IS_ERR(dst))
> @@ -125,6 +132,12 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
> memset(dst, 0, obj->base.size);
> memcpy(dst, src, gsc->fw.size);
>
> + /*
> + * Wa_22016122933: Making sure the data in dst is
> + * visible to GSC right away
> + */
> + intel_guc_write_barrier(>->uc.guc);
> +
> i915_gem_object_unpin_map(gsc->fw.obj);
> i915_gem_object_unpin_map(obj);
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> index e89f16ecf1ae..c9f20385f6a0 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> @@ -744,6 +744,13 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size)
> if (IS_ERR(obj))
> return ERR_CAST(obj);
>
> + /*
> + * Wa_22016122933: For MTL the shared memory needs to be mapped
> + * as WC on CPU side and UC (PAT index 2) on GPU side
> + */
> + if (IS_METEORLAKE(gt->i915))
> + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
> +
> vma = i915_vma_instance(obj, >->ggtt->vm, NULL);
> if (IS_ERR(vma))
> goto err;
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> index 1803a633ed64..99a0a89091e7 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> @@ -902,6 +902,12 @@ static int ct_read(struct intel_guc_ct *ct, struct ct_incoming_msg **msg)
> /* now update descriptor */
> WRITE_ONCE(desc->head, head);
>
> + /*
> + * Wa_22016122933: Making sure the head update is
> + * visible to GuC right away
> + */
> + intel_guc_write_barrier(ct_to_guc(ct));
> +
> return available - len;
>
> corrupted:
> --
> 2.39.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: workaround coherency issue for Media (rev2)
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
` (2 preceding siblings ...)
2023-04-20 21:30 ` [Intel-gfx] [PATCH] " Matt Roper
@ 2023-04-20 22:07 ` Patchwork
2023-04-21 7:11 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-04-20 22:07 UTC (permalink / raw)
To: Nirmoy Das; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 4558 bytes --]
== Series Details ==
Series: drm/i915/mtl: workaround coherency issue for Media (rev2)
URL : https://patchwork.freedesktop.org/series/116751/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13035 -> Patchwork_116751v2
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/index.html
Participating hosts (36 -> 36)
------------------------------
Additional (1): bat-mtlp-8
Missing (1): fi-snb-2520m
Known issues
------------
Here are the changes found in Patchwork_116751v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@requests:
- bat-rpls-1: [PASS][1] -> [ABORT][2] ([i915#7911])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/bat-rpls-1/igt@i915_selftest@live@requests.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/bat-rpls-1/igt@i915_selftest@live@requests.html
* igt@i915_selftest@live@slpc:
- bat-rplp-1: [PASS][3] -> [DMESG-FAIL][4] ([i915#6367] / [i915#7913])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/bat-rplp-1/igt@i915_selftest@live@slpc.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/bat-rplp-1/igt@i915_selftest@live@slpc.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@lmem0:
- bat-dg2-9: [FAIL][5] ([fdo#103375]) -> [PASS][6] +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/bat-dg2-9/igt@gem_exec_suspend@basic-s3@lmem0.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/bat-dg2-9/igt@gem_exec_suspend@basic-s3@lmem0.html
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3:
- bat-dg2-9: [FAIL][7] ([fdo#103375] / [i915#7932]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/bat-dg2-9/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/bat-dg2-9/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3.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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8346]: https://gitlab.freedesktop.org/drm/intel/issues/8346
[i915#8368]: https://gitlab.freedesktop.org/drm/intel/issues/8368
[i915#8369]: https://gitlab.freedesktop.org/drm/intel/issues/8369
[i915#8370]: https://gitlab.freedesktop.org/drm/intel/issues/8370
[i915#8379]: https://gitlab.freedesktop.org/drm/intel/issues/8379
Build changes
-------------
* Linux: CI_DRM_13035 -> Patchwork_116751v2
CI-20190529: 20190529
CI_DRM_13035: 182419213bd7d88fead18eb0830855b675b093d7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7263: a6bd8f415c4ec41b5a014c7db47e46c81ffd0074 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116751v2: 182419213bd7d88fead18eb0830855b675b093d7 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
a7403f6a505b drm/i915/mtl: workaround coherency issue for Media
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/index.html
[-- Attachment #2: Type: text/html, Size: 4039 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/mtl: workaround coherency issue for Media (rev2)
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
` (3 preceding siblings ...)
2023-04-20 22:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: workaround coherency issue for Media (rev2) Patchwork
@ 2023-04-21 7:11 ` Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-04-21 7:11 UTC (permalink / raw)
To: Nirmoy Das; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 14618 bytes --]
== Series Details ==
Series: drm/i915/mtl: workaround coherency issue for Media (rev2)
URL : https://patchwork.freedesktop.org/series/116751/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13035_full -> Patchwork_116751v2_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_116751v2_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_116751v2_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_116751v2_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_eio@in-flight-contexts-10ms:
- shard-snb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-snb5/igt@gem_eio@in-flight-contexts-10ms.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-snb5/igt@gem_eio@in-flight-contexts-10ms.html
* igt@gem_ppgtt@blt-vs-render-ctxn:
- shard-snb: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-snb1/igt@gem_ppgtt@blt-vs-render-ctxn.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-snb1/igt@gem_ppgtt@blt-vs-render-ctxn.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@kms_flip@flip-vs-fences:
- {shard-dg1}: NOTRUN -> [SKIP][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-dg1-18/igt@kms_flip@flip-vs-fences.html
Known issues
------------
Here are the changes found in Patchwork_116751v2_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-deadline:
- shard-apl: [PASS][6] -> [FAIL][7] ([i915#2846])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-apl4/igt@gem_exec_fair@basic-deadline.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-apl1/igt@gem_exec_fair@basic-deadline.html
* igt@gen9_exec_parse@allowed-single:
- shard-apl: [PASS][8] -> [ABORT][9] ([i915#5566])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-apl3/igt@gen9_exec_parse@allowed-single.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-apl4/igt@gen9_exec_parse@allowed-single.html
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-glk: [PASS][10] -> [FAIL][11] ([i915#2346])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-glk8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-glk3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
* igt@kms_psr@psr2_sprite_plane_onoff:
- shard-snb: NOTRUN -> [SKIP][12] ([fdo#109271]) +47 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-snb2/igt@kms_psr@psr2_sprite_plane_onoff.html
* igt@kms_setmode@basic@pipe-a-hdmi-a-1:
- shard-snb: NOTRUN -> [FAIL][13] ([i915#5465]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-snb1/igt@kms_setmode@basic@pipe-a-hdmi-a-1.html
* igt@perf@stress-open-close@0-rcs0:
- shard-glk: [PASS][14] -> [ABORT][15] ([i915#5213])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-glk9/igt@perf@stress-open-close@0-rcs0.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-glk3/igt@perf@stress-open-close@0-rcs0.html
#### Possible fixes ####
* igt@gem_exec_fair@basic-deadline:
- shard-glk: [FAIL][16] ([i915#2846]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-glk5/igt@gem_exec_fair@basic-deadline.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-glk8/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-none@bcs0:
- {shard-rkl}: [FAIL][18] ([i915#2842]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-rkl-3/igt@gem_exec_fair@basic-none@bcs0.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-rkl-4/igt@gem_exec_fair@basic-none@bcs0.html
* igt@gem_exec_suspend@basic-s4-devices@smem:
- {shard-tglu}: [ABORT][20] ([i915#7975]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-tglu-10/igt@gem_exec_suspend@basic-s4-devices@smem.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-tglu-7/igt@gem_exec_suspend@basic-s4-devices@smem.html
* igt@i915_pm_rpm@modeset-lpsp-stress-no-wait:
- {shard-dg1}: [SKIP][22] ([i915#1397]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-dg1-18/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-dg1-14/igt@i915_pm_rpm@modeset-lpsp-stress-no-wait.html
* igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
- {shard-rkl}: [SKIP][24] ([i915#1397]) -> [PASS][25] +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-rkl-7/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-rkl-1/igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait.html
* igt@i915_pm_rps@reset:
- shard-snb: [INCOMPLETE][26] ([i915#7790]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-snb1/igt@i915_pm_rps@reset.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-snb2/igt@i915_pm_rps@reset.html
* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [DMESG-FAIL][28] ([i915#5334]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-apl6/igt@i915_selftest@live@gt_heartbeat.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-apl2/igt@i915_selftest@live@gt_heartbeat.html
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- {shard-rkl}: [FAIL][30] ([i915#3743]) -> [PASS][31] +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-rkl-7/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-rkl-6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
* igt@kms_cursor_legacy@forked-move@pipe-b:
- {shard-rkl}: [INCOMPLETE][32] ([i915#8011]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13035/shard-rkl-7/igt@kms_cursor_legacy@forked-move@pipe-b.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116751v2/shard-rkl-1/igt@kms_cursor_legacy@forked-move@pipe-b.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[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#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[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#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[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#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[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#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[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#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884
[i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[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#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5465]: https://gitlab.freedesktop.org/drm/intel/issues/5465
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[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#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[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#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8155]: https://gitlab.freedesktop.org/drm/intel/issues/8155
[i915#8247]: https://gitlab.freedesktop.org/drm/intel/issues/8247
Build changes
-------------
* Linux: CI_DRM_13035 -> Patchwork_116751v2
CI-20190529: 20190529
CI_DRM_13035: 182419213bd7d88fead18eb0830855b675b093d7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7263: a6bd8f415c4ec41b5a014c7db47e46c81ffd0074 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116751v2: 182419213bd7d88fead18eb0830855b675b093d7 @ 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_116751v2/index.html
[-- Attachment #2: Type: text/html, Size: 10270 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media
2023-04-20 21:30 ` [Intel-gfx] [PATCH] " Matt Roper
@ 2023-04-21 7:57 ` Das, Nirmoy
0 siblings, 0 replies; 7+ messages in thread
From: Das, Nirmoy @ 2023-04-21 7:57 UTC (permalink / raw)
To: Matt Roper; +Cc: intel-gfx, dri-devel, Andrzej Hajda
On 4/20/2023 11:30 PM, Matt Roper wrote:
> On Thu, Apr 20, 2023 at 01:38:59PM +0200, Nirmoy Das wrote:
>> From: Fei Yang <fei.yang@intel.com>
>>
>> This patch implements Wa_22016122933.
>>
>> In MTL, memory writes initiated by Media tile update the whole
>> cache line even for partial writes. This creates a coherency
>> problem for cacheable memory if both CPU and GPU are writing data
>> to different locations within a single cache line. CTB communication
>> is impacted by this issue because the head and tail pointers are
>> adjacent words within a cache line (see struct guc_ct_buffer_desc),
>> where one is written by GuC and the other by the host.
>> This patch circumvents the issue by making CPU/GPU shared memory
>> uncacheable (WC on CPU side, and PAT index 2 for GPU). Also for
>> CTB which is being updated by both CPU and GuC, mfence instruction
>> is added to make sure the CPU writes are visible to GPU right away
>> (flush the write combining buffer).
> I posted a note about the commit message here on the original series
> about an hour ago:
>
> https://lore.kernel.org/intel-gfx/20230420205238.GA4085390@mdroper-desk1.amr.corp.intel.com/
>
> Patch itself looks fine, I just think the last sentence above should be
> simplified to avoid inaccuracy.
Thanks for your review, Matt. I will resend with that fixed.
Nirmoy
>
> Matt
>
>> While fixing the CTB issue, we noticed some random GSC firmware
>> loading failure because the share buffers are cacheable (WB) on CPU
>> side but uncached on GPU side. To fix these issues we need to map
>> such shared buffers as WC on CPU side. Since such allocations are
>> not all done through GuC allocator, to avoid too many code changes,
>> the i915_coherent_map_type() is now hard coded to return WC for MTL.
>>
>> BSpec: 45101
>>
>> Signed-off-by: Fei Yang <fei.yang@intel.com>
>> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
>> Acked-by: Nirmoy Das <nirmoy.das@intel.com>
>> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_pages.c | 5 ++++-
>> drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 13 +++++++++++++
>> drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++++++
>> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++++++
>> 4 files changed, 30 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
>> index ecd86130b74f..89fc8ea6bcfc 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
>> @@ -469,7 +469,10 @@ enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915,
>> struct drm_i915_gem_object *obj,
>> bool always_coherent)
>> {
>> - if (i915_gem_object_is_lmem(obj))
>> + /*
>> + * Wa_22016122933: always return I915_MAP_WC for MTL
>> + */
>> + if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915))
>> return I915_MAP_WC;
>> if (HAS_LLC(i915) || always_coherent)
>> return I915_MAP_WB;
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
>> index 1d9fdfb11268..236673c02f9a 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
>> @@ -110,6 +110,13 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
>> if (obj->base.size < gsc->fw.size)
>> return -ENOSPC;
>>
>> + /*
>> + * Wa_22016122933: For MTL the shared memory needs to be mapped
>> + * as WC on CPU side and UC (PAT index 2) on GPU side
>> + */
>> + if (IS_METEORLAKE(i915))
>> + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
>> +
>> dst = i915_gem_object_pin_map_unlocked(obj,
>> i915_coherent_map_type(i915, obj, true));
>> if (IS_ERR(dst))
>> @@ -125,6 +132,12 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc)
>> memset(dst, 0, obj->base.size);
>> memcpy(dst, src, gsc->fw.size);
>>
>> + /*
>> + * Wa_22016122933: Making sure the data in dst is
>> + * visible to GSC right away
>> + */
>> + intel_guc_write_barrier(>->uc.guc);
>> +
>> i915_gem_object_unpin_map(gsc->fw.obj);
>> i915_gem_object_unpin_map(obj);
>>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
>> index e89f16ecf1ae..c9f20385f6a0 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
>> @@ -744,6 +744,13 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size)
>> if (IS_ERR(obj))
>> return ERR_CAST(obj);
>>
>> + /*
>> + * Wa_22016122933: For MTL the shared memory needs to be mapped
>> + * as WC on CPU side and UC (PAT index 2) on GPU side
>> + */
>> + if (IS_METEORLAKE(gt->i915))
>> + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
>> +
>> vma = i915_vma_instance(obj, >->ggtt->vm, NULL);
>> if (IS_ERR(vma))
>> goto err;
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> index 1803a633ed64..99a0a89091e7 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> @@ -902,6 +902,12 @@ static int ct_read(struct intel_guc_ct *ct, struct ct_incoming_msg **msg)
>> /* now update descriptor */
>> WRITE_ONCE(desc->head, head);
>>
>> + /*
>> + * Wa_22016122933: Making sure the head update is
>> + * visible to GuC right away
>> + */
>> + intel_guc_write_barrier(ct_to_guc(ct));
>> +
>> return available - len;
>>
>> corrupted:
>> --
>> 2.39.0
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-21 7:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 11:38 [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media Nirmoy Das
2023-04-20 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-20 20:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-20 21:30 ` [Intel-gfx] [PATCH] " Matt Roper
2023-04-21 7:57 ` Das, Nirmoy
2023-04-20 22:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mtl: workaround coherency issue for Media (rev2) Patchwork
2023-04-21 7:11 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox