sync with OpenBSD -current
This commit is contained in:
parent
f4a22ff4b2
commit
9dfe537fef
85 changed files with 12490 additions and 6835 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ccp_pci.c,v 1.10 2024/06/12 12:54:54 bluhm Exp $ */
|
||||
/* $OpenBSD: ccp_pci.c,v 1.11 2024/06/13 17:59:08 bluhm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2018 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -74,7 +74,7 @@ ccp_pci_attach(struct device *parent, struct device *self, void *aux)
|
|||
}
|
||||
|
||||
if (pci_mapreg_map(pa, CCP_PCI_BAR, memtype, 0,
|
||||
&sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_size, 0) != 0) {
|
||||
&sc->sc_iot, &sc->sc_ioh, NULL, NULL, 0) != 0) {
|
||||
printf(": cannot map registers\n");
|
||||
return;
|
||||
}
|
||||
|
@ -107,7 +107,6 @@ psp_pci_attach(struct device *parent, struct device *self, void *aux)
|
|||
if (pci_intr_map_msix(pa, 0, &ih) != 0 &&
|
||||
pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) {
|
||||
printf(": couldn't map interrupt\n");
|
||||
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_size);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,10 +116,14 @@ psp_pci_attach(struct device *parent, struct device *self, void *aux)
|
|||
if (sc->sc_ih != NULL)
|
||||
printf(": %s", intrstr);
|
||||
|
||||
if (psp_attach(sc)) {
|
||||
/* enable interrupts */
|
||||
bus_space_write_4(sc->sc_iot, sc->sc_ioh, PSP_REG_INTEN, -1);
|
||||
if (!psp_attach(sc)) {
|
||||
pci_intr_disestablish(pa->pa_pc, sc->sc_ih);
|
||||
sc->sc_ih = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* enable interrupts */
|
||||
bus_space_write_4(sc->sc_iot, sc->sc_ioh, PSP_REG_INTEN, -1);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: drm_linux.c,v 1.113 2024/06/03 12:48:25 claudio Exp $ */
|
||||
/* $OpenBSD: drm_linux.c,v 1.114 2024/06/13 18:05:54 kettenis Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org>
|
||||
* Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org>
|
||||
|
@ -1521,6 +1521,12 @@ acpi_format_exception(acpi_status status)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
acpi_target_system_state(void)
|
||||
{
|
||||
return acpi_softc->sc_state;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SLIST_HEAD(,backlight_device) backlight_device_list =
|
||||
|
|
|
@ -2308,19 +2308,25 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux)
|
|||
intel_device_info_driver_create(dev_priv, dev->pdev->device, info);
|
||||
|
||||
mmio_bar = (GRAPHICS_VER(dev_priv) == 2) ? 0x14 : 0x10;
|
||||
/* Before gen4, the registers and the GTT are behind different BARs.
|
||||
|
||||
/* from intel_uncore_setup_mmio() */
|
||||
|
||||
/*
|
||||
* Before gen4, the registers and the GTT are behind different BARs.
|
||||
* However, from gen4 onwards, the registers and the GTT are shared
|
||||
* in the same BAR, so we want to restrict this ioremap from
|
||||
* clobbering the GTT which we want ioremap_wc instead. Fortunately,
|
||||
* the register BAR remains the same size for all the earlier
|
||||
* generations up to Ironlake.
|
||||
* For dgfx chips register range is expanded to 4MB, and this larger
|
||||
* range is also used for integrated gpus beginning with Meteor Lake.
|
||||
*/
|
||||
if (GRAPHICS_VER(dev_priv) < 5)
|
||||
mmio_size = 512 * 1024;
|
||||
else if (IS_DGFX(dev_priv))
|
||||
if (IS_DGFX(dev_priv) || GRAPHICS_VER_FULL(dev_priv) >= IP_VER(12, 70))
|
||||
mmio_size = 4 * 1024 * 1024;
|
||||
else
|
||||
else if (GRAPHICS_VER(dev_priv) >= 5)
|
||||
mmio_size = 2 * 1024 * 1024;
|
||||
else
|
||||
mmio_size = 512 * 1024;
|
||||
|
||||
mmio_type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, mmio_bar);
|
||||
if (pci_mapreg_map(pa, mmio_bar, mmio_type, BUS_SPACE_MAP_LINEAR,
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "acpi.h"
|
||||
#if NACPI > 0
|
||||
#define CONFIG_ACPI 1
|
||||
#define CONFIG_ACPI_SLEEP 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,4 +86,6 @@ struct notifier_block;
|
|||
int register_acpi_notifier(struct notifier_block *);
|
||||
int unregister_acpi_notifier(struct notifier_block *);
|
||||
|
||||
int acpi_target_system_state(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue