drm/i915/execlists: Refactor common engine setup
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 May 2016 14:40:20 +0000 (15:40 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 May 2016 12:39:17 +0000 (13:39 +0100)
commite1382efb6051f43c317856ef97ec0976a29577b3
treed80b81705295033b0df13ce375b5291c3978bca2
parent91d14251bb3bf01d7a6e8abe898dc0f1889ebf22
drm/i915/execlists: Refactor common engine setup

Move all of the constant assignments up front and into a common
function. This is primarily to ensure the backpointers are set as early
as possible for later use during initialisation.

v2: Use a constant struct so that all the similar values are set
together.
v3: Sanitize the engine's IMR to disable any potential interrupt before
we are ready (enabled in init_hw).
v4: Ignore the engine's IMR, to be resolved later

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1462545621-30125-2-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c