On Tue, Feb 02, 2016 at 11:06:19AM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > This is for callers who want micro-second precision but are not > waiting from the atomic context. linux/time.h provides us with USEC_PER_MSEC that would help to break up these large numbers better for human consumption. 2000 -> 2*USEC_PER_SEC 10 -> 10*USEC_PER_MSEC Maybe: #define wait_for_seconds(x) ((x)*USEC_PER_SEC) #define wait_for_milliseconds(x) ((x)*USEC_PER_MSEC) if (_wait_for((I915_READ(pp_stat_reg) & mask) == value, wait_for_seconds(5) /* timeout */, wait_for_millseconds(10) /* interval */)) > @@ -55,7 +55,7 @@ > break; \ > } \ > if ((W) && drm_can_sleep()) { \ Note after the atomic conversion, we can also do the !atomic assert here and kill the drm_can_sleep() check -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx