Lines Matching refs:screen
33 nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence) in nouveau_fence_new() argument
39 (*fence)->screen = screen; in nouveau_fence_new()
61 struct nouveau_screen *screen = fence->screen; in nouveau_fence_emit() local
70 if (screen->fence.tail) in nouveau_fence_emit()
71 screen->fence.tail->next = fence; in nouveau_fence_emit()
73 screen->fence.head = fence; in nouveau_fence_emit()
75 screen->fence.tail = fence; in nouveau_fence_emit()
77 screen->fence.emit(&screen->base, &fence->sequence); in nouveau_fence_emit()
87 struct nouveau_screen *screen = fence->screen; in nouveau_fence_del() local
91 if (fence == screen->fence.head) { in nouveau_fence_del()
92 screen->fence.head = fence->next; in nouveau_fence_del()
93 if (!screen->fence.head) in nouveau_fence_del()
94 screen->fence.tail = NULL; in nouveau_fence_del()
96 for (it = screen->fence.head; it && it->next != fence; it = it->next); in nouveau_fence_del()
98 if (screen->fence.tail == fence) in nouveau_fence_del()
99 screen->fence.tail = it; in nouveau_fence_del()
112 nouveau_fence_update(struct nouveau_screen *screen, bool flushed) in nouveau_fence_update() argument
116 u32 sequence = screen->fence.update(&screen->base); in nouveau_fence_update()
118 if (screen->fence.sequence_ack == sequence) in nouveau_fence_update()
120 screen->fence.sequence_ack = sequence; in nouveau_fence_update()
122 for (fence = screen->fence.head; fence; fence = next) { in nouveau_fence_update()
131 if (sequence == screen->fence.sequence_ack) in nouveau_fence_update()
134 screen->fence.head = next; in nouveau_fence_update()
136 screen->fence.tail = NULL; in nouveau_fence_update()
150 struct nouveau_screen *screen = fence->screen; in nouveau_fence_signalled() local
156 nouveau_fence_update(screen, false); in nouveau_fence_signalled()
164 struct nouveau_screen *screen = fence->screen; in nouveau_fence_kick() local
170 PUSH_SPACE(screen->pushbuf, 8); in nouveau_fence_kick()
179 if (nouveau_pushbuf_kick(screen->pushbuf, screen->pushbuf->channel)) in nouveau_fence_kick()
182 if (fence == screen->fence.current) in nouveau_fence_kick()
183 nouveau_fence_next(screen); in nouveau_fence_kick()
185 nouveau_fence_update(screen, false); in nouveau_fence_kick()
193 struct nouveau_screen *screen = fence->screen; in nouveau_fence_wait() local
212 NOUVEAU_DRV_STAT(screen, any_non_kernel_fence_sync_count, 1); in nouveau_fence_wait()
219 nouveau_fence_update(screen, false); in nouveau_fence_wait()
224 screen->fence.sequence_ack, screen->fence.sequence); in nouveau_fence_wait()
230 nouveau_fence_next(struct nouveau_screen *screen) in nouveau_fence_next() argument
232 if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTING) { in nouveau_fence_next()
233 if (screen->fence.current->ref > 1) in nouveau_fence_next()
234 nouveau_fence_emit(screen->fence.current); in nouveau_fence_next()
239 nouveau_fence_ref(NULL, &screen->fence.current); in nouveau_fence_next()
241 nouveau_fence_new(screen, &screen->fence.current); in nouveau_fence_next()