drm: As a workaround don't tear down sg with a modesetting driver.

- This allows me to maintain a useful prototype driver.
main
Maarten Maathuis 2008-07-20 00:09:06 +02:00
parent 0ef097b598
commit e2ffee839e
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}