diff options
author | Rob Clark <robdclark@gmail.com> | 2016-03-16 21:57:22 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-05-08 17:16:03 +0300 |
commit | 340ff4104f4454f8f1c3bf793c46411115309545 (patch) | |
tree | aade7554b941603b793bbd4ff837f1d63f1beb22 /drivers/gpu/drm/msm/msm_fence.c | |
parent | 79f0e20215bb902352cf7eb31222f4120563775c (diff) | |
download | linux-340ff4104f4454f8f1c3bf793c46411115309545.tar.xz |
drm/msm: split out timeout_to_jiffies helper
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_fence.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_fence.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c index 55a5f9280088..002eecb3934e 100644 --- a/drivers/gpu/drm/msm/msm_fence.c +++ b/drivers/gpu/drm/msm/msm_fence.c @@ -44,16 +44,7 @@ int msm_wait_fence(struct drm_device *dev, uint32_t fence, /* no-wait: */ ret = fence_completed(dev, fence) ? 0 : -EBUSY; } else { - ktime_t now = ktime_get(); - unsigned long remaining_jiffies; - - if (ktime_compare(*timeout, now) < 0) { - remaining_jiffies = 0; - } else { - ktime_t rem = ktime_sub(*timeout, now); - struct timespec ts = ktime_to_timespec(rem); - remaining_jiffies = timespec_to_jiffies(&ts); - } + unsigned long remaining_jiffies = timeout_to_jiffies(timeout); if (interruptible) ret = wait_event_interruptible_timeout(priv->fence_event, |