drm/i915: Extend CONTEXT_CREATE to set parameters upon construction
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 22 Mar 2019 09:23:24 +0000 (09:23 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 22 Mar 2019 13:12:36 +0000 (13:12 +0000)
commitb91715417244a7e478304425ba671bfafee9c43e
tree1a3ed94cbecab44b3c5e392485c58f1e4d8c54f8
parente0695db7298ec2181d38bd3bfc5d0ff7a46f96f3
drm/i915: Extend CONTEXT_CREATE to set parameters upon construction

It can be useful to have a single ioctl to create a context with all
the initial parameters instead of a series of create + setparam + setparam
ioctls. This extension to create context allows any of the parameters
to be passed in as a linked list to be applied to the newly constructed
context.

v2: Make a local copy of user setparam (Tvrtko)
v3: Use flags to detect availability of extension interface

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190322092325.5883-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_gem_context.c
include/uapi/drm/i915_drm.h