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

Jesse Barnes jbarnes at virtuousgeek.org
Fri Feb 20 18:19:13 CET 2009

On Friday 20 February 2009 07:31:43 Barry Scott wrote:
> 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?

It's a somewhat common idiom in the kernel, but yeah a comment wouldn't hurt.

Jesse Barnes, Intel Open Source Technology Center

More information about the Intel-gfx mailing list