drm/i915: Extend intel_wait_for_register_fw() with fast timeout
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 7 Apr 2017 16:01:44 +0000 (16:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Apr 2017 17:48:08 +0000 (18:48 +0100)
commit1d1a9774e40414148ecebbdb713746bfb6f9a561
tree57d97c5930416d8202210234501a3958019bba6b
parentd769ab182771df6d7ad6c3ecb0449d94043b7921
drm/i915: Extend intel_wait_for_register_fw() with fast timeout

In some cases we may want to spend more time in atomic wait than
hardcoded 2us. Let's add additional fast timeout parameter to allow
flexible configuration of atomic timeout before switching into heavy wait.
Add also possibility to return registry value to avoid extra read.

v2: use explicit fast timeout (Tvrtko/Chris)
    allow returning register value (Chris)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170407160145.181328-1-michal.wajdeczko@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_uncore.c