Rev 2326 | Rev 2342 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2326 | Rev 2330 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | #include |
28 | #include |
29 | #include "i915_drv.h" |
29 | #include "i915_drv.h" |
30 | #include "drm_crtc.h" |
30 | #include "drm_crtc.h" |
31 | #include "drm_crtc_helper.h" |
31 | #include "drm_crtc_helper.h" |
32 | #include "drm_fb_helper.h" |
32 | #include "drm_fb_helper.h" |
- | 33 | #include |
|
Line 33... | Line 34... | ||
33 | 34 | ||
34 | #define _wait_for(COND, MS, W) ({ \ |
35 | #define _wait_for(COND, MS, W) ({ \ |
35 | unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \ |
36 | unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \ |
36 | int ret__ = 0; \ |
37 | int ret__ = 0; \ |
37 | while (! (COND)) { \ |
38 | while (! (COND)) { \ |
38 | if (time_after(jiffies, timeout__)) { \ |
39 | if (time_after(jiffies, timeout__)) { \ |
39 | ret__ = -ETIMEDOUT; \ |
40 | ret__ = -ETIMEDOUT; \ |
40 | break; \ |
41 | break; \ |
41 | } \ |
42 | } \ |
42 | if (W && !(/*in_atomic()||*/ in_dbg_master())) msleep(W); \ |
43 | if (W) msleep(W); \ |
43 | } \ |
44 | } \ |
44 | ret__; \ |
45 | ret__; \ |
Line 45... | Line 46... | ||
45 | }) |
46 | }) |