drm/i915: Split intel_engine allocation and initialisation
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Jan 2017 11:01:34 +0000 (11:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Jan 2017 12:29:47 +0000 (12:29 +0000)
commitbb8f0f5abdd7845175962a3fb99a5681290f9566
treea2cec372f90d43893225d1104e3623b142c3a667
parentb403c8feaf4838ad54cb9c15d0ad8453aa90af50
drm/i915: Split intel_engine allocation and initialisation

In order to reset the GPU early on in the module load sequence, we need
to allocate the basic engine structs (to populate the mmio offsets etc).
Currently, the engine initialisation allocates both the base struct and
also allocate auxiliary objects, which depend upon state setup quite
late in the load sequence. We split off the allocation callback for
later and allow ourselves to allocate the engine structs themselves
early.

v2: Different paint for the unwind following error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_lrc.h