drm/i915: unreference default context on module unload
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 3 May 2013 13:29:08 +0000 (16:29 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 3 May 2013 16:19:56 +0000 (18:19 +0200)
Before module unload is called, gpu_idle() will switch
to default context. This will increment ref count of base
object as the default context is 'running' on module unload
time. Unreference the drm object so that when context
is freed, base object is freed as well.

v2: added comment to explain the refcounts (Ben Widawsky)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

No differences found