WSL2-Linux-Kernel/include/acpi
Hans de Goede f64e4275ef ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops
The Dell Latitude E6430 both with and without the optional NVidia dGPU
has a bug in its ACPI tables which is causing Linux to assign the wrong
ACPI fwnode / companion to the pci_device for the i915 iGPU.

Specifically under the PCI root bridge there are these 2 ACPI Device()s :

 Scope (_SB.PCI0)
 {
     Device (GFX0)
     {
         Name (_ADR, 0x00020000)  // _ADR: Address
     }

     ...

     Device (VID)
     {
         Name (_ADR, 0x00020000)  // _ADR: Address
         ...

         Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
         {
             VDP8 = Arg0
             VDP1 (One, VDP8)
         }

         Method (_DOD, 0, NotSerialized)  // _DOD: Display Output Devices
         {
             ...
         }
         ...
     }
 }

The non-functional GFX0 ACPI device is a problem, because this gets
returned as ACPI companion-device by acpi_find_child_device() for the iGPU.

This is a long standing problem and the i915 driver does use the ACPI
companion for some things, but works fine without it.

However since commit 63f534b8ba ("ACPI: PCI: Rework acpi_get_pci_dev()")
acpi_get_pci_dev() relies on the physical-node pointer in the acpi_device
and that is set on the wrong acpi_device because of the wrong
acpi_find_child_device() return. This breaks the ACPI video code,
leading to non working backlight control in some cases.

Add a type.backlight flag, mark ACPI video bus devices with this and make
find_child_checks() return a higher score for children with this flag set,
so that it picks the right companion-device.

Fixes: 63f534b8ba ("ACPI: PCI: Rework acpi_get_pci_dev()")
Co-developed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: 6.1+ <stable@vger.kernel.org> # 6.1+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-01-10 20:23:48 +01:00
..
platform
acbuffer.h
acconfig.h
acexcep.h
acnames.h
acoutput.h
acpi.h
acpi_bus.h ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops 2023-01-10 20:23:48 +01:00
acpi_drivers.h
acpi_io.h
acpi_lpat.h
acpi_numa.h
acpiosxf.h
acpixf.h
acrestyp.h
actbl.h
actbl1.h
actbl2.h
actbl3.h
actypes.h
acuuid.h
apei.h
battery.h
button.h
cppc_acpi.h
ghes.h - Make ghes_edac a simple module like the rest of the EDAC drivers and 2022-12-12 14:47:31 -08:00
hed.h
nfit.h
pcc.h
pdc_intel.h
processor.h
reboot.h
video.h ACPI: video: Allow GPU drivers to report no panels 2022-12-22 17:26:41 +01:00