* [PATCH] ALSA: hda - Handle pm failure during hotplug
@ 2018-06-27 6:25 Chris Wilson
2018-06-27 6:30 ` Takashi Iwai
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Chris Wilson @ 2018-06-27 6:25 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Vinod Koul, intel-gfx
Obtaining the runtime pm wakeref can fail, especially in a hotplug
scenario where i915.ko has been unloaded. If we do not catch the
failure, we end up with an unbalanced pm.
References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/pci/hda/patch_hdmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 7d7eb1354eee..3ca98c9fcaee 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1632,8 +1632,8 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
int ret;
/* no temporary power up/down needed for component notifier */
- if (!codec_has_acomp(codec))
- snd_hda_power_up_pm(codec);
+ if (!codec_has_acomp(codec) && snd_hda_power_up_pm(codec))
+ return false;
mutex_lock(&spec->pcm_lock);
if (codec_has_acomp(codec)) {
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ALSA: hda - Handle pm failure during hotplug
2018-06-27 6:25 [PATCH] ALSA: hda - Handle pm failure during hotplug Chris Wilson
@ 2018-06-27 6:30 ` Takashi Iwai
2018-06-27 21:57 ` Takashi Iwai
2018-06-27 8:49 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2018-06-27 6:30 UTC (permalink / raw)
To: Chris Wilson; +Cc: Vinod Koul, alsa-devel, intel-gfx
On Wed, 27 Jun 2018 08:25:32 +0200,
Chris Wilson wrote:
>
> Obtaining the runtime pm wakeref can fail, especially in a hotplug
> scenario where i915.ko has been unloaded. If we do not catch the
> failure, we end up with an unbalanced pm.
>
> References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Vinod Koul <vinod.koul@intel.com>
Thanks, applied with Cc to stable.
Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for ALSA: hda - Handle pm failure during hotplug
2018-06-27 6:25 [PATCH] ALSA: hda - Handle pm failure during hotplug Chris Wilson
2018-06-27 6:30 ` Takashi Iwai
@ 2018-06-27 8:49 ` Patchwork
2018-06-27 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-27 10:26 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-27 8:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: ALSA: hda - Handle pm failure during hotplug
URL : https://patchwork.freedesktop.org/series/45463/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
c8ac3d11b058 ALSA: hda - Handle pm failure during hotplug
-:13: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#13:
References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
-:13: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")'
#13:
References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
total: 1 errors, 1 warnings, 0 checks, 10 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.BAT: success for ALSA: hda - Handle pm failure during hotplug
2018-06-27 6:25 [PATCH] ALSA: hda - Handle pm failure during hotplug Chris Wilson
2018-06-27 6:30 ` Takashi Iwai
2018-06-27 8:49 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-06-27 9:05 ` Patchwork
2018-06-27 10:26 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-27 9:05 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: ALSA: hda - Handle pm failure during hotplug
URL : https://patchwork.freedesktop.org/series/45463/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4383 -> Patchwork_9435 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45463/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9435 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-no-display:
fi-cnl-psr: NOTRUN -> DMESG-WARN (fdo#105395) +2
fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
== Participating hosts (44 -> 40) ==
Additional (1): fi-cnl-psr
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4383 -> Patchwork_9435
CI_DRM_4383: bdbdbb788dc43f68c57cd3b793f123901358c331 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9435: c8ac3d11b0583503f74781fcede9f58fc3bafc51 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
c8ac3d11b058 ALSA: hda - Handle pm failure during hotplug
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9435/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.IGT: success for ALSA: hda - Handle pm failure during hotplug
2018-06-27 6:25 [PATCH] ALSA: hda - Handle pm failure during hotplug Chris Wilson
` (2 preceding siblings ...)
2018-06-27 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-06-27 10:26 ` Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-27 10:26 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: ALSA: hda - Handle pm failure during hotplug
URL : https://patchwork.freedesktop.org/series/45463/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4383_full -> Patchwork_9435_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9435_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_9435_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9435_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: PASS -> SKIP +2
igt@gem_mocs_settings@mocs-rc6-blt:
shard-kbl: SKIP -> PASS +1
== Known issues ==
Here are the changes found in Patchwork_9435_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_available_modes_crc@available_mode_test_crc:
shard-kbl: NOTRUN -> FAIL (fdo#106641)
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: PASS -> FAIL (fdo#104724, fdo#103822) +2
==== Possible fixes ====
igt@gem_exec_big:
shard-hsw: INCOMPLETE (fdo#103540) -> PASS
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
shard-glk: FAIL (fdo#105703) -> PASS
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: FAIL (fdo#105454, fdo#106509) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: FAIL (fdo#104724) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
shard-glk: FAIL (fdo#104724, fdo#103167) -> PASS
igt@kms_rotation_crc@sprite-rotation-180:
shard-hsw: FAIL (fdo#104724, fdo#103925) -> PASS
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
== Participating hosts (6 -> 5) ==
Missing (1): pig-skl-6260u
== Build changes ==
* Linux: CI_DRM_4383 -> Patchwork_9435
CI_DRM_4383: bdbdbb788dc43f68c57cd3b793f123901358c331 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9435: c8ac3d11b0583503f74781fcede9f58fc3bafc51 @ 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_9435/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ALSA: hda - Handle pm failure during hotplug
2018-06-27 6:30 ` Takashi Iwai
@ 2018-06-27 21:57 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2018-06-27 21:57 UTC (permalink / raw)
To: Chris Wilson; +Cc: Vinod Koul, alsa-devel, intel-gfx
On Wed, 27 Jun 2018 08:30:37 +0200,
Takashi Iwai wrote:
>
> On Wed, 27 Jun 2018 08:25:32 +0200,
> Chris Wilson wrote:
> >
> > Obtaining the runtime pm wakeref can fail, especially in a hotplug
> > scenario where i915.ko has been unloaded. If we do not catch the
> > failure, we end up with an unbalanced pm.
> >
> > References: 222bde03881c ("ALSA: hda - Fix mutex deadlock at HDMI/DP hotplug")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Takashi Iwai <tiwai@suse.de>
> > Cc: Vinod Koul <vinod.koul@intel.com>
>
> Thanks, applied with Cc to stable.
After the disaster (not about football game but of my further fix
patch), I revisited this change, and found that it's also buggy.
When pm_runtime_get_sync() returns an error, it doesn't decrement the
refcount. That is, you'd need to call pm_runtime_put_noidle() or
whatever after getting the error.
And, pm_runtime_get_sync() returns 1, not only a negative error.
So, non-zero check is anyway incorrect.
Due to these reasons, I nuked the commit again.
For the HDMI error without i915 binding, I'll resubmit the proper
patch to disable HDMI codec after i915 component bind failure, as an
alternative workaround. The previous patch didn't work as expected.
thanks,
Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-27 21:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-27 6:25 [PATCH] ALSA: hda - Handle pm failure during hotplug Chris Wilson
2018-06-27 6:30 ` Takashi Iwai
2018-06-27 21:57 ` Takashi Iwai
2018-06-27 8:49 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-27 9:05 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-27 10:26 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.