Message ID | 1370025929-14270-1-git-send-email-ben@bwidawsk.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, May 31, 2013 at 11:45:29AM -0700, Ben Widawsky wrote: > 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. > > v2: Just use the i915 object instead of casting The patch is flawed in that we try to do the unbind without mutex protection. But it should already be unbound in free_object() anyway - and doing so here is unlikely to fix the WARN_ON (presuming that is what you are chasing). -Chris
On Fri, May 31, 2013 at 08:39:32PM +0100, Chris Wilson wrote: > On Fri, May 31, 2013 at 11:45:29AM -0700, Ben Widawsky wrote: > > 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. > > > > v2: Just use the i915 object instead of casting > > The patch is flawed in that we try to do the unbind without mutex > protection. But it should already be unbound in free_object() anyway - > and doing so here is unlikely to fix the WARN_ON (presuming that is > what you are chasing). > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre Agreed. This patch is junk. I made the mistake of working on it when I should have been in bed.
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 6b7c3ca..bc81de6 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(ifb->obj); drm_gem_object_unreference_unlocked(&ifb->obj->base); ifb->obj = NULL; }
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. v2: Just use the i915 object instead of casting Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/intel_fb.c | 1 + 1 file changed, 1 insertion(+)