Commit fae7043c authored by Dave Airlie's avatar Dave Airlie

drm/radeon: don't actually enable the IRQ regs until irq is enabled

vblank can try and enable the IRQ registers before we've set the interrupt
handler up.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 218d11a8
...@@ -299,7 +299,6 @@ typedef struct drm_radeon_private { ...@@ -299,7 +299,6 @@ typedef struct drm_radeon_private {
atomic_t swi_emitted; atomic_t swi_emitted;
int vblank_crtc; int vblank_crtc;
uint32_t irq_enable_reg; uint32_t irq_enable_reg;
int irq_enabled;
uint32_t r500_disp_irq_reg; uint32_t r500_disp_irq_reg;
struct radeon_surface surfaces[RADEON_MAX_SURFACES]; struct radeon_surface surfaces[RADEON_MAX_SURFACES];
......
...@@ -44,7 +44,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state) ...@@ -44,7 +44,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
else else
dev_priv->irq_enable_reg &= ~mask; 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) static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
...@@ -56,7 +57,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) ...@@ -56,7 +57,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
else else
dev_priv->r500_disp_irq_reg &= ~mask; 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) int radeon_enable_vblank(struct drm_device *dev, int crtc)
...@@ -355,8 +357,6 @@ void radeon_driver_irq_uninstall(struct drm_device * dev) ...@@ -355,8 +357,6 @@ void radeon_driver_irq_uninstall(struct drm_device * dev)
if (!dev_priv) if (!dev_priv)
return; return;
dev_priv->irq_enabled = 0;
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690) if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690)
RADEON_WRITE(R500_DxMODE_INT_MASK, 0); RADEON_WRITE(R500_DxMODE_INT_MASK, 0);
/* Disable *all* interrupts */ /* Disable *all* interrupts */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment