@@ -143,7 +143,8 @@ static bool i915_gfx_present(void)
int snd_hdac_i915_init(struct hdac_bus *bus)
{
struct drm_audio_component *acomp;
- int err;
+ unsigned long wait = 0;
+ int err, i;
if (!i915_gfx_present())
return -ENODEV;
@@ -159,9 +160,10 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!acomp->ops) {
if (!IS_ENABLED(CONFIG_MODULES) ||
!request_module("i915")) {
- /* 60s timeout */
- wait_for_completion_timeout(&acomp->master_bind_complete,
- msecs_to_jiffies(60 * 1000));
+ /* max 60s timeout */
+ for (i = 0; !wait && i < 60; i++)
+ wait = wait_for_completion_timeout(&acomp->master_bind_complete,
+ msecs_to_jiffies(1000));
}
}
if (!acomp->ops) {