]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: unify first-stage engine struct setup
authorDave Gordon <david.s.gordon@intel.com>
Wed, 13 Jul 2016 15:03:35 +0000 (16:03 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 14 Jul 2016 10:16:18 +0000 (11:16 +0100)
commitc2c7f240081da626ed9da6dc536306d2ad393c9a
treef7b19ed9893ade3fa06cddd36205c254f8a51134
parent035ea405c91e2dc89325a79129cf9af2b9c2ae8e
drm/i915: unify first-stage engine struct setup

intel_lrc.c has a table of "logical rings" (meaning engines), while
intel_ringbuffer.c has separately open-coded initialisation for each
engine. We can deduplicate this somewhat by using the same first-stage
engine-setup function for both modes.

So here we expose the function that transfers information from the
static table of (all) known engines to the dev_priv->engine array of
engines available on this device (adjusting the names along the way)
and then embed calls to it in both the LRC and the legacy-mode setup.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Chris Wilson <chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h