drm/i915: Fix forcewake active domain tracking
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 10 Mar 2017 09:32:49 +0000 (09:32 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 10 Mar 2017 11:49:20 +0000 (11:49 +0000)
commitb8473050805f35add97f3ff57570d55a01808df5
treed640fdcbb85ca9e76c04d0e3ba0e1b3d59e8651e
parent1524e93e1eb42e5c3ea8a8b380fbcf15c52d2663
drm/i915: Fix forcewake active domain tracking

In commit 003342a50021 ("drm/i915: Keep track of active
forcewake domains in a bitmask") I forgot to adjust the
newly introduce fw_domains_active state across reset.

This caused the assert_forcewakes_inactive to trigger
during suspend and resume if there were user held
forcewakes.

v2: Bitmask checks are required since vfuncs are not
    always present.

v3: Move bitmask tracking to get/put vfunc for simplicity.
    (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask")
Testcase: igt/drv_suspend/forcewake
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: "Paneri, Praveen" <praveen.paneri@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: v4.10+ <stable@vger.kernel.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170310093249.4484-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/intel_uncore.c