diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-02-02 17:27:37 +1100 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-02-02 17:27:37 +1100 |
commit | 197b5dfd4e4379a588ef5e872f9777f7d486e606 (patch) | |
tree | ee9784b8b5e67f1b9e9108c9d107d2a5fcdbf438 /sys/dev/pci/drm/drm_drv.c | |
parent | cb1dd6b3a69557e83ad41d584cc8a040f0477520 (diff) |
make the feature macros take drm_device instead of inteldrm_softc
Diffstat (limited to 'sys/dev/pci/drm/drm_drv.c')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 8ee42801749..165847485a7 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -99,6 +99,7 @@ drm_attach_pci(const struct drm_driver_info *driver, struct pci_attach_args *pa, int is_agp, struct device *dev) { struct drm_attach_args arg; + pcireg_t subsys; arg.driver = driver; arg.dmat = pa->pa_dmat; @@ -106,6 +107,13 @@ drm_attach_pci(const struct drm_driver_info *driver, struct pci_attach_args *pa, arg.irq = pa->pa_intrline; arg.is_agp = is_agp; + arg.pci_vendor = PCI_VENDOR(pa->pa_id); + arg.pci_device = PCI_PRODUCT(pa->pa_id); + + subsys = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); + arg.pci_subvendor = PCI_VENDOR(subsys); + arg.pci_subdevice = PCI_PRODUCT(subsys); + arg.busid_len = 20; arg.busid = malloc(arg.busid_len + 1, M_DRM, M_NOWAIT); if (arg.busid == NULL) { |