Commit 21283f05 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Disable the GM965 MSI errata workaround.
  drm/i915: Don't return error in evict_everything when we get to the end.
  drm/radeon: don't actually enable the IRQ regs until irq is enabled
parents cdf0c7de b60678a7
...@@ -847,9 +847,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -847,9 +847,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
* and the registers being closely associated. * and the registers being closely associated.
* *
* According to chipset errata, on the 965GM, MSI interrupts may * According to chipset errata, on the 965GM, MSI interrupts may
* be lost or delayed * be lost or delayed, but we use them anyways to avoid
* stuck interrupts on some machines.
*/ */
if (!IS_I945G(dev) && !IS_I945GM(dev) && !IS_I965GM(dev)) if (!IS_I945G(dev) && !IS_I945GM(dev))
pci_enable_msi(dev->pdev); pci_enable_msi(dev->pdev);
intel_opregion_init(dev); intel_opregion_init(dev);
......
...@@ -1104,6 +1104,8 @@ i915_gem_evict_everything(struct drm_device *dev) ...@@ -1104,6 +1104,8 @@ i915_gem_evict_everything(struct drm_device *dev)
if (ret != 0) if (ret != 0)
break; break;
} }
if (ret == -ENOMEM)
return 0;
return ret; return ret;
} }
......
...@@ -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,6 +44,7 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state) ...@@ -44,6 +44,7 @@ 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;
if (!dev->irq_enabled)
RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
} }
...@@ -56,6 +57,7 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) ...@@ -56,6 +57,7 @@ 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;
if (!dev->irq_enabled)
RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
} }
...@@ -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