From patchwork Fri Sep 15 13:45:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 723161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C341EE645C for ; Fri, 15 Sep 2023 13:46:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 128EA93A; Fri, 15 Sep 2023 15:45:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 128EA93A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694785604; bh=IgkKMVo44SXkghwQg/qFe2xD4nr6Z2EAedZzXqCo/+g=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=NU2QaXhvNZvF1DbA1p67z7PHvm7g8kWP4Z61gvo4GFmSZCcQww9twIMEidtxrLqwc 4/Z/VzbTFYLZDQ2tPaDfUrbGmd/BPGjSwt5zewuoB6o5xINbWvp03oAIiiHHQ5D/Bn uzJwJxydYJ40YZm2mTH2DlIS+QBtURUNjEKiG9PU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C934FF80537; Fri, 15 Sep 2023 15:45:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7491CF80425; Fri, 15 Sep 2023 15:45:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A32FF80425; Fri, 15 Sep 2023 15:45:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EE24EF80141 for ; Fri, 15 Sep 2023 15:45:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EE24EF80141 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Vr5CU1Xm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694785528; x=1726321528; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IgkKMVo44SXkghwQg/qFe2xD4nr6Z2EAedZzXqCo/+g=; b=Vr5CU1XmXkOmzG6WByLdGmQT7zaYnAll4A+C1463crbQ5mXqumUvFACO SzqlarQFDNojHDhSC8ZBROX0Fi4KKQlfg82xu4JJs9PmRK3/1KFN099Of z0ldIQIyecSuprW8tvLAQ2liM97xCykMviKu+UuRyqCliTVTZnczRW7Cp 1DvkrDAdKfxHs0Prsuw8iVSiL78t7UNMiDAxRqO8XCTpKcRUyAQ+wh838 dgzKZ1FOKx4LG5GHzceNULGWWDNFcEzIhf3HCfu1rO6FBux2pgFp3pXxG Cj6wh2d2omNhyqvHgxfyFTLnQY/X5mnIBJIP2hAm6pwIORvqSveRF50G4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="465613411" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="465613411" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 06:45:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="780098894" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="780098894" Received: from brhacker-mobl26.amr.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.48.34]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 06:45:21 -0700 From: Peter Ujfalusi To: tiwai@suse.com, perex@perex.cz Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, yung-chuan.liao@linux.intel.com, fred.oh@linux.intel.com, chao.song@linux.intel.com Subject: [PATCH] ALSA: hda: hdac-i915: make i915 timeout configurable Date: Fri, 15 Sep 2023 16:45:27 +0300 Message-ID: <20230915134527.16679-1-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Message-ID-Hash: WZGDRTOAKOSNQP6IMYNSXMIMFA7C76KA X-Message-ID-Hash: WZGDRTOAKOSNQP6IMYNSXMIMFA7C76KA X-MailFrom: peter.ujfalusi@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fred Oh 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 Reviewed-by: Bard Liao Reviewed-by: Chao Song Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi --- 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 #include +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) {