diff -r 8f1fc1b74860 sys/dev/acpi/acpi_pci.h --- a/sys/dev/acpi/acpi_pci.h Fri Jan 17 04:11:33 2025 +0000 +++ b/sys/dev/acpi/acpi_pci.h Mon Jan 20 17:16:22 2025 +0000 @@ -31,6 +31,13 @@ #ifndef _SYS_DEV_ACPI_ACPI_PCI_H #define _SYS_DEV_ACPI_ACPI_PCI_H +#include + +#include +#include + +struct acpi_devnode; + ACPI_STATUS acpi_pcidev_scan(struct acpi_devnode *); ACPI_STATUS acpi_pcidev_pciroot_bus(ACPI_HANDLE, uint16_t *); ACPI_STATUS acpi_pcidev_ppb_downbus(pci_chipset_tag_t, diff -r 8f1fc1b74860 sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c --- a/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Fri Jan 17 04:11:33 2025 +0000 +++ b/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Mon Jan 20 17:16:22 2025 +0000 @@ -32,6 +32,7 @@ #ifdef __NetBSD__ #include +#include #endif #include @@ -459,7 +460,18 @@ static u32 asle_set_backlight(struct drm DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); -#ifndef __NetBSD__ /* XXX backlight */ +#ifdef __NetBSD__ + const struct pci_attach_args *const pa = &dev->pdev->pd_pa; + struct acpi_devnode *const node = + acpi_pcidev_find(pci_get_segment(pa->pa_pc), + pa->pa_bus, pa->pa_device, pa->pa_function); + if (node != NULL && node->ad_device != NULL) { + /* XXX device_acquire, device_release */ + DRM_DEBUG_KMS("deferring backlight to %s\n", + device_xname(node->ad_device)); + return 0; + } +#else if (acpi_video_get_backlight_type() == acpi_backlight_native) { DRM_DEBUG_KMS("opregion backlight request ignored\n"); return 0;