OSDN Git Service

drm/i915: Only warn for might_sleep() before a slow wait_for_register
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 29 Mar 2018 22:45:19 +0000 (23:45 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 30 Mar 2018 09:05:59 +0000 (10:05 +0100)
commit3df82dd43be4b6efde20f819d5829c8ed5e95476
tree64d8d67052e7cdf62fca8e60ee7d1181ea4ef69c
parent5807e1c21dbd56c87f0e86ae6fe49ec745660c0d
drm/i915: Only warn for might_sleep() before a slow wait_for_register

As intel_wait_for_register_fw() may use, and if successful only use, a
busy-wait loop, the might_sleep() warning is a little over-zealous.
Restrict it to a might_sleep_if() a slow timeout is specified (and so
the caller authorises use of a usleep).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329224519.13598-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_uncore.c