-/* $OpenBSD: drm_drv.c,v 1.156 2018/01/30 08:17:31 jsg Exp $ */
+/* $OpenBSD: drm_drv.c,v 1.157 2018/01/31 05:04:41 jsg Exp $ */
/*-
* Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org>
* Copyright © 2008 Intel Corporation
dev->pdev->bus = &dev->pdev->_bus;
dev->pdev->bus->pc = da->pc;
dev->pdev->bus->number = bus;
+ dev->pdev->bus->bridgetag = da->bridgetag;
dev->pdev->devfn = PCI_DEVFN(slot, func);
dev->pc = da->pc;
-/* $OpenBSD: drm_linux.h,v 1.81 2018/01/31 03:26:00 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.82 2018/01/31 05:04:41 jsg Exp $ */
/*
* Copyright (c) 2013, 2014, 2015 Mark Kettenis
* Copyright (c) 2017 Martin Pieuchot
struct pci_bus {
pci_chipset_tag_t pc;
unsigned char number;
+ pcitag_t *bridgetag;
};
struct pci_dev {
return pos;
}
+static inline bool
+pci_is_root_bus(struct pci_bus *pbus)
+{
+ return (pbus->bridgetag == NULL);
+}
+
static inline int
pcie_capability_read_dword(struct pci_dev *pdev, int off, u32 *val)
{