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 dan...@ffwll.ch 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 ch...@chris-wilson.co.uk Cc: Ben Widawsky b...@bwidawsk.net

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 dan...@ffwll.ch 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

[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 ch...@chris-wilson.co.uk Cc: Ben Widawsky b...@bwidawsk.net --- drivers/gpu/drm/i915/i915_gem_context.c | 82 +++ 1 file changed, 30 insertions(+), 52 deletions(-) diff --git

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 ch...@chris-wilson.co.uk 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

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 ch...@chris-wilson.co.uk Cc: Ben Widawsky b...@bwidawsk.net Afact this patch contains quite some code refactoring that does not relate