summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_gem.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2015-05-11 11:50:03 -0400
committerRob Clark <robdclark@gmail.com>2015-06-11 13:11:06 -0400
commit56c2da8338d5cdfc0695eeed96ebe03cf2ac0321 (patch)
tree0c1bf39f7bea3a2cdf11f9c25dd27e97dbdeeb2e /drivers/gpu/drm/msm/msm_gem.c
parent865807d0a96934593bc143e374b353d9c17e977f (diff)
downloadop-kernel-dev-56c2da8338d5cdfc0695eeed96ebe03cf2ac0321.zip
op-kernel-dev-56c2da8338d5cdfc0695eeed96ebe03cf2ac0321.tar.gz
drm/msm: fix timeout calculation
The 'timeout' value comes from userspace (CLOCK_MONOTONIC), but converting this directly to jiffies doesn't take into account the initial jiffies count at boot, which may differ from the base time of CLOCK_MONOTONIC. TODO: add ktime_delta_jiffies() when rebasing on 4.1 and use that instead of ktime_sub/ktime_to_timespec/timespec_to_jiffies combo (as suggested by Arnd) v2: switch over from 'struct timespec' to ktime_t throughout, since 'struct timespec' will be deprecated (as suggested by Arnd) v3: minor cosmetic tweaks Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index dfc74a5..f211b80 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -448,8 +448,7 @@ void msm_gem_move_to_inactive(struct drm_gem_object *obj)
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
}
-int msm_gem_cpu_prep(struct drm_gem_object *obj, uint32_t op,
- struct timespec *timeout)
+int msm_gem_cpu_prep(struct drm_gem_object *obj, uint32_t op, ktime_t *timeout)
{
struct drm_device *dev = obj->dev;
struct msm_gem_object *msm_obj = to_msm_bo(obj);
OpenPOWER on IntegriCloud