drm/i915: Move calling engine->init_hw() to its own function
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Feb 2017 14:30:31 +0000 (14:30 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Feb 2017 16:24:42 +0000 (16:24 +0000)
commit20a8a74ad9473e498da47e3094fa73057f3246d1
tree8677f48c15e3e9c2ac8e9c843b7c13104f662bb6
parent519d52498156b07c4bc69ad28ab8f784cc124628
drm/i915: Move calling engine->init_hw() to its own function

Just a simple refactor to move a loop and some support code out of
i915_gem_init_hw(). This is in preparation for avoiding a race between
the tasklet writing to ELSP whilst simultaneously being written by
engine->init_hw() following a GPU reset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c