summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/cirrus/cirrus_ttm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 15:40:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 15:40:29 -0700
commit3ded7acfddb3d8dad4a1490a3a75e9d8bc975c35 (patch)
treec2970512b06e8a32f5dc671b7fa46186d8ec2a56 /drivers/gpu/drm/cirrus/cirrus_ttm.c
parent37b22400f86e83076c8e540b65e8b7e3f1f63e6b (diff)
parent47819ba234d41465b76f179ba674ff549255a5d2 (diff)
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A bunch of fixes: - vmware memory corruption - ttm spinlock balance - cirrus/mgag200 work in the presence of efifb and finally Alex and Jerome managed to track down a magic set of bits that on certain rv740 and evergreen cards allow the correct use of the complete set of render backends, this makes the cards operate correctly in a number of scenarios we had issues in before, it also manages to boost speed on benchmarks my large amounts on these specific gpus." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/edid: Make the header fixup threshold tunable drm/radeon: fix regression in UMS CS ioctl drm/vmwgfx: Fix nasty write past alloced memory area drm/ttm: Fix spinlock imbalance drm/radeon: fixup tiling group size and backendmap on r6xx-r9xx (v4) drm/radeon: fix HD6790, HD6570 backend programming drm/radeon: properly program gart on rv740, juniper, cypress, barts, hemlock drm/radeon: fix bank information in tiling config drm/mgag200: kick off conflicting framebuffers earlier. drm/cirrus: kick out conflicting framebuffers earlier cirrus: avoid crash if driver fails to load
Diffstat (limited to 'drivers/gpu/drm/cirrus/cirrus_ttm.c')
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_ttm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c
index 2ebcd11a5023..50e170f879de 100644
--- a/drivers/gpu/drm/cirrus/cirrus_ttm.c
+++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c
@@ -275,12 +275,17 @@ int cirrus_mm_init(struct cirrus_device *cirrus)
pci_resource_len(dev->pdev, 0),
DRM_MTRR_WC);
+ cirrus->mm_inited = true;
return 0;
}
void cirrus_mm_fini(struct cirrus_device *cirrus)
{
struct drm_device *dev = cirrus->dev;
+
+ if (!cirrus->mm_inited)
+ return;
+
ttm_bo_device_release(&cirrus->ttm.bdev);
cirrus_ttm_global_release(cirrus);