From patchwork Mon Feb 26 12:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 775960 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 AADE5C48BF6 for ; Mon, 26 Feb 2024 12:43:56 +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 BF8EBB71; Mon, 26 Feb 2024 13:43:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BF8EBB71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1708951434; bh=4VIPX9egWgJRNiiGEM9wm8oDiCKsOQEHw4CxYJ7Q4bE=; 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=DiHPfp4LbgeoQV/v/9gz1l+P7FCISYXjh94Gx1mjCRxDEPTpAFnHYqXZNsgjdG0x9 9KPvtVTAEPzjtrCnFaQvXTy/9r3+CDT0GfOeC23etHWJefs05JM33TkLnhJvN3tjcD WaepEUK4KTU6YCF5sYH0HfdL1sasP86hWQvT7D9I= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98AA7F805CA; Mon, 26 Feb 2024 13:43:15 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 17221F805C9; Mon, 26 Feb 2024 13:43:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F4ABF80254; Mon, 26 Feb 2024 13:43:09 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 F242EF80212 for ; Mon, 26 Feb 2024 13:43:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F242EF80212 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=adWqKymI DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951385; x=1740487385; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4VIPX9egWgJRNiiGEM9wm8oDiCKsOQEHw4CxYJ7Q4bE=; b=adWqKymIIlkqY8DsEy77njd0tPXMB3k8KZOrPoAAWt4fBsQjShUib6ez r4qXjmOCv+o5RcJ8II/djf5jVJUQnARvCimIQbBwAU+WqElxDlpjt+vWe yN4mao618KQaCWcJ42bPwx6Kj4ks2csZnKCr3KD5EscKCfnr8nF+5ISur CUZAXsaVD0qTuMUZA/zK3hjZB/9XBW0JkCzYabSCp4Y/ZWeQ3+/qcFOL+ 6NIWxPiwCMooqc45ylv9Fu5mowhM6S3rUZryQe2ayfL7GCD597QJAJDa8 49pkDo6FOhxG6oAQgeTFDwnsU0RNi+ugcHZBbD3DGyH0YDs64aFzRAVEB g==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658230" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658230" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688610" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:42:57 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 1/5] ALSA: hda: Skip i915 initialization on CNL/LKF-based platforms Date: Mon, 26 Feb 2024 13:44:28 +0100 Message-Id: <20240226124432.1203798-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: OAET6L3H5UOCCTNKV5UL6DLZRKYBF7PK X-Message-ID-Hash: OAET6L3H5UOCCTNKV5UL6DLZRKYBF7PK X-MailFrom: cezary.rojewski@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.9 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: Commit 78f613ba1efb ("drm/i915: finish removal of CNL") and its friends removed support for i915 for all CNL-based platforms. HDAudio library, however, still treats such platforms as valid candidates for i915 binding. Update query mechanism to reflect changes made in drm tree. At the same time, i915 support for LKF-based platforms has not been provided so remove them from valid binding candidates. Link: https://lore.kernel.org/all/20210728215946.1573015-1-lucas.demarchi@intel.com/ Reviewed-by: Rodrigo Vivi Signed-off-by: Cezary Rojewski --- sound/hda/hdac_i915.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 365c36fdf205..e9425213320e 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -127,15 +127,41 @@ static int i915_component_master_match(struct device *dev, int subcomponent, /* check whether Intel graphics is present and reachable */ static int i915_gfx_present(struct pci_dev *hdac_pci) { + /* List of known platforms with no i915 support. */ + static const struct pci_device_id denylist[] = { + /* CNL */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a40), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a41), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a42), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a44), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a49), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a4a), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a4c), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a50), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a51), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a52), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a54), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a59), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a5a), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a5c), 0x030000, 0xff0000 }, + /* LKF */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9840), 0x030000, 0xff0000 }, + {} + }; struct pci_dev *display_dev = NULL; if (!gpu_bind || (gpu_bind < 0 && video_firmware_drivers_only())) return false; for_each_pci_dev(display_dev) { - if (display_dev->vendor == PCI_VENDOR_ID_INTEL && - (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY && - connectivity_check(display_dev, hdac_pci)) { + if (display_dev->vendor != PCI_VENDOR_ID_INTEL || + (display_dev->class >> 16) != PCI_BASE_CLASS_DISPLAY) + continue; + + if (pci_match_id(denylist, display_dev)) + continue; + + if (connectivity_check(display_dev, hdac_pci)) { pci_dev_put(display_dev); return true; }