summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-04-12 11:55:10 +1000
committerDave Airlie <airlied@linux.ie>2007-04-12 11:55:10 +1000
commit1bba3cb3b37ca9bc302d83377c1e9d5441653d0d (patch)
tree046f33e21e0e0b0a8bf7eb433bce1b9682b58949 /linux-core
parentfb6c5aacb9955248300e0c62f68a5a65b40e15e1 (diff)
cleanup framebuffers on drm unload
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 259ea1b8..2f140dbd 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -582,7 +582,7 @@ void drm_mode_config_cleanup(drm_device_t *dev)
{
struct drm_output *output, *ot;
struct drm_crtc *crtc, *ct;
-
+ struct drm_crtc *fb, *fbt;
list_for_each_entry_safe(output, ot, &dev->mode_config.output_list, head) {
drm_output_destroy(output);
}
@@ -590,6 +590,11 @@ void drm_mode_config_cleanup(drm_device_t *dev)
list_for_each_entry_safe(crtc, ct, &dev->mode_config.crtc_list, head) {
drm_crtc_destroy(crtc);
}
+
+ list_for_each_entry_safe(fb, fbt, &dev->mode_config.fb_list, head) {
+ drmfb_remove(dev, fb);
+ drm_framebuffer_destroy(fb);
+ }
}
EXPORT_SYMBOL(drm_mode_config_cleanup);