diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-23 21:35:02 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-11-23 21:35:02 +0000 |
commit | ebcc0685bc5a51f710b5063c90f783646d4dbb53 (patch) | |
tree | 4bcfaa5f472f81112a5ee846adf18228e990ea42 /sys/dev/pci/drm/radeon_drv.c | |
parent | 17ac785bb3a684774ebdad9381363f2883fec44a (diff) |
Map device interrupts in the attach routine. and remove more need for
dev->pa by doing the pci_intr_establish/disestablish dance in the driver
function, not in drm. This removes the need for
interrupt_{pre,post}install callbacks, instead just provide a
interrupt_install() callback.
Diffstat (limited to 'sys/dev/pci/drm/radeon_drv.c')
-rw-r--r-- | sys/dev/pci/drm/radeon_drv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon_drv.c b/sys/dev/pci/drm/radeon_drv.c index 337101a30a4..22fdf1cf55e 100644 --- a/sys/dev/pci/drm/radeon_drv.c +++ b/sys/dev/pci/drm/radeon_drv.c @@ -488,8 +488,7 @@ static const struct drm_driver_info radeondrm_driver = { .get_vblank_counter = radeon_get_vblank_counter, .enable_vblank = radeon_enable_vblank, .disable_vblank = radeon_disable_vblank, - .irq_preinstall = radeon_driver_irq_preinstall, - .irq_postinstall = radeon_driver_irq_postinstall, + .irq_install = radeon_driver_irq_install, .irq_uninstall = radeon_driver_irq_uninstall, .irq_handler = radeon_driver_irq_handler, .dma_ioctl = radeon_cp_buffers, @@ -522,6 +521,7 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux) id_entry = drm_find_description(PCI_VENDOR(pa->pa_id), PCI_PRODUCT(pa->pa_id), radeondrm_pciidlist); dev_priv->flags = id_entry->driver_private; + dev_priv->pc = pa->pa_pc; bar = vga_pci_bar_info((struct vga_pci_softc *)parent, 0); if (bar == NULL) { @@ -544,6 +544,11 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux) return; } + if (pci_intr_map(pa, &dev_priv->ih) != 0) { + printf(": couldn't map interrupt\n"); + return; + } + switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_R100: case CHIP_RV200: |