Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Vinod Koul <vinod.koul@intel.com>,
	alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] ALSA: hda - Handle pm failure during hotplug
Date: Wed, 27 Jun 2018 23:57:28 +0200	[thread overview]
Message-ID: <s5h1scr7v07.wl-tiwai@suse.de> (raw)
In-Reply-To: <s5hzhzgaghe.wl-tiwai@suse.de>

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

      reply	other threads:[~2018-06-27 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h1scr7v07.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox