Quoting Chris Wilson (2018-12-04 12:52:15)
> Quoting Christian König (2018-12-04 11:59:39)
> > -static inline bool __dma_fence_is_later(u32 f1, u32 f2)
> > +static inline bool __dma_fence_is_later(u64 f1, u64 f2)
> > {
> > - return (int)(f1 - f2) > 0;
> > + /* This is for backward compatibility with drivers which can only
> > handle
> > + * 32bit sequence numbers. Use a 64bit compare when any of the
> > higher
> > + * bits are none zero, otherwise use a 32bit compare with wrap
> > around
> > + * handling.
> > + */
> > + if (upper_32_bits(f1) || upper_32_bits(f2))
> > + return f1 > f2;
> > +
> > + return (int)(lower_32_bits(f1) - lower_32_bits(f2)) > 0;
>
> Or just "(int64_t)(f1 - f2) > 0", works if drivers are only using the low
> 32b and if they use the full 64b.
No, it doesn't.
-Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel