aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2014-02-11 17:01:10 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-12 12:53:14 -0500
commit9d6612516da0b7592dac221d1c836d7a906bb3c5 (patch)
tree20aa092019a555c94206d699e459d3d66e501e13
parentabbf9d2c4886c036eb1556bb141c27c6a7e5a245 (diff)
drm/i915: unbind fbs from crtcs during driver unload
So far during driver unload we called drm_framebuffer_cleanup() for the fbdev fb, which only removes the fb from the drm fb list regardless of its reference count, but leaves the fb bound on an active crtc. Since the fb's backing storage was freed this could mean we scan some random memory content out afterwards. It's not a big issue since the fb is allocated from stolen memory and afaik there is no other user for that than i915. It's still cleaner to properly unbind the fb and disable the crtc, which is what drm_framebuffer_remove() does. Note that after commit 88891eb1e9eca0ba619518bed31580f91e9cf84d Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Feb 10 18:00:38 2014 +0100 we call drm_framebuffer_cleanup() only after dropping the last reference on the fb, but that won't happen since we don't unbind the fb. This results in a drm core warn about a leaked fb. Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_fbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index cf4627387c5a..3a53ee307065 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -265,7 +265,7 @@ static void intel_fbdev_destroy(struct drm_device *dev,
265 drm_fb_helper_fini(&ifbdev->helper); 265 drm_fb_helper_fini(&ifbdev->helper);
266 266
267 drm_framebuffer_unregister_private(&ifbdev->fb->base); 267 drm_framebuffer_unregister_private(&ifbdev->fb->base);
268 drm_framebuffer_unreference(&ifbdev->fb->base); 268 drm_framebuffer_remove(&ifbdev->fb->base);
269} 269}
270 270
271int intel_fbdev_init(struct drm_device *dev) 271int intel_fbdev_init(struct drm_device *dev)