kernel-hacking-2024-linux-s.../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 ACPICA: Add support for FFH Opregion special context data 2022-10-28 17:28:22 +02:00
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 ACPICA: Allow address_space_handler Install and _REG execution as 2 separate steps 2022-12-08 17:38:28 +01:00
acrestyp.h
actbl.h
actbl1.h ACPICA: Finish support for the CDAT table 2022-10-28 17:28:23 +02:00
actbl2.h ACPICA: Finish support for the CDAT table 2022-10-28 17:28:23 +02:00
actbl3.h
actypes.h ACPICA: Add support for FFH Opregion special context data 2022-10-28 17:28:22 +02:00
acuuid.h ACPICA: Add a couple of new UUIDs to the known UUID list 2022-10-28 17:28:22 +02:00
apei.h
battery.h ACPI: battery: Pass battery hook pointer to hook callbacks 2022-11-16 08:48:18 +01:00
button.h
cppc_acpi.h ACPI: CPPC: Disable FIE if registers in PCC regions 2022-09-24 18:43:46 +02:00
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 ACPI: processor: Silence missing prototype warnings 2022-11-23 19:36:46 +01:00
reboot.h
video.h ACPI: video: Allow GPU drivers to report no panels 2022-12-22 17:26:41 +01:00