From: Jani Nikula <jani.nikula@intel.com>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/audio: error log non-zero audio power refcount after unbind
Date: Mon, 20 Apr 2020 10:11:37 +0300 [thread overview]
Message-ID: <875zdu3a3a.fsf@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2004171103100.2957@eliteleevi.tm.intel.com>
On Fri, 17 Apr 2020, Kai Vehmanen <kai.vehmanen@linux.intel.com> wrote:
> Hi Jani,
>
> On Fri, 17 Apr 2020, Jani Nikula wrote:
>
>> 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 <kai.vehmanen@linux.intel.com>
Thanks for the review, pushed to drm-intel-next-queued.
> 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.
>
> 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.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-04-20 7:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 6:51 [Intel-gfx] [PATCH] drm/i915/audio: error log non-zero audio power refcount after unbind Jani Nikula
2020-04-17 8:28 ` Kai Vehmanen
2020-04-20 7:11 ` Jani Nikula [this message]
2020-04-17 11:52 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2020-04-17 12:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-04-18 15:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=875zdu3a3a.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kai.vehmanen@linux.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 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.