From: Ben Skeggs Date: Tue, 30 Oct 2012 00:59:12 +0000 (+1000) Subject: drm/nouveau: run mode_config destructor before destroying internal display state X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d6bf2f370703c0cab60bf1f5bf871a3f00eb8872;p=openwrt%2Fstaging%2Fblogic.git drm/nouveau: run mode_config destructor before destroying internal display state Later changes will depend on being able to pull down CRTCs etc with the master display state still intact. Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 86124b131f4f..b875fcff973a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -400,11 +400,12 @@ nouveau_display_destroy(struct drm_device *dev) nouveau_backlight_exit(dev); drm_vblank_cleanup(dev); + drm_kms_helper_poll_fini(dev); + drm_mode_config_cleanup(dev); + if (disp->dtor) disp->dtor(dev); - drm_kms_helper_poll_fini(dev); - drm_mode_config_cleanup(dev); nouveau_drm(dev)->display = NULL; kfree(disp); }