Commit c099b55a authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter

drm/core: Do not call drm_framebuffer_remove internally during teardown.

This may cause issues because encoders are already destroyed so removing
active primaries may use freed memory. Instead free the fb directly,
ignoring refcount.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent fcc90213
...@@ -5742,7 +5742,7 @@ void drm_mode_config_cleanup(struct drm_device *dev) ...@@ -5742,7 +5742,7 @@ void drm_mode_config_cleanup(struct drm_device *dev)
*/ */
WARN_ON(!list_empty(&dev->mode_config.fb_list)); WARN_ON(!list_empty(&dev->mode_config.fb_list));
list_for_each_entry_safe(fb, fbt, &dev->mode_config.fb_list, head) { list_for_each_entry_safe(fb, fbt, &dev->mode_config.fb_list, head) {
drm_framebuffer_remove(fb); drm_framebuffer_free(&fb->refcount);
} }
list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list, list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
......
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