drm/i915: skip forcewake actions on forcewake-less uncore
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 20 Jun 2019 01:00:19 +0000 (18:00 -0700)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 20 Jun 2019 15:34:56 +0000 (16:34 +0100)
commit2e81bc61d4e3ee4592b2a1d341696fe4fe3fc5eb
treeca0d12b34f5e569eb1f016bd83aa16868560caad
parent013857580bbece05a89d6a323799960ffaefdb8c
drm/i915: skip forcewake actions on forcewake-less uncore

We always call some of the setup/cleanup functions for forcewake, even
if the feature is not actually available. Skipping these operations if
forcewake is not available saves us some operations on older gens and
prepares us for having a forcewake-less display uncore.

v2: do not make suspend/resume functions forcewake-specific (Chris,
Tvrtko), use GEM_BUG_ON in internal forcewake-only functions (Tvrtko)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
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-5-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/intel_uncore.c