From patchwork Mon Oct 9 11:54:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 13413974 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 CD7B7E95A9E for ; Mon, 9 Oct 2023 16:00:53 +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 CCD37ED3; Mon, 9 Oct 2023 18:00:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CCD37ED3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696867251; bh=u2Z5LqkjMyoVBdlcTSHSEUmyVqo7HwaJ0MCj50wy3D4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bMvoFPlrCqhoCUxjV/HyDXvRPCL8h294gIKZPndwdboV1osINLe/3onz2/2Jeiw/L 6mMNMtGMqn/d8HUb8682WI/fgU49Q5Opb+xCo9pfWl+rX1m49IPVLZYMQpIJXubjvQ vsLd23CPmDxVC7jQJsYXkQAvDpKsN4t/OVNosSJ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44D08F805E0; Mon, 9 Oct 2023 17:57:43 +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 88225F805E2; Mon, 9 Oct 2023 17:57:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0CDD7F8055A; Mon, 9 Oct 2023 13:54:59 +0200 (CEST) Received: from mblankhorst.nl (lankhorst.se [IPv6:2a02:2308:0:7ec:e79c:4e97:b6c4:f0ae]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 54697F80552; Mon, 9 Oct 2023 13:54:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 54697F80552 From: Maarten Lankhorst To: alsa-devel@alsa-project.org Cc: Maarten Lankhorst , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Daniel Baluta , linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH v7 06/13] ALSA: hda: i915: Allow override of gpu binding. Date: Mon, 9 Oct 2023 13:54:30 +0200 Message-Id: <20231009115437.99976-7-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009115437.99976-1-maarten.lankhorst@linux.intel.com> References: <20231009115437.99976-1-maarten.lankhorst@linux.intel.com> MIME-Version: 1.0 X-MailFrom: mlankhorst@mblankhorst.nl X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: YPRXZ7J77FHQI3UH2DPYSWL4QFORZH4E X-Message-ID-Hash: YPRXZ7J77FHQI3UH2DPYSWL4QFORZH4E X-Mailman-Approved-At: Mon, 09 Oct 2023 15:57:19 +0000 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: Selecting CONFIG_DRM selects CONFIG_VIDEO_NOMODESET, which exports video_firmware_drivers_only(). This can be used as a first approximation on whether i915 will be available. It's safe to use as this is only built when CONFIG_SND_HDA_I915 is selected by CONFIG_I915. It's not completely fool proof, as you can boot with "nomodeset i915.modeset=1" to make i915 load regardless, or use "i915.force_probe=!*" to never load i915, but the common case of booting with nomodeset to disable all GPU drivers this will work as intended. Because of this, we add an extra module parameter, snd_hda_core.gpu_bind that can be used to signal users intent. -1 follows nomodeset, 0 disables binding, 1 forces wait/-EPROBE_DEFER on binding. Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart --- sound/hda/hdac_i915.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index b428537f284c7..a4a712c795c3d 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -10,6 +10,12 @@ #include #include #include +#include