diff options
-rw-r--r-- | shared-core/i915_irq.c | 8 | ||||
-rw-r--r-- | shared-core/radeon_drv.h | 3 | ||||
-rw-r--r-- | shared-core/radeon_irq.c | 14 |
3 files changed, 6 insertions, 19 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 00400fa2..713ec654 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -482,9 +482,6 @@ int i915_enable_vblank(drm_device_t *dev, int crtc) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - if (!(dev_priv->vblank_pipe & (1 << crtc))) - return -EINVAL; - switch (crtc) { case 0: dev_priv->irq_enable_reg |= VSYNC_PIPEA_FLAG; @@ -507,9 +504,6 @@ void i915_disable_vblank(drm_device_t *dev, int crtc) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - if (!(dev_priv->vblank_pipe & (1 << crtc))) - return; - switch (crtc) { case 0: dev_priv->irq_enable_reg &= ~VSYNC_PIPEA_FLAG; @@ -560,8 +554,6 @@ int i915_vblank_pipe_set(DRM_IOCTL_ARGS) dev_priv->vblank_pipe = pipe.pipe; - i915_enable_interrupt (dev); - return 0; } diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index 5f671df6..bb69c106 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -512,9 +512,6 @@ extern int r300_do_cp_cmdbuf(drm_device_t *dev, DRMFILE filp, #define RADEON_CRTC_CRNT_FRAME 0x0214 #define RADEON_CRTC2_CRNT_FRAME 0x0314 -#define RADEON_CRTC_CRNT_FRAME 0x0214 -#define RADEON_CRTC2_CRNT_FRAME 0x0314 - #define RADEON_GEN_INT_CNTL 0x0040 # define RADEON_CRTC_VBLANK_MASK (1 << 0) # define RADEON_CRTC2_VBLANK_MASK (1 << 9) diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c index 4409026c..a1b79718 100644 --- a/shared-core/radeon_irq.c +++ b/shared-core/radeon_irq.c @@ -59,7 +59,7 @@ int radeon_enable_vblank(drm_device_t *dev, int crtc) default: DRM_ERROR("tried to enable vblank on non-existent crtc %d\n", crtc); - return -EINVAL; + return DRM_ERR(EINVAL); } return 0; @@ -174,7 +174,7 @@ static int radeon_wait_irq(drm_device_t * dev, int swi_nr) u32 radeon_get_vblank_counter(drm_device_t *dev, int crtc) { drm_radeon_private_t *dev_priv = dev->dev_private; - u32 crtc_cnt_reg, current_cnt; + u32 crtc_cnt_reg; if (crtc == 0) crtc_cnt_reg = RADEON_CRTC_CRNT_FRAME; @@ -183,9 +183,7 @@ u32 radeon_get_vblank_counter(drm_device_t *dev, int crtc) else return 0; - current_cnt = RADEON_READ(crtc_cnt_reg); - - return current_cnt; + return RADEON_READ(crtc_cnt_reg); } /* Needs the lock as it touches the ring. @@ -258,16 +256,16 @@ int radeon_driver_irq_postinstall(drm_device_t * dev) { drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; - int num_pipes = 2, ret; + int ret; atomic_set(&dev_priv->swi_emitted, 0); DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); - ret = drm_vblank_init(dev, num_pipes); + ret = drm_vblank_init(dev, 2); if (ret) return ret; - dev->max_vblank_count = 0xffffffff; + dev->max_vblank_count = 0x001fffff; radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); |