Skip to content

Commit c7be643

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models
Dell laptops with IPU6 camera (the Tiger Lake, Alder Lake and Raptor Lake generations) have broken ACPI MIPI DISCO information (this results from an OEM attempt to make Linux work by supplying it with custom data in the ACPI tables which has never been supported in the mainline). Instead of adding a lot of DMI quirks for this, check for Dell platforms based on the processor generations in question and drop the ACPI graph port nodes, likely to be created with the help of invalid data, on all of them. Fixes: bd721b9 ("ACPI: scan: Extract CSI-2 connection graph from _CRS") Signed-off-by: Hans de Goede <hdegoede@redhat.com> [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6ba59ff commit c7be643

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

drivers/acpi/internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ void acpi_mipi_check_crs_csi2(acpi_handle handle);
302302
void acpi_mipi_scan_crs_csi2(void);
303303
void acpi_mipi_init_crs_csi2_swnodes(void);
304304
void acpi_mipi_crs_csi2_cleanup(void);
305+
#ifdef CONFIG_X86
305306
bool acpi_graph_ignore_port(acpi_handle handle);
307+
#else
308+
static inline bool acpi_graph_ignore_port(acpi_handle handle) { return false; }
309+
#endif
306310

307311
#endif /* _ACPI_INTERNAL_H_ */

drivers/acpi/mipi-disco-img.c

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,20 @@ void acpi_mipi_crs_csi2_cleanup(void)
725725
acpi_mipi_del_crs_csi2(csi2);
726726
}
727727

728-
static const struct dmi_system_id dmi_ignore_port_nodes[] = {
729-
{
730-
.matches = {
731-
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
732-
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 9315"),
733-
},
734-
},
735-
{ }
728+
#ifdef CONFIG_X86
729+
#include <asm/cpu_device_id.h>
730+
#include <asm/intel-family.h>
731+
732+
/* CPU matches for Dell generations with broken ACPI MIPI DISCO info */
733+
static const struct x86_cpu_id dell_broken_mipi_disco_cpu_gens[] = {
734+
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, NULL),
735+
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL),
736+
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL),
737+
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL),
738+
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, NULL),
739+
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, NULL),
740+
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, NULL),
741+
{}
736742
};
737743

738744
static const char *strnext(const char *s1, const char *s2)
@@ -761,7 +767,10 @@ bool acpi_graph_ignore_port(acpi_handle handle)
761767
static bool dmi_tested, ignore_port;
762768

763769
if (!dmi_tested) {
764-
ignore_port = dmi_first_match(dmi_ignore_port_nodes);
770+
if (dmi_name_in_vendors("Dell Inc.") &&
771+
x86_match_cpu(dell_broken_mipi_disco_cpu_gens))
772+
ignore_port = true;
773+
765774
dmi_tested = true;
766775
}
767776

@@ -794,3 +803,4 @@ bool acpi_graph_ignore_port(acpi_handle handle)
794803
kfree(orig_path);
795804
return false;
796805
}
806+
#endif

0 commit comments

Comments
 (0)