drm/i915: cleanup context fini
authorBen Widawsky <ben@bwidawsk.net>
Mon, 14 Oct 2013 17:01:37 +0000 (10:01 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 16 Oct 2013 09:08:30 +0000 (11:08 +0200)
commit71b76d004f48b4b217a3895bfe058e2e5eefed39
treef0432e7b6f81d75f22519be57b8312f620a75b02
parent3d57e5bd1284f44e325f3a52d966259ed42f9e05
drm/i915: cleanup context fini

I had this lying around from he original PPGTT series, and thought we
might try to get it in by itself.

With the introduction of context refcounting we never explicitly
ref/unref the backing object. As such, the previous fix was a bit wonky.

Aside from fixing the above, this patch also puts us in good shape for
an upcoming patch which allows a failure to occur in between
context_init and the first do_switch.

CC: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c