drm/i915/audio: error log non-zero audio power refcount after unbind
Subsystems (3)
PATCH 1/1 drm/i915/audio: error log non-zero audio power refcount after unbind
We have some module unload/reload tests hitting an issue with i915 unbinding the component interface before the audio driver has properly put the power. Log an error about it for ease of debugging. (Normally this leads to a wakeref debug splat on the power well.)
--- drivers/gpu/drm/i915/display/intel_audio.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/display/intel_audio.c +4 -0
@@ -1138,6 +1138,10 @@ static void i915_audio_component_unbind(struct device *i915_kdev,drm_modeset_unlock_all (&dev_priv->drm);device_link_remove (hda_kdev, i915_kdev); + +if (dev_priv->audio_power_refcount) +drm_err (&dev_priv->drm,"audio power refcount %d after unbind\n" , + dev_priv->audio_power_refcount); }static const struct component_ops i915_audio_component_bind_ops = {
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Jani,
Quoted 3 lines · Jani Nikula
We have some module unload/reload tests hitting an issue with i915 unbinding the component interface before the audio driver has properly put the power. Log an error about it for ease of debugging. (Normally
thanks, this is a good addition:
Maybe one point to consider is whether to take the next step and just block the unload. On audio side, once acomp binding is done to i915 driver, it is only released at hda driver unload. So any test case where audio driver is bound to i915, and test unloads i915 without unloading the audio driver first, will not work. Even if no immediate failure is seen at unload, functionality will be impacted after i915 is loaded again.
Not sure how to do this though. Normally module refcounts would take care of this (and block i915 unload), but now that we have the component framework in between, something else is needed.
PS Audio driver also doesn't implement component unbind(), but I don't
immediately see what it could do there. It can't return an error and the audio framework is not really prepared for invidual codec drivers to disappear at runtime. We can handle hotplug of complete cards (like USB), but individual codec drivers are expected to stay loaded.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Kai Vehmanen
Hi Jani,
Quoted 3 lines · Jani Nikula
We have some module unload/reload tests hitting an issue with i915 unbinding the component interface before the audio driver has properly put the power. Log an error about it for ease of debugging. (Normally
thanks, this is a good addition:
Reviewed-by Kai Vehmanen <[email protected]>
Thanks for the review, pushed to drm-intel-next-queued.
Quoted 11 lines
Maybe one point to consider is whether to take the next step and just block the unload. On audio side, once acomp binding is done to i915 driver, it is only released at hda driver unload. So any test case where audio driver is bound to i915, and test unloads i915 without unloading the audio driver first, will not work. Even if no immediate failure is seen at unload, functionality will be impacted after i915 is loaded again.
Not sure how to do this though. Normally module refcounts would take care of this (and block i915 unload), but now that we have the component framework in between, something else is needed.
Heh, had I known what to do, I'd have posted that. So I just opted for logging to make the failure mode obvious.
I admit I didn't check what having an unbalanced get will actually do. If we go ahead and power down the power well, I assume it'll cripple the audio driver. I think our refcounting and power well handling should read the hardware state and set up everything properly on load, but the audio driver will have lost its marbles in the mean time. Even if by some chance it doesn't lose its power during i915 unload/load cycle, it won't have the component interface and can't ensure i915 doesn't go ahead and cut power later.
BR,
Jani.
Quoted 6 lines
PS Audio driver also doesn't implement component
unbind(), but I don't
immediately see what it could do there. It can't return an error and the audio framework is not really prepared for invidual codec drivers to disappear at runtime. We can handle hotplug of complete cards (like USB), but individual codec drivers are expected to stay loaded.
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/audio: error log non-zero audio power refcount after unbind
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915/audio: error log non-zero audio power refcount after unbind
URL : https://patchwork.freedesktop.org/series/76061/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 /home/cidrm/kernel/Documentation/gpu/i915.rst:610: WARNING: duplicate label gpu/i915:layout, other instance in /home/cidrm/kernel/Documentation/gpu/i915.rst
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/audio: error log non-zero audio power refcount after unbind
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915/audio: error log non-zero audio power refcount after unbind
URL : https://patchwork.freedesktop.org/series/76061/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8314 -> Patchwork_17339
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/index.html
Known issues
------------
Here are the changes found in Patchwork_17339 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@execlists:
- fi-icl-dsi: [PASS][1] -> [INCOMPLETE][2] ([i915#1713])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/fi-icl-dsi/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/fi-icl-dsi/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1713]: https://gitlab.freedesktop.org/drm/intel/issues/1713
[i915#1725]: https://gitlab.freedesktop.org/drm/intel/issues/1725
Participating hosts (51 -> 46)
------------------------------
Additional (1): fi-kbl-soraka
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8314 -> Patchwork_17339
CI-20190529: 20190529
CI_DRM_8314: e8a432aa7e81e2bf5b6d4b23e3598f9fea947b83 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5598: 276b8a3f24837e009ff38512f7eeb07029e52616 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17339: 32f920f53cb511940869075a600fd2de3d4b0a73 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
32f920f53cb5 drm/i915/audio: error log non-zero audio power refcount after unbind
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/audio: error log non-zero audio power refcount after unbind
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915/audio: error log non-zero audio power refcount after unbind
URL : https://patchwork.freedesktop.org/series/76061/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8314_full -> Patchwork_17339_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17339_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@requests:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2] ([i915#1531] / [i915#1658])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-tglb5/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-tglb1/igt@i915_selftest@[email protected]
* igt@i915_suspend@forcewake:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([i915#180] / [i915#95])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-apl7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-apl4/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-64x21-random:
- shard-kbl: [PASS][5] -> [FAIL][6] ([i915#54] / [i915#93] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-kbl7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-kbl3/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#72])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-glk5/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-glk6/igt@[email protected]
* igt@kms_cursor_legacy@pipe-b-torture-bo:
- shard-iclb: [PASS][9] -> [DMESG-WARN][10] ([i915#128])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-iclb1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-iclb8/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-apl: [PASS][11] -> [DMESG-WARN][12] ([i915#180])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-apl3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-apl1/igt@[email protected]
* igt@kms_psr@no_drrs:
- shard-iclb: [PASS][13] -> [FAIL][14] ([i915#173])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-iclb7/igt@kms_psr@no_drrs.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-iclb1/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_basic:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#109441]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-iclb2/igt@kms_psr@psr2_basic.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-iclb5/igt@kms_psr@psr2_basic.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#180])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-kbl1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-kbl7/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- shard-skl: [INCOMPLETE][19] ([i915#69]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl3/igt@[email protected]
* igt@gem_exec_whisper@basic-queues:
- shard-iclb: [FAIL][21] -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-iclb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-iclb1/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [DMESG-WARN][23] ([i915#180]) -> [PASS][24] +7 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-kbl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-kbl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-64x21-random:
- shard-glk: [FAIL][25] ([i915#54]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-glk8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-glk7/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-mmap-wc-untiled:
- shard-glk: [FAIL][27] ([i915#52] / [i915#54]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-glk5/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-glk5/igt@[email protected]
* {igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1}:
- shard-skl: [FAIL][29] ([i915#79]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl2/igt@kms_flip@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl2/igt@kms_flip@[email protected]
* {igt@kms_flip@flip-vs-suspend@a-dp1}:
- shard-apl: [DMESG-WARN][31] ([i915#180]) -> [PASS][32] +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-apl4/igt@kms_flip@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-apl3/igt@kms_flip@[email protected]
* {igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1}:
- shard-skl: [FAIL][33] ([i915#34]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl9/igt@kms_flip@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl9/igt@kms_flip@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][35] ([i915#1188]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl9/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][37] ([fdo#108145] / [i915#265]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl6/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][39] ([fdo#109441]) -> [PASS][40] +1 similar issue
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-iclb5/igt@kms_psr@psr2_primary_page_flip.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-skl: [FAIL][41] ([i915#331]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-skl6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-skl6/igt@[email protected]
* {igt@perf@blocking-parameterized}:
- shard-tglb: [FAIL][43] ([i915#1542]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-tglb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-tglb5/igt@[email protected]
#### Warnings ####
* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [SKIP][45] ([i915#468]) -> [FAIL][46] ([i915#454]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8314/shard-tglb2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17339/shard-tglb8/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1531]: https://gitlab.freedesktop.org/drm/intel/issues/1531
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1658]: https://gitlab.freedesktop.org/drm/intel/issues/1658
[i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#331]: https://gitlab.freedesktop.org/drm/intel/issues/331
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8314 -> Patchwork_17339
CI-20190529: 20190529
CI_DRM_8314: e8a432aa7e81e2bf5b6d4b23e3598f9fea947b83 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5598: 276b8a3f24837e009ff38512f7eeb07029e52616 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17339: 32f920f53cb511940869075a600fd2de3d4b0a73 @ 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_17339/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx