Commit a91d7b91 authored by Daniel Vetter's avatar Daniel Vetter

Revert "drm: Don't pass negative delta to ktime_sub_ns()"

This reverts commit e91abf80.

Since

commit 24e4a8c3
Author: John Stultz <john.stultz@linaro.org>
Date:   Wed Jul 16 21:03:53 2014 +0000

    ktime: Kill non-scalar ktime_t implementation for 2038

there is no longer a 32bit version that's unsigned, and we don't have
to jump through ridiculous hoops to make the calculations correct.

I didn't look whether there's more of this pattern in the kernel.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459249942-21589-1-git-send-email-daniel.vetter@ffwll.ch
parent 222b9094
...@@ -805,9 +805,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, ...@@ -805,9 +805,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
/* Subtract time delta from raw timestamp to get final /* Subtract time delta from raw timestamp to get final
* vblank_time timestamp for end of vblank. * vblank_time timestamp for end of vblank.
*/ */
if (delta_ns < 0)
etime = ktime_add_ns(etime, -delta_ns);
else
etime = ktime_sub_ns(etime, delta_ns); etime = ktime_sub_ns(etime, delta_ns);
*vblank_time = ktime_to_timeval(etime); *vblank_time = ktime_to_timeval(etime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment