* [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
@ 2022-07-26 20:51 Nerlige Ramappa, Umesh
2022-07-26 21:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nerlige Ramappa, Umesh @ 2022-07-26 20:51 UTC (permalink / raw)
To: intel-gfx, Tvrtko Ursulin
The worker is canceled in gt_park path, but earlier it was assumed that
gt_park path cannot sleep and the cancel is asynchronous. This caused a
race with suspend flow where the worker runs after suspend and causes an
unclaimed register access warning. Cancel the worker synchronously since
the gt_park is indeed allowed to sleep.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 76916aed897a..0b7a5ecb640a 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
if (!guc_submission_initialized(guc))
return;
- cancel_delayed_work(&guc->timestamp.work);
+ /*
+ * There is a race with suspend flow where the worker runs after suspend
+ * and causes an unclaimed register access warning. Cancel the worker
+ * synchronously here.
+ */
+ cancel_delayed_work_sync(&guc->timestamp.work);
/*
* Before parking, we should sample engine busyness stats if we need to.
--
2.36.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Cancel GuC engine busyness worker synchronously
2022-07-26 20:51 [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously Nerlige Ramappa, Umesh
@ 2022-07-26 21:15 ` Patchwork
2022-07-26 21:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-07-28 1:41 ` [Intel-gfx] [PATCH] " John Harrison
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2022-07-26 21:15 UTC (permalink / raw)
To: Nerlige Ramappa, Umesh; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/guc: Cancel GuC engine busyness worker synchronously
URL : https://patchwork.freedesktop.org/series/106738/
State : warning
== Summary ==
Error: dim checkpatch failed
1dd66d8a76c6 drm/i915/guc: Cancel GuC engine busyness worker synchronously
-:32: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email name mismatch: 'From: "Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>' != 'Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>'
total: 0 errors, 1 warnings, 0 checks, 13 lines checked
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/guc: Cancel GuC engine busyness worker synchronously
2022-07-26 20:51 [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously Nerlige Ramappa, Umesh
2022-07-26 21:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2022-07-26 21:38 ` Patchwork
2022-07-28 1:41 ` [Intel-gfx] [PATCH] " John Harrison
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2022-07-26 21:38 UTC (permalink / raw)
To: Nerlige Ramappa, Umesh; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 13751 bytes --]
== Series Details ==
Series: drm/i915/guc: Cancel GuC engine busyness worker synchronously
URL : https://patchwork.freedesktop.org/series/106738/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_11945 -> Patchwork_106738v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_106738v1 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_106738v1, please notify your bug team 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_106738v1/index.html
Participating hosts (31 -> 37)
------------------------------
Additional (8): bat-dg1-5 bat-dg2-8 bat-adlm-1 bat-dg2-9 bat-adlp-6 bat-rplp-1 bat-rpls-1 bat-rpls-2
Missing (2): fi-rkl-11600 fi-bdw-samus
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_106738v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@load:
- fi-bdw-gvtdvm: [PASS][1] -> [DMESG-WARN][2] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-bdw-gvtdvm/igt@i915_module_load@load.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-bdw-gvtdvm/igt@i915_module_load@load.html
Known issues
------------
Here are the changes found in Patchwork_106738v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@fbdev@nullptr:
- bat-dg1-5: NOTRUN -> [SKIP][3] ([i915#2582]) +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@fbdev@nullptr.html
* igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-cfl-8109u/igt@gem_lmem_swapping@verify-random.html
* igt@gem_mmap@basic:
- bat-dg1-5: NOTRUN -> [SKIP][5] ([i915#4083])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@gem_mmap@basic.html
* igt@gem_tiled_blits@basic:
- bat-dg1-5: NOTRUN -> [SKIP][6] ([i915#4077]) +2 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@gem_tiled_blits@basic.html
* igt@gem_tiled_pread_basic:
- bat-dg1-5: NOTRUN -> [SKIP][7] ([i915#4079]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@gem_tiled_pread_basic.html
* igt@i915_pm_backlight@basic-brightness:
- bat-dg1-5: NOTRUN -> [SKIP][8] ([i915#1155])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@i915_pm_backlight@basic-brightness.html
* igt@i915_selftest@live@hangcheck:
- bat-dg1-5: NOTRUN -> [DMESG-FAIL][9] ([i915#4494] / [i915#4957])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
* igt@i915_selftest@live@requests:
- fi-blb-e6850: [PASS][10] -> [DMESG-FAIL][11] ([i915#4528])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-blb-e6850/igt@i915_selftest@live@requests.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-blb-e6850/igt@i915_selftest@live@requests.html
* igt@i915_suspend@basic-s2idle-without-i915:
- bat-dg1-5: NOTRUN -> [INCOMPLETE][12] ([i915#6011])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@i915_suspend@basic-s2idle-without-i915.html
* igt@kms_addfb_basic@basic-x-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][13] ([i915#4212]) +7 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_addfb_basic@basic-x-tiled-legacy.html
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-5: NOTRUN -> [SKIP][14] ([i915#4215])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_addfb_basic@basic-y-tiled-legacy.html
* igt@kms_busy@basic:
- bat-dg1-5: NOTRUN -> [SKIP][15] ([i915#1845] / [i915#4303])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_busy@basic.html
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-bsw-n3050: NOTRUN -> [SKIP][16] ([fdo#109271] / [fdo#111827])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-bsw-n3050/igt@kms_chamelium@common-hpd-after-suspend.html
- fi-hsw-4770: NOTRUN -> [SKIP][17] ([fdo#109271] / [fdo#111827])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html
- fi-cfl-8109u: NOTRUN -> [SKIP][18] ([fdo#109271] / [fdo#111827])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-cfl-8109u/igt@kms_chamelium@common-hpd-after-suspend.html
* igt@kms_chamelium@dp-crc-fast:
- bat-dg1-5: NOTRUN -> [SKIP][19] ([fdo#111827]) +7 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_chamelium@dp-crc-fast.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg1-5: NOTRUN -> [SKIP][20] ([fdo#109285])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_pipe_crc_basic@nonblocking-crc:
- bat-dg1-5: NOTRUN -> [SKIP][21] ([i915#4078]) +13 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_pipe_crc_basic@nonblocking-crc.html
* igt@kms_psr@primary_page_flip:
- bat-dg1-5: NOTRUN -> [SKIP][22] ([i915#1072] / [i915#4078]) +3 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_psr@primary_page_flip.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-5: NOTRUN -> [SKIP][23] ([i915#3555])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-fence-flip:
- bat-dg1-5: NOTRUN -> [SKIP][24] ([i915#1845] / [i915#3708])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@prime_vgem@basic-fence-flip.html
* igt@prime_vgem@basic-fence-read:
- bat-dg1-5: NOTRUN -> [SKIP][25] ([i915#3708]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@prime_vgem@basic-fence-read.html
* igt@prime_vgem@basic-gtt:
- bat-dg1-5: NOTRUN -> [SKIP][26] ([i915#3708] / [i915#4077]) +1 similar issue
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@prime_vgem@basic-gtt.html
* igt@prime_vgem@basic-userptr:
- fi-cfl-8109u: NOTRUN -> [SKIP][27] ([fdo#109271]) +6 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-cfl-8109u/igt@prime_vgem@basic-userptr.html
- bat-dg1-5: NOTRUN -> [SKIP][28] ([i915#3708] / [i915#4873])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@prime_vgem@basic-userptr.html
* igt@runner@aborted:
- bat-dg1-5: NOTRUN -> [FAIL][29] ([i915#4312] / [i915#5257])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/bat-dg1-5/igt@runner@aborted.html
- fi-bdw-gvtdvm: NOTRUN -> [FAIL][30] ([i915#4312])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-bdw-gvtdvm/igt@runner@aborted.html
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [INCOMPLETE][31] ([i915#2940]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-bsw-n3050/igt@i915_selftest@live@execlists.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][33] ([i915#4785]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [FAIL][35] ([i915#6298]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
* igt@kms_cursor_legacy@basic-flip-after-cursor@varying-size:
- fi-cfl-8109u: [DMESG-WARN][37] -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-cfl-8109u/igt@kms_cursor_legacy@basic-flip-after-cursor@varying-size.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-cfl-8109u/igt@kms_cursor_legacy@basic-flip-after-cursor@varying-size.html
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-1:
- fi-cfl-8109u: [INCOMPLETE][39] -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11945/fi-cfl-8109u/igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-1.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/fi-cfl-8109u/igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-1.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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[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#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[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#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4303]: https://gitlab.freedesktop.org/drm/intel/issues/4303
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
[i915#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5763]: https://gitlab.freedesktop.org/drm/intel/issues/5763
[i915#5903]: https://gitlab.freedesktop.org/drm/intel/issues/5903
[i915#5950]: https://gitlab.freedesktop.org/drm/intel/issues/5950
[i915#6011]: https://gitlab.freedesktop.org/drm/intel/issues/6011
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6380]: https://gitlab.freedesktop.org/drm/intel/issues/6380
Build changes
-------------
* Linux: CI_DRM_11945 -> Patchwork_106738v1
CI-20190529: 20190529
CI_DRM_11945: 15fbed4f822211fbb7653c2b8591594d92de9551 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6598: 97e103419021d0863db527e3f2cf39ccdd132db5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_106738v1: 15fbed4f822211fbb7653c2b8591594d92de9551 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
74b83e85248c drm/i915/guc: Cancel GuC engine busyness worker synchronously
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_106738v1/index.html
[-- Attachment #2: Type: text/html, Size: 14751 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
2022-07-26 20:51 [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously Nerlige Ramappa, Umesh
2022-07-26 21:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-07-26 21:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
@ 2022-07-28 1:41 ` John Harrison
2 siblings, 0 replies; 7+ messages in thread
From: John Harrison @ 2022-07-28 1:41 UTC (permalink / raw)
To: Nerlige Ramappa, Umesh, intel-gfx, Tvrtko Ursulin
On 7/26/2022 13:51, Nerlige Ramappa, Umesh wrote:
> The worker is canceled in gt_park path, but earlier it was assumed that
> gt_park path cannot sleep and the cancel is asynchronous. This caused a
> race with suspend flow where the worker runs after suspend and causes an
> unclaimed register access warning. Cancel the worker synchronously since
> the gt_park is indeed allowed to sleep.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 76916aed897a..0b7a5ecb640a 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
> if (!guc_submission_initialized(guc))
> return;
>
> - cancel_delayed_work(&guc->timestamp.work);
> + /*
> + * There is a race with suspend flow where the worker runs after suspend
> + * and causes an unclaimed register access warning. Cancel the worker
> + * synchronously here.
> + */
> + cancel_delayed_work_sync(&guc->timestamp.work);
>
> /*
> * Before parking, we should sample engine busyness stats if we need to.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
@ 2022-08-26 23:28 Umesh Nerlige Ramappa
0 siblings, 0 replies; 7+ messages in thread
From: Umesh Nerlige Ramappa @ 2022-08-26 23:28 UTC (permalink / raw)
To: intel-gfx
The worker is canceled in gt_park path, but earlier it was assumed that
gt_park path cannot sleep and the cancel is asynchronous. This caused a
race with suspend flow where the worker runs after suspend and causes an
unclaimed register access warning. Cancel the worker synchronously since
the gt_park is indeed allowed to sleep.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 0d56b615bf78..e6275380b253 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
if (!guc_submission_initialized(guc))
return;
- cancel_delayed_work(&guc->timestamp.work);
+ /*
+ * There is a race with suspend flow where the worker runs after suspend
+ * and causes an unclaimed register access warning. Cancel the worker
+ * synchronously here.
+ */
+ cancel_delayed_work_sync(&guc->timestamp.work);
/*
* Before parking, we should sample engine busyness stats if we need to.
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
@ 2022-08-27 0:21 Umesh Nerlige Ramappa
2022-09-05 21:30 ` Dixit, Ashutosh
0 siblings, 1 reply; 7+ messages in thread
From: Umesh Nerlige Ramappa @ 2022-08-27 0:21 UTC (permalink / raw)
To: intel-gfx
The worker is canceled in gt_park path, but earlier it was assumed that
gt_park path cannot sleep and the cancel is asynchronous. This caused a
race with suspend flow where the worker runs after suspend and causes an
unclaimed register access warning. Cancel the worker synchronously since
the gt_park is indeed allowed to sleep.
v2: Fix author name and sign-off mismatch
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4419
Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 0d56b615bf78..e6275380b253 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
if (!guc_submission_initialized(guc))
return;
- cancel_delayed_work(&guc->timestamp.work);
+ /*
+ * There is a race with suspend flow where the worker runs after suspend
+ * and causes an unclaimed register access warning. Cancel the worker
+ * synchronously here.
+ */
+ cancel_delayed_work_sync(&guc->timestamp.work);
/*
* Before parking, we should sample engine busyness stats if we need to.
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
2022-08-27 0:21 Umesh Nerlige Ramappa
@ 2022-09-05 21:30 ` Dixit, Ashutosh
0 siblings, 0 replies; 7+ messages in thread
From: Dixit, Ashutosh @ 2022-09-05 21:30 UTC (permalink / raw)
To: Umesh Nerlige Ramappa; +Cc: intel-gfx
On Fri, 26 Aug 2022 17:21:35 -0700, Umesh Nerlige Ramappa wrote:
>
> The worker is canceled in gt_park path, but earlier it was assumed that
> gt_park path cannot sleep and the cancel is asynchronous. This caused a
> race with suspend flow where the worker runs after suspend and causes an
> unclaimed register access warning. Cancel the worker synchronously since
> the gt_park is indeed allowed to sleep.
Indeed, __gt_park already calls cancel_work_sync and synchronize_irq which
can sleep:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> v2: Fix author name and sign-off mismatch
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4419
> Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 0d56b615bf78..e6275380b253 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
> if (!guc_submission_initialized(guc))
> return;
>
> - cancel_delayed_work(&guc->timestamp.work);
> + /*
> + * There is a race with suspend flow where the worker runs after suspend
> + * and causes an unclaimed register access warning. Cancel the worker
> + * synchronously here.
> + */
> + cancel_delayed_work_sync(&guc->timestamp.work);
>
> /*
> * Before parking, we should sample engine busyness stats if we need to.
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-09-05 21:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 20:51 [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously Nerlige Ramappa, Umesh
2022-07-26 21:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-07-26 21:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-07-28 1:41 ` [Intel-gfx] [PATCH] " John Harrison
-- strict thread matches above, loose matches on Subject: below --
2022-08-26 23:28 Umesh Nerlige Ramappa
2022-08-27 0:21 Umesh Nerlige Ramappa
2022-09-05 21:30 ` Dixit, Ashutosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox