Ben Skeggs | d375e7d5 | 2012-04-30 13:30:00 +1000 | [diff] [blame^] | 1 | #ifndef __NOUVEAU_FENCE_H__ |
| 2 | #define __NOUVEAU_FENCE_H__ |
| 3 | |
| 4 | struct nouveau_fence { |
| 5 | struct list_head head; |
| 6 | struct kref kref; |
| 7 | |
| 8 | struct nouveau_channel *channel; |
| 9 | unsigned long timeout; |
| 10 | u32 sequence; |
| 11 | |
| 12 | void (*work)(void *priv, bool signalled); |
| 13 | void *priv; |
| 14 | }; |
| 15 | |
| 16 | int nouveau_fence_new(struct nouveau_channel *, struct nouveau_fence **); |
| 17 | struct nouveau_fence * |
| 18 | nouveau_fence_ref(struct nouveau_fence *); |
| 19 | void nouveau_fence_unref(struct nouveau_fence **); |
| 20 | |
| 21 | int nouveau_fence_emit(struct nouveau_fence *, struct nouveau_channel *); |
| 22 | bool nouveau_fence_done(struct nouveau_fence *); |
| 23 | int nouveau_fence_wait(struct nouveau_fence *, bool lazy, bool intr); |
| 24 | int nouveau_fence_sync(struct nouveau_fence *, struct nouveau_channel *); |
| 25 | void nouveau_fence_idle(struct nouveau_channel *); |
| 26 | void nouveau_fence_update(struct nouveau_channel *); |
| 27 | |
| 28 | #endif |