drm: Destroy the planes prior to destroying the associated CRTC
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 17 Sep 2012 09:38:03 +0000 (09:38 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 1 Oct 2012 23:29:37 +0000 (09:29 +1000)
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 <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: lu hua <huax.lu@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c

index c317f721a8d3ac0002acdb1b2a0ec47426b9bd64..c418c772a7e506c4bb28a89e8e9e89ff87a85319 100644 (file)
@@ -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);
 }
This page took 0.02983 seconds and 5 git commands to generate.