UPSTREAM: drm/i915: Use __intel_uncore_wait_for_register_fw for sandybride_pcode_read

Since the sandybridge_pcode_read() may be called from
skl_pcode_request() inside an atomic context (with preempt disabled), we
should avoid hitting any sleeping paths. Currently is being called with
a 500ms timeout, irrespective of being inside an atomic context or not.
This is reduced down to 500us to play nice with the atomic context, and
that appears to be sufficient to keep BAT happy (we have a DRM_ERROR
should it timeout), i.e. we do not see any 500us pcode timeouts for
normal use. So leave it as a pure spin without having to introduce new
code paths to separate atomic/normal contexts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170411101340.31994-4-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
(cherry picked from commit e09a3036412a959689bacf017bf2cbc226c9fea4)

BUG=b:113152572
TEST=suspend_stress_test on nocturne is successful

Change-Id: I0f8abe0eba44332a7d4f7dac29027b204514acba
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/1188783
Commit-Ready: Benson Leung <bleung@google.com>
Tested-by: Benson Leung <bleung@google.com>
Tested-by: Edward Baker <edward.baker@intel.com>
Reviewed-by: Benson Leung <bleung@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Casey G Bowman <casey.g.bowman@intel.com>
(cherry picked from commit b0c00a4a41dd3bff64c8294acdbdaf735df26dcc)
Reviewed-on: https://chromium-review.googlesource.com/1200163
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Trybot-Ready: Benson Leung <bleung@chromium.org>
1 file changed