• Russell King's avatar
    drm/etnaviv: correct timeout calculation · d066b246
    Russell King authored
    The old way did clamp the jiffy conversion and thus caused the timeouts
    to become negative after some time. Also it didn't work with userspace
    which actually fills the upper 32bits of the 64bit timestamp value.
    
    clock_gettime() is 32-bit on 32-bit architectures. Using 64-bit timespec
    math, like we do in this commit, means that when a wrap occurs, the
    specified timeout goes into the past and we can't request a timeout in
    the future. As the Linux implementation of CLOCK_MONOTONIC is reasonable
    and starts at 0, the first such timer wrap will occur after approx. 68
    years of system uptime.
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
    d066b246
etnaviv_drv.h 5.22 KB