drm/i915: store all mmio bases in intel_engines
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 14 Mar 2018 18:26:50 +0000 (11:26 -0700)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Mar 2018 08:46:06 +0000 (08:46 +0000)
commit80b216b98b0cd4f10303863c062b7ab7d117ada7
tree0addc01f85118d51ed8aaad0f63af091a0f6a27c
parentda9cb11f76623b99f2d5e6aa68f43d6ef714a7de
drm/i915: store all mmio bases in intel_engines

The mmio bases we're currently storing in the intel_engines array are
only valid for a subset of gens, so we need to ignore them and use
different values in some cases. Instead of doing that, we can have a
table of [starting gen, mmio base] pairs for each engine in
intel_engines and select the correct one based on the gen we're running
on in a consistent way.

v2: document that the list goes in reverse order, update starting gen
    for render (Chris)

v3: starting gen for render back to 1 to make our life easier with
    selftests (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #v2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180314182653.26981-1-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.c