summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-08-27 03:06:04 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-08-27 03:06:04 +0000
commit2d5f4a32de6c16a05825dbbac9af884942af82b7 (patch)
tree0d2e209b35ddae824d42e09f436a09ca5e34a537 /sys
parent31985480c260e4ffa01eb965927e7666041ccf45 (diff)
stash pci chipset and bridge tags in the drm_device struct
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drmP.h7
-rw-r--r--sys/dev/pci/drm/drm_drv.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index a134406e8d1..b7e48e3c48e 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drmP.h,v 1.145 2013/08/26 05:15:20 jsg Exp $ */
+/* $OpenBSD: drmP.h,v 1.146 2013/08/27 03:06:02 jsg Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*/
@@ -692,6 +692,9 @@ struct drm_device {
u_int16_t pci_subdevice;
u_int16_t pci_subvendor;
+ pci_chipset_tag_t pc;
+ pcitag_t *bridgetag;
+
bus_dma_tag_t dmat;
bus_space_tag_t bst;
@@ -779,6 +782,8 @@ struct drm_attach_args {
u_int16_t pci_device;
u_int16_t pci_subvendor;
u_int16_t pci_subdevice;
+ pci_chipset_tag_t pc;
+ pcitag_t *bridgetag;
};
extern int drm_debug_flag;
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index f7446a0a5bc..92d95dd2f57 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_drv.c,v 1.111 2013/08/26 05:15:20 jsg Exp $ */
+/* $OpenBSD: drm_drv.c,v 1.112 2013/08/27 03:06:03 jsg Exp $ */
/*-
* Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org>
* Copyright © 2008 Intel Corporation
@@ -118,6 +118,9 @@ drm_attach_pci(struct drm_driver_info *driver, struct pci_attach_args *pa,
arg.pci_subvendor = PCI_VENDOR(subsys);
arg.pci_subdevice = PCI_PRODUCT(subsys);
+ arg.pc = pa->pa_pc;
+ arg.bridgetag = pa->pa_bridgetag;
+
arg.busid_len = 20;
arg.busid = malloc(arg.busid_len + 1, M_DRM, M_NOWAIT);
if (arg.busid == NULL) {
@@ -190,6 +193,9 @@ drm_attach(struct device *parent, struct device *self, void *aux)
dev->pci_subvendor = da->pci_subvendor;
dev->pci_subdevice = da->pci_subdevice;
+ dev->pc = da->pc;
+ dev->bridgetag = da->bridgetag;
+
rw_init(&dev->dev_lock, "drmdevlk");
mtx_init(&dev->lock.spinlock, IPL_NONE);
mtx_init(&dev->event_lock, IPL_TTY);