summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-25 14:15:31 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-25 14:15:31 +0100
commit52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch)
tree6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /drivers/gpu/drm/radeon/radeon_ttm.c
parent41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff)
parent8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff)
downloadblackbird-op-linux-52e04ea89da57274f0313d2bd73ba02f686cfdeb.tar.gz
blackbird-op-linux-52e04ea89da57274f0313d2bd73ba02f686cfdeb.zip
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index d7fd160cc671..3b0c07b444a2 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -494,6 +494,7 @@ int radeon_ttm_init(struct radeon_device *rdev)
DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
return r;
}
+ rdev->mman.initialized = true;
r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM,
rdev->mc.real_vram_size >> PAGE_SHIFT);
if (r) {
@@ -541,6 +542,8 @@ void radeon_ttm_fini(struct radeon_device *rdev)
{
int r;
+ if (!rdev->mman.initialized)
+ return;
if (rdev->stollen_vga_memory) {
r = radeon_bo_reserve(rdev->stollen_vga_memory, false);
if (r == 0) {
@@ -554,6 +557,7 @@ void radeon_ttm_fini(struct radeon_device *rdev)
ttm_bo_device_release(&rdev->mman.bdev);
radeon_gart_fini(rdev);
radeon_ttm_global_fini(rdev);
+ rdev->mman.initialized = false;
DRM_INFO("radeon: ttm finalized\n");
}
OpenPOWER on IntegriCloud