Quoting Ville Syrjala (2017-11-29 15:37:30)
> From: Ville Syrjälä <[email protected]>
> 
> Previously I was under the impression that the scanline counter
> reads 0 when the pipe is off. Turns out that's not correct, and
> instead the scanline counter simply stops when the pipe stops, and
> it retains it's last value until the pipe starts up again, at which
> point the scanline counter jumps to vblank start.
> 
> These jumps can cause the timestamp to jump backwards by one frame.
> Since we use the timestamps to guesstimage also the frame counter
> value on gen2, that would cause the frame counter to also jump
> backwards, which leads to a massice difference from the previous value.
> The end result is that flips/vblank events don't appear to complete as
> they're stuck waiting for the frame counter to catch up to that massive
> difference.
> 
> Fix the problem properly by actually making sure the scanline counter
> has started to move before we assume that it's safe to enable vblank
> processing.
> 
> v2: Less pointless duplication in the code (Chris)
> 
> Cc: [email protected]
> Cc: Daniel Vetter <[email protected]>
> Cc: Chris Wilson <[email protected]>
> Reviewed-by: Chris Wilson <[email protected]> #v1
> Fixes: b7792d8b54cc ("drm/i915: Wait for pipe to start before sampling vblank 
> timestamps on gen2")
> Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to