From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Rojewski, Cezary" <cezary.rojewski@intel.com>,
intel-gfx@lists.freedesktop.org,
"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
MANAGEM..." <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>
Subject: Re: [alsa-devel] Timing issues between ALSA and i915 drivers
Date: Thu, 17 Jan 2019 14:47:05 -0600 [thread overview]
Message-ID: <389d9520-1380-dafa-2245-dc2e2b2b74f2@linux.intel.com> (raw)
In-Reply-To: <s5h36prc9gj.wl-tiwai@suse.de>
>> I tried to narrow down the issue further and my current understanding
>> is that the Skylake driver performs link reset operations without the
>> display power turned on - which does not look like a very smart thing
>> to do in hindsight.
>>
>> In other words, it's not really when snd_hdac_i915_init() is called
>> that matters as I assumed initially, but more when
>> snd_hdac_display_power() is invoked. There are two cases where this
>> happens, and for each of them turning the display power on results in
>> HDMI detection. The attached diffs split the initialization from the
>> power on, which provides a better understanding of the issue.
> OK, this makes some sense, and that's the very reason we have
> HDA_CODEC_IDX_CONTROLLER for snd_hdac_display_power(). IIRC, we
> needed to power on the display for probing of the legacy HDA, too.
> Once after that, for the normal operation, the display power is needed
> only when you output the HDMI stream.
>
>
>> What would be really useful at this point is a confirmation that
>> snd_hdac_i915_init() cannot be called in the initial probe but does
>> need to be executed in a work queue. That would really impact the way
>> the initialization sequence is reworked on the Skylake side as well as
>> modify the way the SOF driver deals with i915 initialization.
> It's needed to be called in a work queue, yes.
>
> Basically you shouldn't call request_module() in the driver's probe
> callback. When the probe callback is called from the module loading,
> it blocks the module loading itself, hence loading yet another module
> can't work. A situation might be easier than the past (which
> deadlocked), but still it's advised to use either the
> request_module_nowait() with the callback or call request_module()
> asynchronously from probe.
Thanks Takashi, this is very useful. I guess that will require a
complete rework of the Skylake initialization sequence then, my simple
code translation isn't enough indeed and the current partition between
probe/work queue can't comply with both requirements (request module
asynchronously from probe, display turned on before mucking with links).
We also need this changed for SOF, the i915_init is done in the probe.
-Pierre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-17 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 17:48 Timing issues between ALSA and i915 drivers Pierre-Louis Bossart
2019-01-16 19:17 ` Takashi Iwai
2019-01-16 23:10 ` Pierre-Louis Bossart
2019-01-17 0:13 ` [alsa-devel] " Pierre-Louis Bossart
2019-01-17 19:53 ` Pierre-Louis Bossart
2019-01-17 20:31 ` Takashi Iwai
2019-01-17 20:47 ` Pierre-Louis Bossart [this message]
2019-01-18 8:08 ` Takashi Iwai
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=389d9520-1380-dafa-2245-dc2e2b2b74f2@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tiwai@suse.de \
/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