diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-04-06 13:28:35 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-04-20 08:50:14 +1000 |
commit | 04eb34a43ce5168e05e2748bd46a62a09289cdde (patch) | |
tree | 4a5bfe56c631889075416d18b6b513d1eaeb37ed /drivers/gpu/drm/nouveau/nv50_vm.c | |
parent | 12dfc843f43efe14d0cfc7a52753d971a0cc759d (diff) |
drm/nouveau: split ramin_lock into two locks, one hardirq safe
Fixes a possible lock ordering reversal between context_switch_lock
and ramin_lock.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_vm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_vm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_vm.c b/drivers/gpu/drm/nouveau/nv50_vm.c index 4fd3432b5b8..6c269449074 100644 --- a/drivers/gpu/drm/nouveau/nv50_vm.c +++ b/drivers/gpu/drm/nouveau/nv50_vm.c @@ -174,10 +174,11 @@ void nv50_vm_flush_engine(struct drm_device *dev, int engine) { struct drm_nouveau_private *dev_priv = dev->dev_private; + unsigned long flags; - spin_lock(&dev_priv->ramin_lock); + spin_lock_irqsave(&dev_priv->vm_lock, flags); nv_wr32(dev, 0x100c80, (engine << 16) | 1); if (!nv_wait(dev, 0x100c80, 0x00000001, 0x00000000)) NV_ERROR(dev, "vm flush timeout: engine %d\n", engine); - spin_unlock(&dev_priv->ramin_lock); + spin_unlock_irqrestore(&dev_priv->vm_lock, flags); } |