Control: tags -1 + patch

Hello,

Ben Hutchings, le dim. 07 juil. 2019 17:36:03 +0100, a ecrit:
> On Sun, 2019-07-07 at 17:16 +0200, Samuel Thibault wrote:
> > Ben Hutchings, le dim. 07 juil. 2019 13:35:20 +0100, a ecrit:
> > > i915 belongs in fb-modules.  I'm not sure that sound-modules should
> > > depend on it, as it's not a hard dependency.
> > 
> > It is not a hard-hard dependency for the HDA driver, but without it
> > there is a 60s delay for the detection of HDA-based devices...
> 
> I think that could (and should) be avoided by only waiting if
> request_module() succeeds.

Indeed.  I can confirm that the attached patch fixes that.  I can look
at the submission to upstream.

> And I think all installer configurations that include sound-modules
> also include fb-modules already.

Indeed.

We really need to fix this for the 10.1 release: since hda-based boards
are very common we are getting more and more reports of people failing
to get speech synthesis (no, they don't read the errata).

What do you prefer?  Including the proposed patch in the Buster Debian
package?  Rather wait for upstream to include the patch, and in the
meanwhile adding i915.ko to fb-modules in Buster?

Samuel
hda: Fix 1-minute detection delay when i915 module is not available

Do not try to wait for i915 registration when loading the i915 module is known
to have failed (and not just because modules are not enabled)

Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>

---
 sound/hda/hdac_i915.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -143,10 +143,14 @@ int snd_hdac_i915_init(struct hdac_bus *
        if (!acomp)
                return -ENODEV;
        if (!acomp->ops) {
-               request_module("i915");
-               /* 60s timeout */
-               wait_for_completion_timeout(&bind_complete,
-                                           msecs_to_jiffies(60 * 1000));
+#ifdef CONFIG_MODULES
+               if (request_module("i915") == 0)
+#endif
+               {
+                       /* 60s timeout */
+                       wait_for_completion_timeout(&bind_complete,
+                                                   msecs_to_jiffies(60 * 
1000));
+               }
        }
        if (!acomp->ops) {
                dev_info(bus->dev, "couldn't bind with audio component\n");

Reply via email to