From: Fred Oh <fred.oh@xxxxxxxxxxxxxxx> When enabling new platforms, missing dependencies on i915 driver updates cause i915 timeouts. Rather than wait 60s for no good reason, this patch adds a kernel parameter so that developers can cut to the chase and skip a known problem. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx> Reviewed-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx> Reviewed-by: Chao Song <chao.song@xxxxxxxxxxxxxxx> Signed-off-by: Fred Oh <fred.oh@xxxxxxxxxxxxxxx> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx> --- sound/hda/hdac_i915.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index b428537f284c..5927d5200785 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -11,6 +11,10 @@ #include <sound/hda_i915.h> #include <sound/hda_register.h> +static int hdac_i915_timeout_ms = 60000; +module_param(hdac_i915_timeout_ms, int, 0444); +MODULE_PARM_DESC(hdac_i915_timeout_ms, "i915 initialization timeout in msec"); + /** * snd_hdac_i915_set_bclk - Reprogram BCLK for HSW/BDW * @bus: HDA core bus @@ -165,9 +169,8 @@ 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_killable_timeout(&acomp->master_bind_complete, - msecs_to_jiffies(60 * 1000)); + msecs_to_jiffies(hdac_i915_timeout_ms)); } } if (!acomp->ops) { -- 2.42.0