aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 9c7bc3f396c4..ce3cb5eb33d0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -154,8 +154,6 @@ nouveau_mem_vram_fini(struct drm_device *dev)
154{ 154{
155 struct drm_nouveau_private *dev_priv = dev->dev_private; 155 struct drm_nouveau_private *dev_priv = dev->dev_private;
156 156
157 nouveau_bo_ref(NULL, &dev_priv->vga_ram);
158
159 ttm_bo_device_release(&dev_priv->ttm.bdev); 157 ttm_bo_device_release(&dev_priv->ttm.bdev);
160 158
161 nouveau_ttm_global_release(dev_priv); 159 nouveau_ttm_global_release(dev_priv);
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index f316157217b5..8771677d6c5e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -738,6 +738,11 @@ static void nouveau_card_takedown(struct drm_device *dev)
738 engine->mc.takedown(dev); 738 engine->mc.takedown(dev);
739 engine->display.late_takedown(dev); 739 engine->display.late_takedown(dev);
740 740
741 if (dev_priv->vga_ram) {
742 nouveau_bo_unpin(dev_priv->vga_ram);
743 nouveau_bo_ref(NULL, &dev_priv->vga_ram);
744 }
745
741 mutex_lock(&dev->struct_mutex); 746 mutex_lock(&dev->struct_mutex);
742 ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); 747 ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM);
743 ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); 748 ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT);