sync with OpenBSD -current

This commit is contained in:
purplerain 2024-10-18 17:00:07 +00:00
parent c0a325cf3c
commit 5f899da0da
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
67 changed files with 1194 additions and 789 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: bcm2835_dmac.c,v 1.4 2022/08/10 20:19:22 mglocker Exp $ */
/* $OpenBSD: bcm2835_dmac.c,v 1.5 2024/10/17 05:10:53 jsg Exp $ */
/*
* Copyright (c) 2020 Tobias Heider <tobhe@openbsd.org>
@ -56,7 +56,7 @@
#include <dev/ofw/fdt.h>
#include <dev/ofw/openfirm.h>
#include "dev/ic/bcm2835_dmac.h"
#include <dev/ic/bcm2835_dmac.h>
#define BCMDMAC_CHANNELMASK ((1 << 12) - 1)
#define DEVNAME(sc) ((sc)->sc_dev.dv_xname)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: qciic_fdt.c,v 1.1 2022/11/06 15:36:13 patrick Exp $ */
/* $OpenBSD: qciic_fdt.c,v 1.2 2024/10/17 17:58:58 kettenis Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
@ -25,6 +25,7 @@
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_gpio.h>
#include <dev/ofw/ofw_pinctrl.h>
#include <dev/ofw/fdt.h>
#define _I2C_PRIVATE
@ -109,6 +110,8 @@ qciic_fdt_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
pinctrl_byname(sc->sc_node, "default");
sc->sc_ic.ic_cookie = sc;
sc->sc_ic.ic_acquire_bus = qciic_fdt_acquire_bus;
sc->sc_ic.ic_release_bus = qciic_fdt_release_bus;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ihidev.c,v 1.32 2024/08/19 09:26:58 kettenis Exp $ */
/* $OpenBSD: ihidev.c,v 1.33 2024/10/18 12:53:49 tobhe Exp $ */
/*
* HID-over-i2c driver
*
@ -67,6 +67,7 @@ int ihidev_activate(struct device *, int);
int ihidev_hid_command(struct ihidev_softc *, int, void *);
int ihidev_intr(void *);
int ihidev_poweron(struct ihidev_softc *);
int ihidev_reset(struct ihidev_softc *);
int ihidev_hid_desc_parse(struct ihidev_softc *);
@ -248,7 +249,7 @@ ihidev_activate(struct device *self, int act)
sc->sc_dev.dv_xname);
break;
case DVACT_WAKEUP:
ihidev_reset(sc);
ihidev_poweron(sc);
sc->sc_dying = 0;
if (sc->sc_poll && timeout_initialized(&sc->sc_timer))
timeout_add(&sc->sc_timer, 2000);
@ -525,7 +526,7 @@ ihidev_hid_command(struct ihidev_softc *sc, int hidcmd, void *arg)
}
int
ihidev_reset(struct ihidev_softc *sc)
ihidev_poweron(struct ihidev_softc *sc)
{
DPRINTF(("%s: resetting\n", sc->sc_dev.dv_xname));
@ -536,6 +537,16 @@ ihidev_reset(struct ihidev_softc *sc)
ihidev_sleep(sc, 100);
return 0;
}
int
ihidev_reset(struct ihidev_softc *sc)
{
if (ihidev_poweron(sc))
return (1);
if (ihidev_hid_command(sc, I2C_HID_CMD_RESET, 0)) {
printf("%s: failed to reset hardware\n", sc->sc_dev.dv_xname);
@ -784,7 +795,7 @@ ihidev_open(struct ihidev *scd)
return (0);
/* power on */
ihidev_reset(sc);
ihidev_poweron(sc);
if (sc->sc_poll) {
if (!timeout_initialized(&sc->sc_timer))

View file

@ -1691,7 +1691,7 @@ bool dc_validate_boot_timing(const struct dc *dc,
if (crtc_timing->pix_clk_100hz != pix_clk_100hz)
return false;
if (!se->funcs->dp_get_pixel_format)
if (!se || !se->funcs->dp_get_pixel_format)
return false;
if (!se->funcs->dp_get_pixel_format(

View file

@ -432,21 +432,18 @@ static enum mod_hdcp_status authenticated_dp(struct mod_hdcp *hdcp,
goto out;
}
if (status == MOD_HDCP_STATUS_SUCCESS)
if (!mod_hdcp_execute_and_set(mod_hdcp_read_bstatus,
&input->bstatus_read, &status,
hdcp, "bstatus_read"))
goto out;
if (status == MOD_HDCP_STATUS_SUCCESS)
if (!mod_hdcp_execute_and_set(check_link_integrity_dp,
&input->link_integrity_check, &status,
hdcp, "link_integrity_check"))
goto out;
if (status == MOD_HDCP_STATUS_SUCCESS)
if (!mod_hdcp_execute_and_set(check_no_reauthentication_request_dp,
&input->reauth_request_check, &status,
hdcp, "reauth_request_check"))
goto out;
mod_hdcp_execute_and_set(mod_hdcp_read_bstatus,
&input->bstatus_read, &status,
hdcp, "bstatus_read");
mod_hdcp_execute_and_set(check_link_integrity_dp,
&input->link_integrity_check, &status,
hdcp, "link_integrity_check");
mod_hdcp_execute_and_set(check_no_reauthentication_request_dp,
&input->reauth_request_check, &status,
hdcp, "reauth_request_check");
out:
return status;
}

View file

@ -904,6 +904,7 @@ out:
connector_set = NULL;
fb = NULL;
mode = NULL;
num_connectors = 0;
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);

View file

@ -1005,7 +1005,8 @@ static void intel_hdcp_update_value(struct intel_connector *connector,
hdcp->value = value;
if (update_property) {
drm_connector_get(&connector->base);
queue_work(i915->unordered_wq, &hdcp->prop_work);
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
drm_connector_put(&connector->base);
}
}
@ -2491,7 +2492,8 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
mutex_lock(&hdcp->mutex);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
drm_connector_get(&connector->base);
queue_work(i915->unordered_wq, &hdcp->prop_work);
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
drm_connector_put(&connector->base);
mutex_unlock(&hdcp->mutex);
}
@ -2508,7 +2510,9 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
*/
if (!desired_and_not_enabled && !content_protection_type_changed) {
drm_connector_get(&connector->base);
queue_work(i915->unordered_wq, &hdcp->prop_work);
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
drm_connector_put(&connector->base);
}
}

