drm/i915/gt: Push context state allocation earlier
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 9 Jan 2020 08:57:15 +0000 (08:57 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 9 Jan 2020 13:48:00 +0000 (13:48 +0000)
commit89f98d634f6b7a8433b59fef1543634b20fc18f2
tree271d77c8aa8b4812c1e52d4b7b87756af461b732
parentfeed5c7be22c25e9c777c821bcf955a13cf010ab
drm/i915/gt: Push context state allocation earlier

Allow for knowledgeable users to preallocate the context state, and to
separate the allocation step from the pinning step during
intel_context_pin()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200109085717.873326-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/gt/intel_context.h