drm: delay vblank cleanup until after driver unload
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 26 Mar 2010 18:07:16 +0000 (11:07 -0700)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Apr 2010 04:22:38 +0000 (14:22 +1000)
Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload
paths, so don't clean up the vblank related structures until after
driver unload.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_stub.c

index ad73e141afdbd8096e2908d75e5849962ae1f069..543e79c1ce5a415fc879330dfc86673afbc27831 100644 (file)
@@ -515,8 +515,6 @@ void drm_put_dev(struct drm_device *dev)
        }
        driver = dev->driver;
 
-       drm_vblank_cleanup(dev);
-
        drm_lastclose(dev);
 
        if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
@@ -536,6 +534,8 @@ void drm_put_dev(struct drm_device *dev)
                dev->agp = NULL;
        }
 
+       drm_vblank_cleanup(dev);
+
        list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
                drm_rmmap(dev, r_list->map);
        drm_ht_remove(&dev->map_hash);