diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_instmem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_instmem.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index a6f8aa651fc6..4f95a1e5822e 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c | |||
@@ -404,23 +404,25 @@ void | |||
404 | nv50_instmem_flush(struct drm_device *dev) | 404 | nv50_instmem_flush(struct drm_device *dev) |
405 | { | 405 | { |
406 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 406 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
407 | unsigned long flags; | ||
407 | 408 | ||
408 | spin_lock(&dev_priv->ramin_lock); | 409 | spin_lock_irqsave(&dev_priv->vm_lock, flags); |
409 | nv_wr32(dev, 0x00330c, 0x00000001); | 410 | nv_wr32(dev, 0x00330c, 0x00000001); |
410 | if (!nv_wait(dev, 0x00330c, 0x00000002, 0x00000000)) | 411 | if (!nv_wait(dev, 0x00330c, 0x00000002, 0x00000000)) |
411 | NV_ERROR(dev, "PRAMIN flush timeout\n"); | 412 | NV_ERROR(dev, "PRAMIN flush timeout\n"); |
412 | spin_unlock(&dev_priv->ramin_lock); | 413 | spin_unlock_irqrestore(&dev_priv->vm_lock, flags); |
413 | } | 414 | } |
414 | 415 | ||
415 | void | 416 | void |
416 | nv84_instmem_flush(struct drm_device *dev) | 417 | nv84_instmem_flush(struct drm_device *dev) |
417 | { | 418 | { |
418 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 419 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
420 | unsigned long flags; | ||
419 | 421 | ||
420 | spin_lock(&dev_priv->ramin_lock); | 422 | spin_lock_irqsave(&dev_priv->vm_lock, flags); |
421 | nv_wr32(dev, 0x070000, 0x00000001); | 423 | nv_wr32(dev, 0x070000, 0x00000001); |
422 | if (!nv_wait(dev, 0x070000, 0x00000002, 0x00000000)) | 424 | if (!nv_wait(dev, 0x070000, 0x00000002, 0x00000000)) |
423 | NV_ERROR(dev, "PRAMIN flush timeout\n"); | 425 | NV_ERROR(dev, "PRAMIN flush timeout\n"); |
424 | spin_unlock(&dev_priv->ramin_lock); | 426 | spin_unlock_irqrestore(&dev_priv->vm_lock, flags); |
425 | } | 427 | } |
426 | 428 | ||