On Wed, Jun 12, 2013 at 11:48:13AM +0100, Chris Wilson wrote: > On Wed, Jun 12, 2013 at 11:58:44AM +0200, Michel Dänzer wrote: > > From: Michel Dänzer <michel.daenzer@xxxxxxx> > > > > 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. > > > > Cc: stable@xxxxxxxxxxxxxxx > > Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx> > > iiuc, this occurs when compensating for the early vblank interrupt. > However, > > #define ktime_sub_ns(kt, nsval) \ > ({ (ktime_t){ .tv64 = (kt).tv64 - (nsval) }; }) > > so both tv64 and delta_ns are s64. I am not seeing the unsigned > promotion bug here. Ok, Imre pointed out to me that there is a separate definition for 32-bit machines that does seem limited to only handling unsigned ns values. And so currently blows up big time for the early vblank case. If we knew the values were guaranteed to be less that a second we could just use ktime_add() by keeping delta_ns as a ktime_t instead. Since we are dealing with fractions of a frame... -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel