summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-07-20 00:09:06 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-07-20 00:09:06 +0200
commite2ffee839ed7ae6c55a0a8c6bb8ee872ae8a2a70 (patch)
tree0d5393f7e5b3a8e1efee9e3a44fc43694dae5244
parent0ef097b598433a5756df2bd6a72deba1f0e1d1c7 (diff)
drm: As a workaround don't tear down sg with a modesetting driver.
- This allows me to maintain a useful prototype driver.
-rw-r--r--linux-core/drm_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index deb8eb9c..4e7c531a 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -242,7 +242,10 @@ int drm_lastclose(struct drm_device * dev)
dev->agp->acquired = 0;
dev->agp->enabled = 0;
}
- if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg) {
+
+ /* You're supposed to have a real memory manager for modesetting, but this'll suffice as a temporary workaround. */
+ /* This assumes sgdma is inited at load time. */
+ if (drm_core_check_feature(dev, DRIVER_SG) && !drm_core_check_feature(dev, DRIVER_MODESET) && dev->sg) {
drm_sg_cleanup(dev->sg);
dev->sg = NULL;
}