From 51d6346f9f3c425f49e57d185530c6bcaeb94f5e Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Tue, 31 Mar 2009 13:33:18 -0500 Subject: Move drm_vblank_cleanup() after lastclose. This may prevent a possible panic on shutdown. --- bsd-core/drm_drv.c | 4 ++-- linux-core/drm_drv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index a9165a4a..ce683a66 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -524,12 +524,12 @@ static void drm_unload(struct drm_device *dev) DRM_DEBUG("mtrr_del = %d", retcode); } - drm_vblank_cleanup(dev); - DRM_LOCK(); drm_lastclose(dev); DRM_UNLOCK(); + drm_vblank_cleanup(dev); + /* Clean up PCI resources allocated by drm_bufs.c. We're not really * worried about resource consumption while the DRM is inactive (between * lastclose and firstopen or unload) because these aren't actually diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index c68e237c..72f0e98b 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -397,11 +397,11 @@ static void drm_cleanup(struct drm_device * dev) return; } - drm_vblank_cleanup(dev); - drm_lastclose(dev); drm_fence_manager_takedown(dev); + drm_vblank_cleanup(dev); + if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp && dev->agp->agp_mtrr >= 0) { int retval; -- cgit v1.2.3