.. | .. |
---|
31 | 31 | * Eric Anholt <anholt@FreeBSD.org> |
---|
32 | 32 | */ |
---|
33 | 33 | |
---|
34 | | -#include <drm/drmP.h> |
---|
35 | | -#include <drm/mga_drm.h> |
---|
36 | 34 | #include "mga_drv.h" |
---|
37 | 35 | |
---|
38 | 36 | u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int pipe) |
---|
.. | .. |
---|
118 | 116 | /* MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); */ |
---|
119 | 117 | } |
---|
120 | 118 | |
---|
121 | | -int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence) |
---|
| 119 | +void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence) |
---|
122 | 120 | { |
---|
123 | 121 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; |
---|
124 | 122 | unsigned int cur_fence; |
---|
125 | | - int ret = 0; |
---|
126 | 123 | |
---|
127 | 124 | /* Assume that the user has missed the current sequence number |
---|
128 | 125 | * by about a day rather than she wants to wait for years |
---|
129 | 126 | * using fences. |
---|
130 | 127 | */ |
---|
131 | | - DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * HZ, |
---|
| 128 | + wait_event_timeout(dev_priv->fence_queue, |
---|
132 | 129 | (((cur_fence = atomic_read(&dev_priv->last_fence_retired)) |
---|
133 | | - - *sequence) <= (1 << 23))); |
---|
| 130 | + - *sequence) <= (1 << 23)), |
---|
| 131 | + msecs_to_jiffies(3000)); |
---|
134 | 132 | |
---|
135 | 133 | *sequence = cur_fence; |
---|
136 | | - |
---|
137 | | - return ret; |
---|
138 | 134 | } |
---|
139 | 135 | |
---|
140 | 136 | void mga_driver_irq_preinstall(struct drm_device *dev) |
---|