]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Don't pass negative delta to ktime_sub_ns()
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 12 Jun 2013 09:58:44 +0000 (11:58 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 7 Aug 2013 23:50:25 +0000 (09:50 +1000)
commit2eaa9c3ba506bbed401992d93b9f8414de9fd13d
tree743b587fb344dbb60de8639d71fcabe3054ced60
parentad598abc87241ee1af2e9faf9e7dd13bdcf21a78
drm: Don't pass negative delta to ktime_sub_ns()

It takes an unsigned value. This happens not to blow up on 64-bit
architectures, but it does on 32-bit, causing
drm_calc_vbltimestamp_from_scanoutpos() to calculate totally bogus
timestamps for vblank events. Which in turn causes e.g. gnome-shell to
hang after a DPMS off cycle with current xf86-video-ati Git.

[airlied: regression introduced in drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos]

Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59339
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59836
Tested-by: shui yangwei <yangweix.shui@intel.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_irq.c