diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-05 23:00:47 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-05 23:00:47 +0000 |
commit | 8a6a6ad97affce852c3026979d550225e62e9856 (patch) | |
tree | 138f750af22b06359206c737496f5541a1e5ab33 /sys/dev | |
parent | ce91cfbb9706721d5b4e28feed13d08ae46bc305 (diff) |
Do a similar thing to inteldrm re removing the old vblank crtc
inferfaces. Shrinks the code.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/radeon_cp.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_drv.h | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_irq.c | 19 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon_state.c | 4 |
4 files changed, 2 insertions, 31 deletions
diff --git a/sys/dev/pci/drm/radeon_cp.c b/sys/dev/pci/drm/radeon_cp.c index 36b5d616e45..3ca5d12d523 100644 --- a/sys/dev/pci/drm/radeon_cp.c +++ b/sys/dev/pci/drm/radeon_cp.c @@ -949,10 +949,6 @@ radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init) return EINVAL; } - /* Enable vblank on CRTC1 for older X servers - */ - dev_priv->vblank_crtc = DRM_RADEON_VBLANK_CRTC1; - dev_priv->cp_mode = init->cp_mode; /* We don't support anything other than bus-mastering ring mode, diff --git a/sys/dev/pci/drm/radeon_drv.h b/sys/dev/pci/drm/radeon_drv.h index 9c42548a3d3..b124c410bfa 100644 --- a/sys/dev/pci/drm/radeon_drv.h +++ b/sys/dev/pci/drm/radeon_drv.h @@ -275,7 +275,6 @@ typedef struct drm_radeon_private { /* SW interrupt */ atomic_t swi_emitted; - int vblank_crtc; uint32_t irq_enable_reg; uint32_t r500_disp_irq_reg; @@ -288,9 +287,6 @@ typedef struct drm_radeon_private { u32 scratch_ages[5]; - unsigned int crtc_last_cnt; - unsigned int crtc2_last_cnt; - /* starting from here on, data is preserved accross an open */ uint32_t flags; /* see radeon_chip_flags */ unsigned long fb_aper_offset; @@ -375,8 +371,6 @@ extern void radeon_disable_vblank(struct drm_device *dev, int crtc); extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS); extern int radeon_driver_irq_install(struct drm_device * dev); extern void radeon_driver_irq_uninstall(struct drm_device * dev); -extern int radeon_vblank_crtc_get(struct drm_device *dev); -extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value); extern int radeon_driver_firstopen(struct drm_device *dev); extern void radeon_driver_close(struct drm_device * dev, diff --git a/sys/dev/pci/drm/radeon_irq.c b/sys/dev/pci/drm/radeon_irq.c index 2005ba9cadc..dbfd1e6df95 100644 --- a/sys/dev/pci/drm/radeon_irq.c +++ b/sys/dev/pci/drm/radeon_irq.c @@ -372,22 +372,3 @@ radeon_driver_irq_uninstall(struct drm_device * dev) pci_intr_disestablish(dev_priv->pc, dev_priv->irqh); } - - -int radeon_vblank_crtc_get(struct drm_device *dev) -{ - drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; - - return dev_priv->vblank_crtc; -} - -int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value) -{ - drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; - if (value & ~(DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) { - DRM_ERROR("called with invalid crtc 0x%x\n", (unsigned int)value); - return EINVAL; - } - dev_priv->vblank_crtc = (unsigned int)value; - return 0; -} diff --git a/sys/dev/pci/drm/radeon_state.c b/sys/dev/pci/drm/radeon_state.c index 9b3678cc920..d3f4bcc9f28 100644 --- a/sys/dev/pci/drm/radeon_state.c +++ b/sys/dev/pci/drm/radeon_state.c @@ -2410,7 +2410,7 @@ radeon_cp_getparam(struct drm_device *dev, void *data, value = RADEON_CARD_PCI; break; case RADEON_PARAM_VBLANK_CRTC: - value = radeon_vblank_crtc_get(dev); + value = DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2; break; case RADEON_PARAM_FB_LOCATION: value = radeon_read_fb_location(dev_priv); @@ -2480,7 +2480,7 @@ radeon_cp_setparam(struct drm_device *dev, void *data, dev_priv->gart_info.table_size = RADEON_PCIGART_TABLE_SIZE; break; case RADEON_SETPARAM_VBLANK_CRTC: - return radeon_vblank_crtc_set(dev, sp->value); + return (0); break; default: DRM_DEBUG("Invalid parameter %d\n", sp->param); |