• Rob Clark's avatar
    drm/msm: fix timeout calculation · 56c2da83
    Rob Clark authored
    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: default avatarRob Clark <robdclark@gmail.com>
    56c2da83
msm_atomic.c 7.66 KB