diff options
author | Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> | 2007-06-15 17:06:46 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> | 2007-06-15 17:06:46 -0700 |
commit | 741d1c80314de6f30bcc7eca7a7720b0aac3c56c (patch) | |
tree | 8cee940b13dcc4c5d8137ab0fe83fc1bd71d2c43 | |
parent | b6610363e373c13a2e7fdee8691756e1768bdd57 (diff) |
Remove broken crtc enable checks, radeon does it slightly differently
(this makes get_vblank_counter return an actual value).
-rw-r--r-- | shared-core/radeon_irq.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c index 46ec035d..d1f0e313 100644 --- a/shared-core/radeon_irq.c +++ b/shared-core/radeon_irq.c @@ -51,9 +51,6 @@ int radeon_enable_vblank(drm_device_t *dev, int crtc) { drm_radeon_private_t *dev_priv = dev->dev_private; - if (!(dev_priv->vblank_crtc & (1 << crtc))) - return -EINVAL; - switch (crtc) { case 0: radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 1); @@ -64,7 +61,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); - break; + return -EINVAL; } return 0; @@ -74,9 +71,6 @@ void radeon_disable_vblank(drm_device_t *dev, int crtc) { drm_radeon_private_t *dev_priv = dev->dev_private; - if (!(dev_priv->vblank_crtc & (1 << crtc))) - return; - switch (crtc) { case 0: radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 0); @@ -185,9 +179,9 @@ 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; - if (crtc == DRM_RADEON_VBLANK_CRTC1) + if (crtc == 0) crtc_cnt_reg = RADEON_CRTC_CRNT_FRAME; - else if (crtc == DRM_RADEON_VBLANK_CRTC2) + else if (crtc == 1) crtc_cnt_reg = RADEON_CRTC2_CRNT_FRAME; else return 0; |