Re: [Intel-gfx] [PATCH 02/13] drm/i915: fix invalid reference handling of the default ctx obj

2012-07-14 Thread Daniel Vetter
On Sat, Jul 14, 2012 at 10:55:19AM +0100, Chris Wilson wrote: > On Fri, 13 Jul 2012 17:37:14 +0200, Daniel Vetter wrote: > > On Fri, Jul 13, 2012 at 02:14:05PM +0100, Chris Wilson wrote: > > > Otherwise we end up trying to unpin a freed object and BUG. > > > > > > Signed-off-by: Chris Wilson > >

Re: [Intel-gfx] [PATCH 02/13] drm/i915: fix invalid reference handling of the default ctx obj

2012-07-14 Thread Chris Wilson
On Fri, 13 Jul 2012 17:37:14 +0200, Daniel Vetter wrote: > On Fri, Jul 13, 2012 at 02:14:05PM +0100, Chris Wilson wrote: > > Otherwise we end up trying to unpin a freed object and BUG. > > > > Signed-off-by: Chris Wilson > > Cc: Ben Widawsky > > Afact this patch contains quite some code refact

Re: [Intel-gfx] [PATCH 02/13] drm/i915: fix invalid reference handling of the default ctx obj

2012-07-13 Thread Daniel Vetter
On Fri, Jul 13, 2012 at 02:14:05PM +0100, Chris Wilson wrote: > Otherwise we end up trying to unpin a freed object and BUG. > > Signed-off-by: Chris Wilson > Cc: Ben Widawsky Afact this patch contains quite some code refactoring that does not relate directly to the fix (or if it does, I fail to

Re: [Intel-gfx] [PATCH 02/13] drm/i915: fix invalid reference handling of the default ctx obj

2012-07-13 Thread Ben Widawsky
On Fri, 13 Jul 2012 14:14:05 +0100 Chris Wilson wrote: > Otherwise we end up trying to unpin a freed object and BUG. > Just a quick excuse: originally do_switch was just a very low level helper, and everything called i915_switch_context (including default setup), so the bug likely didn't exist

[Intel-gfx] [PATCH 02/13] drm/i915: fix invalid reference handling of the default ctx obj

2012-07-13 Thread Chris Wilson
Otherwise we end up trying to unpin a freed object and BUG. Signed-off-by: Chris Wilson Cc: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 82 +++ 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b