On Thu, Mar 14, 2013 at 05:52:12PM +0200, Mika Kuoppala wrote: > For arb-robustness, every context needs to have it's own > reset state tracking. Default context will be handled in a identical > way as the no-context case in further down in the patch set. > For no-context case, the reset state will be stored in > the file_priv part. > > v2: handle default context inside get_reset_state > > Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com> > --- > drivers/gpu/drm/i915/i915_drv.h | 4 ++++ > drivers/gpu/drm/i915/i915_gem_context.c | 34 +++++++++++++++++++++++++++++++ > 2 files changed, 38 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index d004548..393f6a2 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -1696,6 +1696,10 @@ i915_switch_context(struct intel_ring_buffer *ring, > void i915_gem_context_free(struct kref *ctx_ref); > void i915_gem_context_init_reset_state(struct drm_device *dev, > struct ctx_reset_state *rs); > +int i915_gem_context_get_reset_state(struct intel_ring_buffer *ring, > + struct drm_file *file, > + u32 id, > + struct ctx_reset_state **rs); Return struct ctx_reset_state, and use ERR_PTR. Also don't immediately discard the return code in the (eventual) caller! -Chris -- Chris Wilson, Intel Open Source Technology Centre