Message ID | 20240612104220.22219-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | [1/2] ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models | expand |
Hi Hans, Thanks for the set. On Wed, Jun 12, 2024 at 12:42:20PM +0200, Hans de Goede wrote: > It seems that all Dell laptops with IPU6 camera or the Tiger Lake, "Seems that"? I don't argue against though as I have little information on this, in fact only two systems. > 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. Is there still a need to include linux/dmi.h? > > Fixes: bd721b934323 ("ACPI: scan: Extract CSI-2 connection graph from _CRS") > Cc: stable@vger.kernel.org > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > 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"), I believe the patch adding XPS 9320 has been merged so reverting that first might help backporting. Or maybe it's only in Rafael's testing/for-next branches and so can be dropped easily? > - }, > - }, > - { } > +#ifdef CONFIG_X86 > +#include <asm/cpu_device_id.h> > +#include <asm/intel-family.h> > + > +/* 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
Hi Sakari, On Wed, Jun 12, 2024 at 2:07 PM Sakari Ailus <sakari.ailus@linux.intel.com> wrote: > > Hi Hans, > > Thanks for the set. > > On Wed, Jun 12, 2024 at 12:42:20PM +0200, Hans de Goede wrote: > > It seems that all Dell laptops with IPU6 camera or the Tiger Lake, > > "Seems that"? I don't argue against though as I have little information on > this, in fact only two systems. > > > 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. > > Is there still a need to include linux/dmi.h? > > > > > Fixes: bd721b934323 ("ACPI: scan: Extract CSI-2 connection graph from _CRS") > > Cc: stable@vger.kernel.org > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > > --- > > 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"), > > I believe the patch adding XPS 9320 has been merged so reverting that first > might help backporting. Or maybe it's only in Rafael's testing/for-next > branches and so can be dropped easily? It was in a topic branch, so it could be dropped.
Hi Sakari, On 6/12/24 2:07 PM, Sakari Ailus wrote: > Hi Hans, > > Thanks for the set. > > On Wed, Jun 12, 2024 at 12:42:20PM +0200, Hans de Goede wrote: >> It seems that all Dell laptops with IPU6 camera or the Tiger Lake, > > "Seems that"? I don't argue against though as I have little information on > this, in fact only two systems. Well it seems that all Dell laptops have the ACPI MIPI DISCO and at least for all of them there is no "mipi-img-clock-frequency" and since all our sensor drivers check for a "clock-frequency" attribute now this is breaking things everywhere AFAICT. At least that is what is happening on the Dell Latitude 9420 (Tiger Lake) which I noticed was also broken since ACPI MIPI DISCO support landed in 6.8. >> 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. > > Is there still a need to include linux/dmi.h? Yes for the dmi_name_in_vendors() check. >> Fixes: bd721b934323 ("ACPI: scan: Extract CSI-2 connection graph from _CRS") >> Cc: stable@vger.kernel.org >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >> --- >> 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"), > > I believe the patch adding XPS 9320 has been merged so reverting that first > might help backporting. Or maybe it's only in Rafael's testing/for-next > branches and so can be dropped easily? I already asked Rafael to drop that since it has not been send to Linus yet. The idea was that backporting would actually be easier without adding that to the mix. Regards, Hans > >> - }, >> - }, >> - { } >> +#ifdef CONFIG_X86 >> +#include <asm/cpu_device_id.h> >> +#include <asm/intel-family.h> >> + >> +/* 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 >
On Wed, Jun 12, 2024 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote: > > 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 <hdegoede@redhat.com> > --- > 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 <asm/cpu_device_id.h> > +#include <asm/intel-family.h> > + > +/* 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 > -- I'm inclined to apply this one with the changelog adjusted as requested by Sakari. Can you please make the changes in the changelog and resend?
On Wed, Jun 12, 2024 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote: > > 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 <hdegoede@redhat.com> > --- > 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 <asm/cpu_device_id.h> > +#include <asm/intel-family.h> > + > +/* 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 > -- Applied as 6.10-rc material, along with the [2/2], with the following changelog: "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." Thanks!
Hi Rafael, On Mon, Jun 17, 2024 at 09:41:57PM +0200, Rafael J. Wysocki wrote: > On Wed, Jun 12, 2024 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote: > > > > 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 <hdegoede@redhat.com> > > --- > > 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 <asm/cpu_device_id.h> > > +#include <asm/intel-family.h> > > + > > +/* 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 > > -- > > Applied as 6.10-rc material, along with the [2/2], with the following changelog: > > "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). I was expecting to see v2 with fixed changelog from Hans. These issues with these (full list unknown) Dell laptops have nothing to do with DisCo for Imaging, not the spec nor the implementation. Instead the DSDT partially aligns with Documentation/firmware-guide/acpi/dsd/graph.rst but lacks e.g. IVSC from the graph as well as ACPI power resources for devices related to camera. IOW it's always been unusable. > > 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."
Hi Sakari, On Mon, Jun 17, 2024 at 10:12 PM Sakari Ailus <sakari.ailus@linux.intel.com> wrote: > > Hi Rafael, > > On Mon, Jun 17, 2024 at 09:41:57PM +0200, Rafael J. Wysocki wrote: > > On Wed, Jun 12, 2024 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote: > > > > > > 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 <hdegoede@redhat.com> > > > --- > > > 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 <asm/cpu_device_id.h> > > > +#include <asm/intel-family.h> > > > + > > > +/* 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 > > > -- > > > > Applied as 6.10-rc material, along with the [2/2], with the following changelog: > > > > "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). > > I was expecting to see v2 with fixed changelog from Hans. Hans asked me offline to take care of this. > These issues with these (full list unknown) Dell laptops have nothing to do > with DisCo for Imaging, not the spec nor the implementation. Instead the > DSDT partially aligns with Documentation/firmware-guide/acpi/dsd/graph.rst > but lacks e.g. IVSC from the graph as well as ACPI power resources for > devices related to camera. IOW it's always been unusable. The code related to DisCo for Imaging ends up using them and failing, though, IIUC. So what should I change in the paragraph quoted above? > > > > 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." Am I guessing correctly that the remaining part of it is fine?
Hi Rafael, On Tue, Jun 18, 2024 at 02:49:25PM +0200, Rafael J. Wysocki wrote: > Hi Sakari, > > On Mon, Jun 17, 2024 at 10:12 PM Sakari Ailus > <sakari.ailus@linux.intel.com> wrote: > > > > Hi Rafael, > > > > On Mon, Jun 17, 2024 at 09:41:57PM +0200, Rafael J. Wysocki wrote: > > > On Wed, Jun 12, 2024 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote: > > > > > > > > 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 <hdegoede@redhat.com> > > > > --- > > > > 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 <asm/cpu_device_id.h> > > > > +#include <asm/intel-family.h> > > > > + > > > > +/* 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 > > > > -- > > > > > > Applied as 6.10-rc material, along with the [2/2], with the following changelog: > > > > > > "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). > > > > I was expecting to see v2 with fixed changelog from Hans. > > Hans asked me offline to take care of this. Ok. > > > These issues with these (full list unknown) Dell laptops have nothing to do > > with DisCo for Imaging, not the spec nor the implementation. Instead the > > DSDT partially aligns with Documentation/firmware-guide/acpi/dsd/graph.rst > > but lacks e.g. IVSC from the graph as well as ACPI power resources for > > devices related to camera. IOW it's always been unusable. > > The code related to DisCo for Imaging ends up using them and failing, > though, IIUC. > > So what should I change in the paragraph quoted above? How about this: Many Dell laptops, possibly all of them with IPU6 camera (the Tiger Lake, Alder Lake and Raptor Lake generations) have Linux ACPI graph describing camera connections only partially while the rest of what would be required for the cameras to function in these systems is simply missing in DSDT. > > > > > > > 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." > > Am I guessing correctly that the remaining part of it is fine? Seems good to me.
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 <asm/cpu_device_id.h> +#include <asm/intel-family.h> + +/* 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
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 <hdegoede@redhat.com> --- drivers/acpi/internal.h | 4 ++++ drivers/acpi/mipi-disco-img.c | 28 +++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-)