View file

@ -1,4 +1,4 @@
$OpenBSD: pcidevs,v 1.2090 2024/09/23 03:59:03 jsg Exp $
$OpenBSD: pcidevs,v 1.2092 2024/10/17 08:22:34 dlg Exp $
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
/*
@ -1105,14 +1105,32 @@ product AMI MEGARAID428 0x9010 MegaRAID Series 428
product AMI MEGARAID434 0x9060 MegaRAID Series 434
/* Ampere Computing */
product AMPERE EMAG_PCIE_1 0xe005 eMAG PCIE
product AMPERE EMAG_PCIE_2 0xe006 eMAG PCIE
product AMPERE EMAG_PCIE_3 0xe007 eMAG PCIE
product AMPERE EMAG_PCIE_4 0xe008 eMAG PCIE
product AMPERE EMAG_PCIE_5 0xe009 eMAG PCIE
product AMPERE EMAG_PCIE_6 0xe00a eMAG PCIE
product AMPERE EMAG_PCIE_7 0xe00b eMAG PCIE
product AMPERE EMAG_PCIE_8 0xe00c eMAG PCIE
product AMPERE EMAG_PCIE_1 0xe005 eMAG PCIe
product AMPERE EMAG_PCIE_2 0xe006 eMAG PCIe
product AMPERE EMAG_PCIE_3 0xe007 eMAG PCIe
product AMPERE EMAG_PCIE_4 0xe008 eMAG PCIe
product AMPERE EMAG_PCIE_5 0xe009 eMAG PCIe
product AMPERE EMAG_PCIE_6 0xe00a eMAG PCIe
product AMPERE EMAG_PCIE_7 0xe00b eMAG PCIe
product AMPERE EMAG_PCIE_8 0xe00c eMAG PCIe
product AMPERE ALTRA_PCIE_A 0xe100 Altra PCIe Root
product AMPERE ALTRA_PCIE_A0 0xe101 Altra PCIe
product AMPERE ALTRA_PCIE_A1 0xe102 Altra PCIe
product AMPERE ALTRA_PCIE_A2 0xe103 Altra PCIe
product AMPERE ALTRA_PCIE_A3 0xe104 Altra PCIe
product AMPERE ALTRA_PCIE_A4 0xe105 Altra PCIe
product AMPERE ALTRA_PCIE_A5 0xe106 Altra PCIe
product AMPERE ALTRA_PCIE_A6 0xe107 Altra PCIe
product AMPERE ALTRA_PCIE_A7 0xe108 Altra PCIe
product AMPERE ALTRA_PCIE_B 0xe110 Altra PCIe Root
product AMPERE ALTRA_PCIE_B0 0xe111 Altra PCIe
product AMPERE ALTRA_PCIE_B1 0xe112 Altra PCIe
product AMPERE ALTRA_PCIE_B2 0xe113 Altra PCIe
product AMPERE ALTRA_PCIE_B3 0xe114 Altra PCIe
product AMPERE ALTRA_PCIE_B4 0xe115 Altra PCIe
product AMPERE ALTRA_PCIE_B5 0xe116 Altra PCIe
product AMPERE ALTRA_PCIE_B6 0xe117 Altra PCIe
product AMPERE ALTRA_PCIE_B7 0xe118 Altra PCIe
/* Antares Microsystems products */
product ANTARES TC9021 0x1021 TC9021
@ -7411,6 +7429,7 @@ product JMICRON XD_2 0x2394 xD
/* Kingston */
product KINGSTON A2000 0x2263 A2000
product KINGSTON KC3000 0x5013 KC3000
product KINGSTON SNV2S 0x5017 SNV2S
product KINGSTON NV2 0x5019 NV2
/* Kioxia */

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: pcidevs,v 1.2090 2024/09/23 03:59:03 jsg Exp
* OpenBSD: pcidevs,v 1.2092 2024/10/17 08:22:34 dlg Exp
*/
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -1110,14 +1110,32 @@
#define PCI_PRODUCT_AMI_MEGARAID434 0x9060 /* MegaRAID Series 434 */
/* Ampere Computing */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_1 0xe005 /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_2 0xe006 /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_3 0xe007 /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_4 0xe008 /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_5 0xe009 /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_6 0xe00a /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_7 0xe00b /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_8 0xe00c /* eMAG PCIE */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_1 0xe005 /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_2 0xe006 /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_3 0xe007 /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_4 0xe008 /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_5 0xe009 /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_6 0xe00a /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_7 0xe00b /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_EMAG_PCIE_8 0xe00c /* eMAG PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A 0xe100 /* Altra PCIe Root */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A0 0xe101 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A1 0xe102 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A2 0xe103 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A3 0xe104 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A4 0xe105 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A5 0xe106 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A6 0xe107 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_A7 0xe108 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B 0xe110 /* Altra PCIe Root */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B0 0xe111 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B1 0xe112 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B2 0xe113 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B3 0xe114 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B4 0xe115 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B5 0xe116 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B6 0xe117 /* Altra PCIe */
#define PCI_PRODUCT_AMPERE_ALTRA_PCIE_B7 0xe118 /* Altra PCIe */
/* Antares Microsystems products */
#define PCI_PRODUCT_ANTARES_TC9021 0x1021 /* TC9021 */
@ -7416,6 +7434,7 @@
/* Kingston */
#define PCI_PRODUCT_KINGSTON_A2000 0x2263 /* A2000 */
#define PCI_PRODUCT_KINGSTON_KC3000 0x5013 /* KC3000 */
#define PCI_PRODUCT_KINGSTON_SNV2S 0x5017 /* SNV2S */
#define PCI_PRODUCT_KINGSTON_NV2 0x5019 /* NV2 */
/* Kioxia */

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* OpenBSD: pcidevs,v 1.2090 2024/09/23 03:59:03 jsg Exp
* OpenBSD: pcidevs,v 1.2092 2024/10/17 08:22:34 dlg Exp
*/
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -2645,35 +2645,107 @@ static const struct pci_known_product pci_known_products[] = {
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_1,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_2,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_3,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_4,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_5,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_6,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_7,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_EMAG_PCIE_8,
"eMAG PCIE",
"eMAG PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A,
"Altra PCIe Root",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A0,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A1,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A2,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A3,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A4,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A5,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A6,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_A7,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B,
"Altra PCIe Root",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B0,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B1,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B2,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B3,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B4,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B5,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B6,
"Altra PCIe",
},
{
PCI_VENDOR_AMPERE, PCI_PRODUCT_AMPERE_ALTRA_PCIE_B7,
"Altra PCIe",
},
{
PCI_VENDOR_ANTARES, PCI_PRODUCT_ANTARES_TC9021,
@ -26919,6 +26991,10 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_KINGSTON, PCI_PRODUCT_KINGSTON_KC3000,
"KC3000",
},
{
PCI_VENDOR_KINGSTON, PCI_PRODUCT_KINGSTON_SNV2S,
"SNV2S",
},
{
PCI_VENDOR_KINGSTON, PCI_PRODUCT_KINGSTON_NV2,
"NV2",

View file

@ -1,3 +1,4 @@
/* $OpenBSD: vga_pci_common.c,v 1.12 2024/10/17 15:52:30 miod Exp $ */
/*
* Copyright (c) 2008 Owain G. Ainsworth <oga@nicotinebsd.org>
*
@ -14,33 +15,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "vga.h"
#if defined(__i386__) || defined(__amd64__)
#include "acpi.h"
#endif
#ifdef RAMDISK_HOOKS
#include <sys/param.h>
#include <sys/systm.h>
#include <machine/bus.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcidevs.h>
#include <dev/ic/mc6845reg.h>
#include <dev/ic/pcdisplayvar.h>
#include <dev/ic/vgareg.h>
#include <dev/wscons/wsdisplayvar.h>
#include <dev/ic/vgavar.h>
#include <dev/pci/vga_pcivar.h>
#include <dev/pci/drm/i915/i915_devlist.h>
#include <dev/pci/drm/radeon/radeon_devlist.h>
#include <dev/pci/drm/amd/amdgpu/amdgpu_devlist.h>
#ifdef RAMDISK_HOOKS
static const struct pci_matchid aperture_blacklist[] = {
/* server adapters found in mga200 drm driver */
{ PCI_VENDOR_MATROX, PCI_PRODUCT_MATROX_G200E_SE },