drm/i915: dynamically allocate forcewake domains
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 20 Jun 2019 01:00:20 +0000 (18:00 -0700)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 20 Jun 2019 15:34:56 +0000 (16:34 +0100)
commitf833cdb06bf7cea6827d67b73cb24da335b70266
tree5110196ba3ba075c3e899f56894e10ac6ed3b6d3
parent2e81bc61d4e3ee4592b2a1d341696fe4fe3fc5eb
drm/i915: dynamically allocate forcewake domains

We'd like to introduce a display uncore with no forcewake domains, so
let's avoid wasting memory and be ready to allocate only what we need.
Even without multiple uncore, we still don't need all the domains on all
gens.

v2: avoid hidden control flow, improve checks (Tvrtko), fix IVB special
case, add failure injection point

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620010021.20637-6-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h