Skip to contentSkip to conversation

drm/i915: Fix aux invalidation with proper pipe_control flag

PATCH In review Nirmoy Das 6 participants 9 messages Sep 19, 2023 – Sep 20, 2023

Subsystems (3)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/i915: Fix aux invalidation with proper pipe_control flag

The suggestion from the spec is to do l3 fabric flush not L3 flush.

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

invalidation")

Cc Jonathan Cavitt <[email protected]>
Cc Andi Shyti <[email protected]>
Cc <[email protected]> # v5.8+
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Tejas Upadhyay <[email protected]>
Cc Prathap Kumar Valsan <[email protected]>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 6 +++++-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/gen8_engine_cs.c +5 -1
index 0143445dba83..a4b241d502c8 100644
@@ -272,7 +272,11 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 			bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
 
 		bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
-		bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
+		if (mode & EMIT_FLUSH)
+			bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
+		else if (gen12_needs_ccs_aux_inv(engine))
+			bit_group_1 |= PIPE_CONTROL_L3_FABRIC_FLUSH;
+
 		bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
 		bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
 		/* Wa_1409600907:tgl,adl-p */
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +1 -0
index 2bd8d98d2110..12e8dc481c53 100644
@@ -284,6 +284,7 @@
 #define   DISPLAY_PLANE_A           (0<<20)
 #define   DISPLAY_PLANE_B           (1<<20)
 #define GFX_OP_PIPE_CONTROL(len)	((0x3<<29)|(0x3<<27)|(0x2<<24)|((len)-2))
+#define   PIPE_CONTROL_L3_FABRIC_FLUSH			(1<<30)
 #define   PIPE_CONTROL_COMMAND_CACHE_INVALIDATE		(1<<29) /* gen11+ */
 #define   PIPE_CONTROL_TILE_CACHE_FLUSH			(1<<28) /* gen11+ */
 #define   PIPE_CONTROL_FLUSH_L3				(1<<27)
Signature · 1 line
2.41.0
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix aux invalidation with proper pipe_control flag

== Series Details ==

== Series Details ==

Series: drm/i915: Fix aux invalidation with proper pipe_control flag
URL : https://patchwork.freedesktop.org/series/123907/
State : warning

== Summary ==

Error: dim checkpatch failed
6b401a9262b1 drm/i915: Fix aux invalidation with proper pipe_control flag
-:8: WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 6b401a9262b1 ("drm/i915: Fix aux invalidation with proper pipe_control flag")' #8:

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

-:47: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #47: FILE: drivers/gpu/drm/i915/gt/intel_gpu_commands.h:287:
+#define PIPE_CONTROL_L3_FABRIC_FLUSH (1<<30)

                                       			  ^

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

Reviewed-by Tested-by Tapani Pälli on v1 1/1
#2 lore raw
In reply to Nirmoy Das

Hi Nirmoy,

Quoted 4 lines · Nirmoy Das

The suggestion from the spec is to do l3 fabric flush not L3 flush.

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

invalidation")

please put this in one line.

Quoted 11 lines
Cc Jonathan Cavitt <[email protected]>
Cc Andi Shyti <[email protected]>
Cc <[email protected]> # v5.8+
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Tejas Upadhyay <[email protected]>
Cc Prathap Kumar Valsan <[email protected]>

and I believe

Thanks,
Andi

#3 lore raw
Quoted 20 lines · Andi Shyti

Hi Nirmoy,

Quoted 4 lines · Nirmoy Das

The suggestion from the spec is to do l3 fabric flush not L3 flush.

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

invalidation")

please put this in one line.

Quoted 11 lines
Cc Jonathan Cavitt <[email protected]>
Cc Andi Shyti <[email protected]>
Cc <[email protected]> # v5.8+
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Tejas Upadhyay <[email protected]>
Cc Prathap Kumar Valsan <[email protected]>
Quoted 5 lines

and I believe

Yes, tested on TGL LP (0x9a49)!

Quoted 2 lines

Thanks,
Andi

#4 lore raw

Sent out https://patchwork.freedesktop.org/series/123975/

to replace this one as this not really fixing the issue.

Thanks,

Nirmoy

Quoted 33 lines · Tapani Pälli
Quoted 20 lines · Andi Shyti

Hi Nirmoy,

Quoted 4 lines · Nirmoy Das

The suggestion from the spec is to do l3 fabric flush not L3 flush.

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

invalidation")

please put this in one line.

Quoted 11 lines
Cc Jonathan Cavitt <[email protected]>
Cc Andi Shyti <[email protected]>
Cc <[email protected]> # v5.8+
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Tejas Upadhyay <[email protected]>
Cc Prathap Kumar Valsan <[email protected]>
Quoted 5 lines

and I believe

Yes, tested on TGL LP (0x9a49)!

Quoted 2 lines

Thanks,
Andi

#5 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Fix aux invalidation with proper pipe_control flag

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915: Fix aux invalidation with proper pipe_control flag
URL : https://patchwork.freedesktop.org/series/123907/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13651 -> Patchwork_123907v1
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_123907v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (38 -> 37)
------------------------------

Additional (1): bat-rpls-2
Missing (2): bat-dg2-9 fi-snb-2520m

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@load:
- bat-mtlp-8: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-mtlp-8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v1/bat-mtlp-8/igt@[email protected]

