drm/i915/context: create & destroy ioctls
authorBen Widawsky <ben@bwidawsk.net>
Mon, 4 Jun 2012 21:42:54 +0000 (14:42 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 14 Jun 2012 15:36:20 +0000 (17:36 +0200)
commit846248136dd3a6723135b8515ed7dc4c52a7b2ae
treefb8b3fdc86ba3632ca8edeb71074fde6b41753ff
parentf2ef6eb1453a95ce8ab388493793c54a6bedc405
drm/i915/context: create & destroy ioctls

Add the interfaces to allow user space to create and destroy contexts.
Contexts are destroyed automatically if the file descriptor for the dri
device is closed.

Following convention as usual here causes checkpatch warnings.

v2: with is_initialized, no longer need to init at create
drop the context switch on create (daniel)

v3: Use interruptible lock (Chris)
return -ENODEV in !GEM case (Chris)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c
include/drm/i915_drm.h