Skip to contentSkip to conversation

drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h

PATCH In review Jesus Narvaez 3 participants 3 messages May 14, 2025 – May 21, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h

When sending a H2G message where a reply is expected in guc_submission_send_busy_loop(), outstanding_submission_g2h is incremented before the send. However, if there is an error sending the message, outstanding_submission_g2h is decremented without checking if a reply is expected.

Therefore, check if reply is expected when there is a failure before decrementing outstanding_submission_g2h.

Fixes 2f2cc53b5fe7 ("drm/i915/guc: Close deregister-context race against CT-loss")
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Alan Previn <[email protected]>
Cc Anshuman Gupta <[email protected]>
Cc Mousumi Jana <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Matt Roper <[email protected]>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1 -1
index 39696ceea9a5..68bdf0c80ec3 100644
@@ -633,7 +633,7 @@ static int guc_submission_send_busy_loop(struct intel_guc *guc,
 		atomic_inc(&guc->outstanding_submission_g2h);
 
 	ret = intel_guc_send_busy_loop(guc, action, len, g2h_len_dw, loop);
-	if (ret)
+	if (ret && g2h_len_dw)
 		atomic_dec(&guc->outstanding_submission_g2h);
 
 	return ret;
Signature · 1 line
2.34.1
#1 lore raw

✗ i915.CI.BAT: failure for drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h

== Series Details ==

== Series Details ==

Series: drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h
URL : https://patchwork.freedesktop.org/series/149038/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_16546 -> Patchwork_149038v1
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_149038v1, 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_149038v1/index.html

Participating hosts (46 -> 44)
------------------------------

Missing (2): bat-arlh-2 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live:
- bat-twl-2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-twl-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-twl-2/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-dg2-8: [PASS][3] -> [DMESG-FAIL][4] ([i915#12061]) +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-dg2-8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-dg2-8/igt@[email protected]

* igt@i915_selftest@live@guc:
- bat-twl-2: [PASS][5] -> [ABORT][6] ([i915#13696])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-twl-2/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-twl-2/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-5: [PASS][7] -> [DMESG-FAIL][8] ([i915#12061]) +1 other test dmesg-fail
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-arls-5/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-arls-5/igt@i915_selftest@[email protected]
- bat-dg2-11: [PASS][9] -> [DMESG-FAIL][10] ([i915#12061]) +1 other test dmesg-fail
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-dg2-11/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-dg2-11/igt@i915_selftest@[email protected]
- bat-dg2-14: [PASS][11] -> [DMESG-FAIL][12] ([i915#12061]) +1 other test dmesg-fail
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-dg2-14/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-dg2-14/igt@i915_selftest@[email protected]

* igt@kms_chamelium_frames@dp-crc-fast:
- bat-dg2-13: [PASS][13] -> [DMESG-WARN][14] ([i915#13733])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-dg2-13/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-dg2-13/igt@[email protected]

#### Possible fixes ####

* igt@dmabuf@all-tests@dma_fence_chain:
- fi-bsw-n3050: [INCOMPLETE][15] ([i915#12904]) -> [PASS][16] +1 other test pass
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/fi-bsw-n3050/igt@dmabuf@all-tests@dma_fence_chain.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/fi-bsw-n3050/igt@dmabuf@all-tests@dma_fence_chain.html

#### Warnings ####

* igt@i915_selftest@live:
- bat-atsm-1: [DMESG-FAIL][17] ([i915#12061] / [i915#14204]) -> [DMESG-FAIL][18] ([i915#12061] / [i915#13929])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-atsm-1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-atsm-1/igt@[email protected]

* igt@i915_selftest@live@mman:
- bat-atsm-1: [DMESG-FAIL][19] ([i915#14204]) -> [DMESG-FAIL][20] ([i915#13929])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16546/bat-atsm-1/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_149038v1/bat-atsm-1/igt@i915_selftest@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12904]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12904
[i915#13696]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13696
[i915#13733]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13733
[i915#13929]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13929
[i915#14204]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14204

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

* Linux: CI_DRM_16546 -> Patchwork_149038v1

CI-20190529: 20190529
CI_DRM_16546: 3d6670fab64cb00b5e6ed80d2517147db533faf1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8364: 8364
Patchwork_149038v1: 3d6670fab64cb00b5e6ed80d2517147db533faf1 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jesus Narvaez
Quoted 9 lines · Jesus Narvaez

When sending a H2G message where a reply is expected in guc_submission_send_busy_loop(), outstanding_submission_g2h is incremented before the send. However, if there is an error sending the message, outstanding_submission_g2h is decremented without checking if a reply is expected.

Therefore, check if reply is expected when there is a failure before decrementing outstanding_submission_g2h.

Quoted 8 lines
Fixes 2f2cc53b5fe7 ("drm/i915/guc: Close deregister-context race against CT-loss")
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Alan Previn <[email protected]>
Cc Anshuman Gupta <[email protected]>
Cc Mousumi Jana <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Matt Roper <[email protected]>

Daniele

Quoted 17 lines
---
  drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1 -1
index 39696ceea9a5..68bdf0c80ec3 100644
@@ -633,7 +633,7 @@ static int guc_submission_send_busy_loop(struct intel_guc *guc,
  		atomic_inc(&guc->outstanding_submission_g2h);
 
  	ret = intel_guc_send_busy_loop(guc, action, len, g2h_len_dw, loop);
-	if (ret)
+	if (ret && g2h_len_dw)
  		atomic_dec(&guc->outstanding_submission_g2h);
 
  	return ret;