From patchwork Wed Jun 12 10:42:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13694782 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 1A5AC16EBF8 for ; Wed, 12 Jun 2024 10:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718188957; cv=none; b=Tu5Q6m8aHcwy1Qm2sUsCvoMX7Lv9Ppx1h+9z+5TA3XxO8zZNyUpv37RbNH0nuV558Vmzdr2XQO91An3XaM0GDWihk2c0zaR7xgmo/SVrUYvYd68IMN2xW+uSaHnTbN2PvaBMjSGVBXe5g6L48ukFB6cQlC5wiOl2coSK8WuYgvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718188957; c=relaxed/simple; bh=4qeU+BH4L7ZSdqz5prMqOvuznMdYTQsDMUl0cmgcWLk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EkuxeCWjVKfUvRJY11b47W7renqW/3e9eog7UFCddTBrWdkH+xQfeooR4SV9+zPPQGS1zmEFKdsmhc8WE5Fl9r7MA6wqIOKHORIxhRvz2XLijGP2TUaJJZ9aqKD4Xc6MG0NDlE7cR/lV7AbbSHCHl3tLApdTaZgBkro9v5oasvI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=N6himaj7; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N6himaj7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718188954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WIBTfbVBBmyg3xIq26D/CzZPKpc6Ha7O2uPuJ1J8wqU=; b=N6himaj70sHeWVe+l+jxX1MCDHprZx5ALdVWIcJQoBGfsKGhKeelrxH1Qp9xn/tuR49MXH 8WrQVqX/YqcPh0sUOEQqSlz2CMIEwSC81KvfCQ8LnRm324H8g848bmNHSPDnSymOWveJDo d854YwoQlPabfEmqVg4pcfIaNxnH8pQ= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-s97hiYvsPbS4_P2oq2mAHw-1; Wed, 12 Jun 2024 06:42:29 -0400 X-MC-Unique: s97hiYvsPbS4_P2oq2mAHw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 52B82195608B; Wed, 12 Jun 2024 10:42:28 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.150]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 98F8A1956056; Wed, 12 Jun 2024 10:42:26 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Sakari Ailus Cc: Hans de Goede , linux-acpi@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 1/2] ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models Date: Wed, 12 Jun 2024 12:42:20 +0200 Message-ID: <20240612104220.22219-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 It seems that all Dell laptops with IPU6 camera or the Tiger Lake, Alder Lake and Raptor Lake generations have broken ACPI MIPI DISCO information. Instead of adding a lot of DMI quirks for this, check for these CPU generations and disable ACPI MIPI DISCO support on all Dell laptops with these CPU generations. Fixes: bd721b934323 ("ACPI: scan: Extract CSI-2 connection graph from _CRS") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede --- drivers/acpi/internal.h | 4 ++++ drivers/acpi/mipi-disco-img.c | 28 +++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 2a0e9fc7b74c..601b670356e5 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -302,6 +302,10 @@ void acpi_mipi_check_crs_csi2(acpi_handle handle); void acpi_mipi_scan_crs_csi2(void); void acpi_mipi_init_crs_csi2_swnodes(void); void acpi_mipi_crs_csi2_cleanup(void); +#ifdef CONFIG_X86 bool acpi_graph_ignore_port(acpi_handle handle); +#else +static inline bool acpi_graph_ignore_port(acpi_handle handle) { return false; } +#endif #endif /* _ACPI_INTERNAL_H_ */ diff --git a/drivers/acpi/mipi-disco-img.c b/drivers/acpi/mipi-disco-img.c index d05413a0672a..0ab13751f0db 100644 --- a/drivers/acpi/mipi-disco-img.c +++ b/drivers/acpi/mipi-disco-img.c @@ -725,14 +725,20 @@ void acpi_mipi_crs_csi2_cleanup(void) acpi_mipi_del_crs_csi2(csi2); } -static const struct dmi_system_id dmi_ignore_port_nodes[] = { - { - .matches = { - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"), - }, - }, - { } +#ifdef CONFIG_X86 +#include +#include + +/* CPU matches for Dell generations with broken ACPI MIPI DISCO info */ +static const struct x86_cpu_id dell_broken_mipi_disco_cpu_gens[] = { + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, NULL), + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, NULL), + {} }; static const char *strnext(const char *s1, const char *s2) @@ -761,7 +767,10 @@ bool acpi_graph_ignore_port(acpi_handle handle) static bool dmi_tested, ignore_port; if (!dmi_tested) { - ignore_port = dmi_first_match(dmi_ignore_port_nodes); + if (dmi_name_in_vendors("Dell Inc.") && + x86_match_cpu(dell_broken_mipi_disco_cpu_gens)) + ignore_port = true; + dmi_tested = true; } @@ -794,3 +803,4 @@ bool acpi_graph_ignore_port(acpi_handle handle) kfree(orig_path); return false; } +#endif From patchwork Wed Jun 12 10:48:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 13694796 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 4FD3A16F282 for ; Wed, 12 Jun 2024 10:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189327; cv=none; b=CgNCEV1fcGPtLAi29PG9nL5MjrfFLKlen7syMVDzVyjH+oUplTOdhL+pPxZDqKzv/Pbt4p9Xuu74NRlv+5Xt3a9OlurHYAjEeP9WUpg/djzJJKKOoPUkk1EBGRlN/opk2GqaEdfaUdQyuz6TgaVpa/6x9u1nuygZne3F9BvIFFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189327; c=relaxed/simple; bh=GepX4zBkYvPjQZAKwdjGamNBQibq0dFWl5KSbaxvixw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TdGKrifRviPBhjigzuV2PMvQRlwBMMZjdPAa7ahjqXmwneE4t1FzEfk8E1JJLY6CGFKNY8W2Nm7wHisZQ9gkbIJd16YePVWXNSI53GOWZI23Ed8W0a8VshCr9i+MBAk/lTMPng3ZV2urgK9vWgOKolgHR93VmImz31B8d7WUHBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cn2bO7G2; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cn2bO7G2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718189324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vA2EVeRK9NWPrxUoSPZf0kMqlgDnRY4qjeQ4n5ZT9ms=; b=cn2bO7G2SQ0luBLSDo8lKsx8VBoUxXbMN2DW9YdieHxYOEn/rnDEzq821rmu/2iK+RlWub Lvwcu+3jpcH5MRh0G6DFQW6pUxlZHz8lJEAQE5mjd45aCmGUyhsOlXb7RpFSpCPrjZa7xF 4lFkbCY7xa1pyc4NReN57RNVWETo7YE= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-cxz-2SjfMHuh98b4AOUtVA-1; Wed, 12 Jun 2024 06:48:40 -0400 X-MC-Unique: cxz-2SjfMHuh98b4AOUtVA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AC3E119560B8; Wed, 12 Jun 2024 10:48:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.150]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 26AE21956053; Wed, 12 Jun 2024 10:48:37 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Sakari Ailus Cc: Hans de Goede , linux-acpi@vger.kernel.org Subject: [PATCH 2/2] ACPI: mipi-disco: Switch to new Intel CPU model defines Date: Wed, 12 Jun 2024 12:48:28 +0200 Message-ID: <20240612104828.25612-1-hdegoede@redhat.com> In-Reply-To: <20240612104220.22219-1-hdegoede@redhat.com> References: <20240612104220.22219-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Switch over to using the new Intel CPU model defines, as the old ones are going away. Signed-off-by: Hans de Goede --- This is done in a separate patch to make backporting the switch to the CPU generation check easier. --- drivers/acpi/mipi-disco-img.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/mipi-disco-img.c b/drivers/acpi/mipi-disco-img.c index 0ab13751f0db..92b658f92dc0 100644 --- a/drivers/acpi/mipi-disco-img.c +++ b/drivers/acpi/mipi-disco-img.c @@ -731,13 +731,13 @@ void acpi_mipi_crs_csi2_cleanup(void) /* CPU matches for Dell generations with broken ACPI MIPI DISCO info */ static const struct x86_cpu_id dell_broken_mipi_disco_cpu_gens[] = { - X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, NULL), - X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL), - X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL), - X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL), - X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, NULL), - X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, NULL), - X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, NULL), + X86_MATCH_VFM(INTEL_TIGERLAKE, NULL), + X86_MATCH_VFM(INTEL_TIGERLAKE_L, NULL), + X86_MATCH_VFM(INTEL_ALDERLAKE, NULL), + X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL), + X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL), + X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL), + X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL), {} };