]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/i915: Do graphics device reset under forcewake
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 5 Nov 2015 11:11:38 +0000 (13:11 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 5 Nov 2015 13:31:07 +0000 (15:31 +0200)
commit99106bc17e667989b4c0af0a6afcbd6ddbada8fb
tree945df6667cd8e8976ed974d5370d07fa0caa9506
parent9807216f585fc69a6cad3668414a2936a84444c8
drm/i915: Do graphics device reset under forcewake

We have a timed release of a forcewake when using
I915_READ/WRITE macros. wait_for() macro will go to quite
long sleep if the first read doesn't satisfy the condition for
successful exit. With these two interacting, it is possible that
we lose the forcewake during the wait_for() and the subsequent read
will reaquire forcewake.

Further experiments with skl shows that when we lose forcewake,
we lose the reset request we submitted. So reset request register
is not power context saved.

Grab forcewakes for all engines before starting the reset/request
dance so that all requests stay valid for the duration of reset
requisition across all the engines.

v2: Add comment on power well sleeps. Wrap the reset handling
    under forcewake instead of just reset requests (Chris)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92774
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Tomi Sarvela <tomix.p.sarvela@intel.com> (v1, v2)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1446721898-1450-1-git-send-email-mika.kuoppala@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_uncore.c