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_cleanup(struct nouveau_screen *screen) in nouveau_fence_cleanup() argument
114 if (screen->fence.current) { in nouveau_fence_cleanup()
120 nouveau_fence_ref(screen->fence.current, ¤t); in nouveau_fence_cleanup()
123 nouveau_fence_ref(NULL, &screen->fence.current); in nouveau_fence_cleanup()
128 nouveau_fence_update(struct nouveau_screen *screen, bool flushed) in nouveau_fence_update() argument
132 u32 sequence = screen->fence.update(&screen->base); in nouveau_fence_update()
137 if (unlikely(screen->disable_fences)) in nouveau_fence_update()
138 sequence = screen->fence.sequence; in nouveau_fence_update()
140 if (screen->fence.sequence_ack == sequence) in nouveau_fence_update()
142 screen->fence.sequence_ack = sequence; in nouveau_fence_update()
144 for (fence = screen->fence.head; fence; fence = next) { in nouveau_fence_update()
153 if (sequence == screen->fence.sequence_ack) in nouveau_fence_update()
156 screen->fence.head = next; in nouveau_fence_update()
158 screen->fence.tail = NULL; in nouveau_fence_update()
172 struct nouveau_screen *screen = fence->screen; in nouveau_fence_signalled() local
178 nouveau_fence_update(screen, false); in nouveau_fence_signalled()
186 struct nouveau_screen *screen = fence->screen; in nouveau_fence_kick() local
192 PUSH_SPACE(screen->pushbuf, 8); in nouveau_fence_kick()
201 if (nouveau_pushbuf_kick(screen->pushbuf, screen->pushbuf->channel)) in nouveau_fence_kick()
204 if (fence == screen->fence.current) in nouveau_fence_kick()
205 nouveau_fence_next(screen); in nouveau_fence_kick()
207 nouveau_fence_update(screen, false); in nouveau_fence_kick()
215 struct nouveau_screen *screen = fence->screen; in nouveau_fence_wait() local
234 NOUVEAU_DRV_STAT(screen, any_non_kernel_fence_sync_count, 1); in nouveau_fence_wait()
241 nouveau_fence_update(screen, false); in nouveau_fence_wait()
246 screen->fence.sequence_ack, screen->fence.sequence); in nouveau_fence_wait()
252 nouveau_fence_next(struct nouveau_screen *screen) in nouveau_fence_next() argument
254 if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTING) { in nouveau_fence_next()
255 if (screen->fence.current->ref > 1) in nouveau_fence_next()
256 nouveau_fence_emit(screen->fence.current); in nouveau_fence_next()
261 nouveau_fence_ref(NULL, &screen->fence.current); in nouveau_fence_next()
263 nouveau_fence_new(screen, &screen->fence.current); in nouveau_fence_next()