Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-10 Thread Ben Widawsky
On Wed, Apr 09, 2014 at 09:07:36AM +0100, Chris Wilson wrote: > If we always initialize kref for the context, even if we are using fake > contexts for hangstats when there is no hw support, we can forgo the > dance to dereference the ctx->obj and inspect whether we are permitted > to use kref insid

[Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-09 Thread Chris Wilson
If we always initialize kref for the context, even if we are using fake contexts for hangstats when there is no hw support, we can forgo the dance to dereference the ctx->obj and inspect whether we are permitted to use kref inside i915_gem_context_reference() and _unreference(). My ulterior motive

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-05 Thread Chris Wilson
On Sat, Apr 05, 2014 at 12:18:05PM -0700, Ben Widawsky wrote: > On Fri, Apr 04, 2014 at 02:40:06PM +0100, Chris Wilson wrote: > > @@ -559,14 +519,13 @@ void i915_gem_context_close(struct drm_device *dev, > > struct drm_file *file) > > { > > struct drm_i915_file_private *file_priv = file->driv

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-05 Thread Ben Widawsky
On Fri, Apr 04, 2014 at 02:40:06PM +0100, Chris Wilson wrote: > If we always initialize kref for the context, even if we are using fake > contexts for hangstats when there is no hw support, we can forgo the > dance to dereference the ctx->obj and inspect whether we are permitted > to use kref insid

[Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-04 Thread Chris Wilson
If we always initialize kref for the context, even if we are using fake contexts for hangstats when there is no hw support, we can forgo the dance to dereference the ctx->obj and inspect whether we are permitted to use kref inside i915_gem_context_reference() and _unreference(). My ulterior motive

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-04 Thread Chris Wilson
On Thu, Apr 03, 2014 at 09:44:43PM -0700, Ben Widawsky wrote: > On Thu, Apr 03, 2014 at 08:06:30AM +0100, Chris Wilson wrote: > > @@ -377,7 +374,7 @@ void i915_gem_context_reset(struct drm_device *dev) > > if (ring->last_context == dctx) > > continue; > > > > -

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-03 Thread Ben Widawsky
On Thu, Apr 03, 2014 at 08:06:30AM +0100, Chris Wilson wrote: > If we always initialize kref for the context, even if we are using fake > contexts for hangstats when there is no hw support, we can forgo the > dance to dereference the ctx->obj and inspect whether we are permitted > to use kref insid

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-03 Thread Chris Wilson
On Thu, Apr 03, 2014 at 01:36:25PM +0300, Mika Kuoppala wrote: > Chris Wilson writes: > > + if (to->obj == NULL) { /* We have the fake context */ > > + if (to != ring->last_context) { > > + if (to) > > + i915_gem_context_reference(to); >

Re: [Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-03 Thread Mika Kuoppala
Chris Wilson writes: > If we always initialize kref for the context, even if we are using fake > contexts for hangstats when there is no hw support, we can forgo the > dance to dereference the ctx->obj and inspect whether we are permitted > to use kref inside i915_gem_context_reference() and _unr

[Intel-gfx] [PATCH] drm/i915: Always use kref tracking for all contexts.

2014-04-03 Thread Chris Wilson
If we always initialize kref for the context, even if we are using fake contexts for hangstats when there is no hw support, we can forgo the dance to dereference the ctx->obj and inspect whether we are permitted to use kref inside i915_gem_context_reference() and _unreference(). My ulterior motive