aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2012-09-17 09:38:03 +0000
committerDave Airlie <[email protected]>2012-10-02 09:29:37 +1000
commit3184009c36da413724f283e3c7ac9cc60c623bc4 (patch)
tree787dacdeff158c4d7e56365a97b87d724d5d9446
parent259a290e78d639bd02d0e408ceb72967318abb13 (diff)
drm: Destroy the planes prior to destroying the associated CRTC
As during the plane cleanup, we wish to disable the hardware and so may modify state on the associated CRTC, that CRTC must continue to exist until we are finished. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54101 Signed-off-by: Chris Wilson <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: [email protected] Reviewed-by: Jesse Barnes <[email protected]> Tested-by: lu hua <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--drivers/gpu/drm/drm_crtc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index c317f721a8d3..c418c772a7e5 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1034,15 +1034,15 @@ void drm_mode_config_cleanup(struct drm_device *dev)
fb->funcs->destroy(fb);
}
- list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) {
- crtc->funcs->destroy(crtc);
- }
-
list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
head) {
plane->funcs->destroy(plane);
}
+ list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) {
+ crtc->funcs->destroy(crtc);
+ }
+
idr_remove_all(&dev->mode_config.crtc_idr);
idr_destroy(&dev->mode_config.crtc_idr);
}