aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-07-26 08:38:59 +1000
committerDave Airlie <airlied@linux.ie>2008-07-26 08:38:59 +1000
commitfb05c4d621084d7a3fb3dd52d7d9c888eac852d0 (patch)
treebca43a3c777984e0eb962d55817541801377d3c4 /linux-core/drm_drv.c
parent2556341f8baf0e0b7b5f7843135e43e662751af0 (diff)
parent53428453758621da70d9608c9baec58b4b9383ec (diff)
Merge remote branch 'origin/modesetting-101' into modesetting-gem
Diffstat (limited to 'linux-core/drm_drv.c')
-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 24a6df2f..9113fa54 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -246,7 +246,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;
}