From 0b6c99683c70a7c29a2eefb23956bd7884bd09a5 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Mon, 28 Sep 2009 22:37:07 +0000 Subject: [PATCH] R600 doesn't support IRQs yet, so don't try to use them. MFC after: 1 week --- sys/dev/drm/radeon_irq.c | 15 +++++++++++++++ sys/dev/drm/radeon_state.c | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/dev/drm/radeon_irq.c b/sys/dev/drm/radeon_irq.c index 7f6057396798..20b1e6de444c 100644 --- a/sys/dev/drm/radeon_irq.c +++ b/sys/dev/drm/radeon_irq.c @@ -194,6 +194,9 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS) u32 r500_disp_int; u32 tmp; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + return IRQ_NONE; + /* Only consider the bits we're interested in - others could be used * outside the DRM */ @@ -323,6 +326,9 @@ int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *file_pr drm_radeon_irq_emit_t *emit = data; int result; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + return -EINVAL; + LOCK_TEST_WITH_RETURN(dev, file_priv); if (!dev_priv) { @@ -363,6 +369,9 @@ void radeon_driver_irq_preinstall(struct drm_device * dev) (drm_radeon_private_t *) dev->dev_private; u32 dummy; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + return; + /* Disable *all* interrupts */ if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) RADEON_WRITE(R500_DxMODE_INT_MASK, 0); @@ -380,6 +389,9 @@ int radeon_driver_irq_postinstall(struct drm_device * dev) atomic_set(&dev_priv->swi_emitted, 0); DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + return 0; + radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); return 0; @@ -394,6 +406,9 @@ void radeon_driver_irq_uninstall(struct drm_device * dev) dev_priv->irq_enabled = 0; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + return; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) RADEON_WRITE(R500_DxMODE_INT_MASK, 0); /* Disable *all* interrupts */ diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c index e032b8f811ed..fd8388ffa599 100644 --- a/sys/dev/drm/radeon_state.c +++ b/sys/dev/drm/radeon_state.c @@ -3024,7 +3024,10 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil value = GET_SCRATCH(dev_priv, 2); break; case RADEON_PARAM_IRQ_NR: - value = dev->irq; + if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) + value = 0; + else + value = dev->irq; break; case RADEON_PARAM_GART_BASE: value = dev_priv->gart_vm_start;