diff options
author | rnoland <rnoland@FreeBSD.org> | 2008-12-23 22:53:57 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2008-12-23 22:53:57 +0000 |
commit | 8672278c6ffe3242a8e4b2eca70c43d6f0ed06c3 (patch) | |
tree | e5eebfc4462660745d41921e9060b6f5fd1e19b5 /sys/dev/drm/radeon_irq.c | |
parent | 29da7fd3fd3902a252c6b7fed6275ff7a01eeb78 (diff) | |
download | FreeBSD-src-8672278c6ffe3242a8e4b2eca70c43d6f0ed06c3.zip FreeBSD-src-8672278c6ffe3242a8e4b2eca70c43d6f0ed06c3.tar.gz |
Only set registers if irqs are enabled
Approved by: kib
Obtained from: drm git
Diffstat (limited to 'sys/dev/drm/radeon_irq.c')
-rw-r--r-- | sys/dev/drm/radeon_irq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/drm/radeon_irq.c b/sys/dev/drm/radeon_irq.c index ac3b195..f0ce4bd 100644 --- a/sys/dev/drm/radeon_irq.c +++ b/sys/dev/drm/radeon_irq.c @@ -47,7 +47,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state) else dev_priv->irq_enable_reg &= ~mask; - RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); + if (dev->irq_enabled) + RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); } static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) @@ -59,7 +60,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) else dev_priv->r500_disp_irq_reg &= ~mask; - RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); + if (dev->irq_enabled) + RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } int radeon_enable_vblank(struct drm_device *dev, int crtc) |