aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-04-27 14:08:47 +1000
committerDave Airlie <airlied@redhat.com>2018-04-27 14:08:47 +1000
commit24d9092c8b7de0a0f630adbe3504bef8d3a618af (patch)
tree74472777a1b49f1f0884df31359deecff71fb758 /drivers/gpu/drm/i915/intel_drv.h
parentMerge tag 'drm-misc-fixes-2018-04-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes (diff)
parentdrm/i915/fbdev: Enable late fbdev initial configuration (diff)
downloadlinux-dev-24d9092c8b7de0a0f630adbe3504bef8d3a618af.tar.xz
linux-dev-24d9092c8b7de0a0f630adbe3504bef8d3a618af.zip
Merge tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix for black screen issues (FDO #104158 and #104425) - A correction for wrongly applied display W/A - Fixes for HDA codec interop issue (no audio) and too eager HW timeouts * tag 'drm-intel-fixes-2018-04-26' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/fbdev: Enable late fbdev initial configuration drm/i915: Use ktime on wait_for drm/i915: Enable display WA#1183 from its correct spot drm/i915/audio: set minimum CD clock to twice the BCLK
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d4368589b355..a80fbad9be0f 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -49,12 +49,12 @@
* check the condition before the timeout.
*/
#define __wait_for(OP, COND, US, Wmin, Wmax) ({ \
- unsigned long timeout__ = jiffies + usecs_to_jiffies(US) + 1; \
+ const ktime_t end__ = ktime_add_ns(ktime_get_raw(), 1000ll * (US)); \
long wait__ = (Wmin); /* recommended min for usleep is 10 us */ \
int ret__; \
might_sleep(); \
for (;;) { \
- bool expired__ = time_after(jiffies, timeout__); \
+ const bool expired__ = ktime_after(ktime_get_raw(), end__); \
OP; \
if (COND) { \
ret__ = 0; \