* igt@runner@aborted:
- bat-rpls-2: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v1/bat-rpls-2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][4] ([i915#1845])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v1/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [ABORT][5] ([i915#7913]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-bsw-n3050/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v1/fi-bsw-n3050/igt@i915_selftest@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- fi-kbl-guc: [FAIL][7] ([IGT#3] / [i915#6121]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-kbl-guc/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v1/fi-kbl-guc/igt@[email protected]

[IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#6121]: https://gitlab.freedesktop.org/drm/intel/issues/6121
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913

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

* Linux: CI_DRM_13651 -> Patchwork_123907v1

CI-20190529: 20190529
CI_DRM_13651: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7493: 2517e42d612e0c1ca096acf8b5f6177f7ef4bce7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_123907v1: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

a577d3d9f360 drm/i915: Fix aux invalidation with proper pipe_control flag

== Logs ==

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

Reviewed-by on v1 1/1
#6 lore raw
In reply to Nirmoy Das
Quoted 4 lines · Nirmoy Das

The suggestion from the spec is to do l3 fabric flush not L3 flush.

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

invalidation")

Quoted 11 lines
Cc Jonathan Cavitt <[email protected]>
Cc Andi Shyti <[email protected]>
Cc <[email protected]> # v5.8+
Cc Nirmoy Das <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Tejas Upadhyay <[email protected]>
Cc Prathap Kumar Valsan <[email protected]>

Regards
Andrzej

Quoted 34 lines
---
  drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 6 +++++-
  drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 +
  2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/gen8_engine_cs.c +5 -1
index 0143445dba83..a4b241d502c8 100644
@@ -272,7 +272,11 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
  			bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
 
  		bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
-		bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
+		if (mode & EMIT_FLUSH)
+			bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
+		else if (gen12_needs_ccs_aux_inv(engine))
+			bit_group_1 |= PIPE_CONTROL_L3_FABRIC_FLUSH;
+
  		bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
  		bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
  		/* Wa_1409600907:tgl,adl-p */
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +1 -0
index 2bd8d98d2110..12e8dc481c53 100644
@@ -284,6 +284,7 @@
  #define   DISPLAY_PLANE_A           (0<<20)
  #define   DISPLAY_PLANE_B           (1<<20)
  #define GFX_OP_PIPE_CONTROL(len)	((0x3<<29)|(0x3<<27)|(0x2<<24)|((len)-2))
+#define   PIPE_CONTROL_L3_FABRIC_FLUSH			(1<<30)
  #define   PIPE_CONTROL_COMMAND_CACHE_INVALIDATE		(1<<29) /* gen11+ */
  #define   PIPE_CONTROL_TILE_CACHE_FLUSH			(1<<28) /* gen11+ */
  #define   PIPE_CONTROL_FLUSH_L3				(1<<27)
#7 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix aux invalidation with proper pipe_control flag (rev2)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915: Fix aux invalidation with proper pipe_control flag (rev2)
URL : https://patchwork.freedesktop.org/series/123907/
State : warning

== Summary ==

Error: dim checkpatch failed
eb21573fa6e7 drm/i915: Fix aux invalidation with proper pipe_control flag
-:11: WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: eb21573fa6e7 ("drm/i915: Fix aux invalidation with proper pipe_control flag")' #11:

Fixes 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before

-:53: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #53: FILE: drivers/gpu/drm/i915/gt/intel_gpu_commands.h:287:
+#define PIPE_CONTROL_L3_FABRIC_FLUSH (1<<30)

                                       			  ^

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

#8 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Fix aux invalidation with proper pipe_control flag (rev2)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915: Fix aux invalidation with proper pipe_control flag (rev2)
URL : https://patchwork.freedesktop.org/series/123907/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13651 -> Patchwork_123907v2
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_123907v2, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (38 -> 37)
------------------------------

Additional (1): bat-rpls-2
Missing (2): bat-adlm-1 fi-snb-2520m

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@load:
- bat-mtlp-8: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-mtlp-8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/bat-mtlp-8/igt@[email protected]

* igt@runner@aborted:
- bat-rpls-2: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/bat-rpls-2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-adlp-9: NOTRUN -> [SKIP][4] ([i915#3546]) +2 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/bat-adlp-9/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [PASS][5] -> [ABORT][6] ([i915#8668])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [ABORT][7] ([i915#7913]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-bsw-n3050/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/fi-bsw-n3050/igt@i915_selftest@[email protected]

* igt@kms_chamelium_edid@hdmi-edid-read:
- {bat-dg2-13}: [DMESG-WARN][9] ([i915#7952]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/bat-dg2-13/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/bat-dg2-13/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-bsw-nick: [FAIL][11] ([i915#9276]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13651/fi-bsw-nick/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_123907v2/fi-bsw-nick/igt@[email protected]

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

[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7952]: https://gitlab.freedesktop.org/drm/intel/issues/7952
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#9276]: https://gitlab.freedesktop.org/drm/intel/issues/9276

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

* Linux: CI_DRM_13651 -> Patchwork_123907v2

CI-20190529: 20190529
CI_DRM_13651: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7493: 2517e42d612e0c1ca096acf8b5f6177f7ef4bce7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_123907v2: 61b71c3f061a44a6ab1dcf756918886aa03a5480 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

d66b3de978e1 drm/i915: Fix aux invalidation with proper pipe_control flag

== Logs ==

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