Received: from air.basealt.ru (air.basealt.ru [194.107.17.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C33919B3FF for ; Thu, 4 Jul 2024 13:35:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.39 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100112; cv=none; b=Lk/aCvje1RTFs0Wd3XqfmapUPbNxQBMENb57XtBvAIDqd2mMm/5wuyfWPgr49IBWXlV2uHaDApHhkFq2EUk8LNyLSrwUadZJhRdSKUKA6ucuBeVq0JSfDwYdcnBZgrPMtXYxIb96MOAtR00dVRa9C/k8Pc6hXSTCXyGGgS+mNa4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720100112; c=relaxed/simple; bh=t7okNjMNFdjDtQL2W0sjND08CRWtomMns4aA0huCMWE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=cJGnbs0VbF/5NMOo1p1vf+VRgAtPw1XKtb1u/9Wn+5pWLgUPCleph989sbeuNTS604Ge/leDbXo/HM/vpaEy5fVPtjSzYK/fK6tiuyCpwI+gH+t4EFucMkZnUAA0X/z5HXOkOKMqlK9VbACjq9ezdIwSUcJsqZDi3lFsUqWVNM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: by air.basealt.ru (Postfix, from userid 490) id 0EDF02F2024D; Thu, 4 Jul 2024 13:28:06 +0000 (UTC) X-Spam-Level: Received: from altlinux.malta.altlinux.ru (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 5D00F2F20251; Thu, 4 Jul 2024 13:27:59 +0000 (UTC) From: kovalev@altlinux.org To: stable@vger.kernel.org Cc: kovalev@altlinux.org, Maarten Lankhorst , Peter Ujfalusi , Kai Vehmanen , Pierre-Louis Bossart , Takashi Iwai Subject: [PATCH 6.6.y] ALSA: hda: i915: Allow override of gpu binding. Date: Thu, 4 Jul 2024 16:27:57 +0300 Message-Id: <20240704132757.120509-1-kovalev@altlinux.org> X-Mailer: git-send-email 2.33.8 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Maarten Lankhorst commit 2e8c90386db48e425997ca644fa40876b2058b30 upstream. 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 Link: https://lore.kernel.org/r/20231009115437.99976-7-maarten.lankhorst@linux.intel.com Signed-off-by: Takashi Iwai Signed-off-by: Vasiliy Kovalev --- 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