drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
Subsystems (2)
PATCH 1/1 drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
For newer platforms (post DG2) hardware intentionally stalls on submisstion of concurrent RCS and CCS of different address spaces. With this workaround GuC will never schedule such conlicting contexts; preventing detection of a stall as a hang.
GuC specs recommend to enable this for all platforms starting from MTL supporting CCS.
--- drivers/gpu/drm/i915/gt/intel_gt.h | 8 ++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt.h +8 -0
@@ -24,6 +24,14 @@ struct drm_printer;GRAPHICS_VER_FULL ((gt)->i915) >= (from ) && \ GRAPHICS_VER_FULL((gt)->i915) <= (until))) +/* + * Check that the GT is a graphics GT and has atleast minimum IP version. + */ +#define IS_GFX_GT_IP_ATLEAST(gt, from) ( \ +BUILD_BUG_ON_ZERO ((from) <IP_VER (2 ,0 )) + \ + ((gt)->type !=GT_MEDIA && \ +GRAPHICS_VER_FULL ((gt)->i915) >= (from))) +/* * Check that the GT is a media GT and has an IP version within the * specified range (inclusive).
drivers/gpu/drm/i915/gt/uc/intel_guc.c +6 -3
@@ -313,8 +313,12 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)* * The same WA bit is used for both and 22011391025 is applicable to * all DG2. +* +* Platforms post DG2 prevent behavior in hardware. This is implicitly +* enabled to give guc management over CCS scheduling. */ -if (IS_DG2 (gt->i915)) +if (IS_DG2 (gt->i915) || + (CCS_MASK (gt) &&IS_GFX_GT_IP_ATLEAST (gt,IP_VER (12 ,70 )))) flags |=GUC_WA_DUAL_QUEUE ;/* Wa_22011802037: graphics version 11/12 */
@@ -322,8 +326,7 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc) flags |=GUC_WA_PRE_PARSER ;/* -* Wa_22012727170 -* Wa_22012727685 +* Wa_22012727170 Wa_22012727685 */ if (IS_DG2_G11 (gt->i915)) flags |=GUC_WA_CONTEXT_ISOLATION ;
Signature · 1 line
2.49.0
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
== Series Details ==
== Series Details ==
Series: drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
URL : https://patchwork.freedesktop.org/series/147987/
State : warning
== Summary ==
Error: dim checkpatch failedc5649d6a3089 drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms -:25: WARNING:TYPO_SPELLING: 'atleast' may be misspelled - perhaps 'at least'? #25: FILE: drivers/gpu/drm/i915/gt/intel_gt.h:28:
+ * Check that the GT is a graphics GT and has atleast minimum IP version.
^^^^^^^
-:27: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'gt' - possible side-effects? #27: FILE: drivers/gpu/drm/i915/gt/intel_gt.h:30:
+#define IS_GFX_GT_IP_ATLEAST(gt, from) ( \
+ BUILD_BUG_ON_ZERO((from) < IP_VER(2, 0)) + \
+ ((gt)->type != GT_MEDIA && \
+ GRAPHICS_VER_FULL((gt)->i915) >= (from)))
-:27: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'from' - possible side-effects? #27: FILE: drivers/gpu/drm/i915/gt/intel_gt.h:30:
+#define IS_GFX_GT_IP_ATLEAST(gt, from) ( \
+ BUILD_BUG_ON_ZERO((from) < IP_VER(2, 0)) + \
+ ((gt)->type != GT_MEDIA && \
+ GRAPHICS_VER_FULL((gt)->i915) >= (from)))
total: 0 errors, 1 warnings, 2 checks, 36 lines checked
Patchwork
CI✗ Fi.CI.SPARSE: warning for drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
In reply to Julia Filipchuk== Series Details ==
== Series Details ==
Series: drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
URL : https://patchwork.freedesktop.org/series/147987/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI✓ i915.CI.BAT: success for drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
In reply to Julia Filipchuk== Series Details ==
== Series Details ==
Series: drm/i915/guc: Enable DUAL_QUEUE_WA for newer platforms
URL : https://patchwork.freedesktop.org/series/147987/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_16439 -> Patchwork_147987v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/index.html
Participating hosts (46 -> 43)
------------------------------
Missing (3): fi-glk-j4005 bat-adlp-11 fi-snb-2520m
Known issues
------------
Here are the changes found in Patchwork_147987v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live:
- bat-arlh-3: [PASS][1] -> [ABORT][2] ([i915#13723] / [i915#13949])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16439/bat-arlh-3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/bat-arlh-3/igt@[email protected]
* igt@i915_selftest@live@gt_mocs:
- bat-arlh-3: [PASS][3] -> [ABORT][4] ([i915#13949])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16439/bat-arlh-3/igt@i915_selftest@live@gt_mocs.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/bat-arlh-3/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@guc_hang:
- bat-twl-2: [PASS][5] -> [INCOMPLETE][6] ([i915#14096]) +1 other test incomplete
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16439/bat-twl-2/igt@i915_selftest@live@guc_hang.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/bat-twl-2/igt@i915_selftest@live@guc_hang.html
* igt@i915_selftest@live@workarounds:
- bat-dg2-11: [PASS][7] -> [DMESG-FAIL][8] ([i915#12061]) +1 other test dmesg-fail
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16439/bat-dg2-11/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/bat-dg2-11/igt@i915_selftest@[email protected]
#### Possible fixes ####
* igt@kms_hdmi_inject@inject-audio:
- fi-tgl-1115g4: [FAIL][9] ([i915#13930]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16439/fi-tgl-1115g4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/fi-tgl-1115g4/igt@[email protected]
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#13723]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13723
[i915#13930]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13930
[i915#13949]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13949
[i915#14096]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14096
Build changes
-------------
* Linux: CI_DRM_16439 -> Patchwork_147987v1
CI-20190529: 20190529
CI_DRM_16439: d161139329a7bc9d9659a73b965292d036c97e9d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8328: 8328
Patchwork_147987v1: d161139329a7bc9d9659a73b965292d036c97e9d @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_147987v1/index.html
Jani Nikula
maintainerQuoted 39 lines · Julia Filipchuk
For newer platforms (post DG2) hardware intentionally stalls on submisstion of concurrent RCS and CCS of different address spaces. With this workaround GuC will never schedule such conlicting contexts; preventing detection of a stall as a hang.
GuC specs recommend to enable this for all platforms starting from MTL supporting CCS.
Signed-off-by Julia Filipchuk <[email protected]>--- drivers/gpu/drm/i915/gt/intel_gt.h | 8 ++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_gt.h +8
-0@@ -24,6 +24,14 @@ struct drm_printer;GRAPHICS_VER_FULL ((gt)->i915) >= (from ) && \ GRAPHICS_VER_FULL((gt)->i915) <= (until))) +/* + * Check that the GT is a graphics GT and has atleast minimum IP version. + */ +#define IS_GFX_GT_IP_ATLEAST(gt, from) ( \ +BUILD_BUG_ON_ZERO ((from) <IP_VER (2 ,0 )) + \ + ((gt)->type !=GT_MEDIA && \ +GRAPHICS_VER_FULL ((gt)->i915) >= (from))) +/* * Check that the GT is a media GT and has an IP version within the * specified range (inclusive). drivers/gpu/drm/i915/gt/uc/intel_guc.c +0
-0@@ -313,8 +313,12 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)*
drivers/gpu/drm/i915/gt/uc/intel_guc.c static u32 guc_ctl_wa_flags(struct intel_guc *guc) · line 322
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +5
-1* The same WA bit is used for both and 22011391025 is applicable to * all DG2. +* +* Platforms post DG2 prevent behavior in hardware. This is implicitly +* enabled to give guc management over CCS scheduling. */ -if (IS_DG2 (gt->i915)) +if (IS_DG2 (gt->i915) || + (CCS_MASK (gt) &&IS_GFX_GT_IP_ATLEAST (gt,IP_VER (12 ,70 )))) flags |=GUC_WA_DUAL_QUEUE ;
GRAPHICS_VER_FULL((gt)->i915) >= IP_VER(12, 70)
You don't need an extra macro for a single use case that is covered by existing macros.
BR,
Jani.
Quoted 12 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +1
-2/* Wa_22011802037: graphics version 11/12 */ @@ -322,8 +326,7 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc) flags |=GUC_WA_PRE_PARSER ;/* -* Wa_22012727170 -* Wa_22012727685 +* Wa_22012727170 Wa_22012727685 */ if (IS_DG2_G11 (gt->i915)) flags |=GUC_WA_CONTEXT_ISOLATION ;
Signature · 1 line
Jani Nikula, Intel
Appreciate the suggestion.
The additional checks in the IS_GFX_GT_IP_RANGE macro must be for legacy changes and not needed here.