diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 6e2b1a6caa2d..915fbce89595 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -608,6 +608,7 @@ nouveau_card_init(struct drm_device *dev) | |||
608 | spin_lock_init(&dev_priv->channels.lock); | 608 | spin_lock_init(&dev_priv->channels.lock); |
609 | spin_lock_init(&dev_priv->tile.lock); | 609 | spin_lock_init(&dev_priv->tile.lock); |
610 | spin_lock_init(&dev_priv->context_switch_lock); | 610 | spin_lock_init(&dev_priv->context_switch_lock); |
611 | spin_lock_init(&dev_priv->vm_lock); | ||
611 | 612 | ||
612 | /* Make the CRTCs and I2C buses accessible */ | 613 | /* Make the CRTCs and I2C buses accessible */ |
613 | ret = engine->display.early_init(dev); | 614 | ret = engine->display.early_init(dev); |
@@ -767,6 +768,11 @@ static void nouveau_card_takedown(struct drm_device *dev) | |||
767 | engine->mc.takedown(dev); | 768 | engine->mc.takedown(dev); |
768 | engine->display.late_takedown(dev); | 769 | engine->display.late_takedown(dev); |
769 | 770 | ||
771 | if (dev_priv->vga_ram) { | ||
772 | nouveau_bo_unpin(dev_priv->vga_ram); | ||
773 | nouveau_bo_ref(NULL, &dev_priv->vga_ram); | ||
774 | } | ||
775 | |||
770 | mutex_lock(&dev->struct_mutex); | 776 | mutex_lock(&dev->struct_mutex); |
771 | ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); | 777 | ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); |
772 | ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); | 778 | ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); |