[Intel-gfx] [PATCH 2/4] drm/i915: Unbind the fb

Ben Widawsky ben at bwidawsk.net
Fri May 31 20:28:46 CEST 2013


This is the only place I could find where we don't already unbind the
object before freeing it. This change will allow us to have a nice
assertion on free about whether or not an object still has pinned pages.

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_fb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 6b7c3ca..cd92889 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -209,6 +209,7 @@ static void intel_fbdev_destroy(struct drm_device *dev,
 	drm_framebuffer_unregister_private(&ifb->base);
 	drm_framebuffer_cleanup(&ifb->base);
 	if (ifb->obj) {
+		i915_gem_object_unbind(to_intel_bo(&ifb->obj->base));
 		drm_gem_object_unreference_unlocked(&ifb->obj->base);
 		ifb->obj = NULL;
 	}
-- 
1.8.3




More information about the Intel-gfx mailing list