Commit 3184009c authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie

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=54101Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: default avatarlu hua <huax.lu@intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 259a290e
...@@ -1034,15 +1034,15 @@ void drm_mode_config_cleanup(struct drm_device *dev) ...@@ -1034,15 +1034,15 @@ void drm_mode_config_cleanup(struct drm_device *dev)
fb->funcs->destroy(fb); 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, list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
head) { head) {
plane->funcs->destroy(plane); 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_remove_all(&dev->mode_config.crtc_idr);
idr_destroy(&dev->mode_config.crtc_idr); idr_destroy(&dev->mode_config.crtc_idr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment