[Intel-gfx] [PATCH] i915: add page flipping ioctl

Barry Scott barry.scott at onelan.co.uk
Fri Feb 20 16:31:43 CET 2009


I saw this and thought it was wrong.

int
 i915_seqno_passed(uint32_t seq1, uint32_t seq2)
 {
 	return (int32_t)(seq1 - seq2) >= 0;

After a bit of thinking I realized that this is doing modulas arithmetic to
deal with the seqno wrapping around. Given its not obvious at first glance
you might like to add a comment that to explain?

Barry





More information about the Intel-gfx mailing list