Lines Matching full:get

129 /* Fetch and adjust GPU GET pointer
132 * value >= 0, the adjusted GET pointer
133 * -EINVAL if GET pointer currently outside main push buffer
145 /* reset counter as long as GET is still advancing, this is in READ_GET()
200 uint32_t get = nvchan_rd32(chan, 0x88); in nv50_dma_push_wait() local
201 if (get != prev_get) { in nv50_dma_push_wait()
202 prev_get = get; in nv50_dma_push_wait()
212 chan->dma.ib_free = get - chan->dma.ib_put; in nv50_dma_push_wait()
231 int get = READ_GET(chan, &prev_get, &cnt); in nv50_dma_wait() local
232 if (unlikely(get < 0)) { in nv50_dma_wait()
233 if (get == -EINVAL) in nv50_dma_wait()
236 return get; in nv50_dma_wait()
239 if (get <= chan->dma.cur) { in nv50_dma_wait()
246 get = READ_GET(chan, &prev_get, &cnt); in nv50_dma_wait()
247 if (unlikely(get < 0)) { in nv50_dma_wait()
248 if (get == -EINVAL) in nv50_dma_wait()
250 return get; in nv50_dma_wait()
252 } while (get == 0); in nv50_dma_wait()
257 chan->dma.free = get - chan->dma.cur - 1; in nv50_dma_wait()
267 int cnt = 0, get; in nouveau_dma_wait() local
273 get = READ_GET(chan, &prev_get, &cnt); in nouveau_dma_wait()
274 if (unlikely(get == -EBUSY)) in nouveau_dma_wait()
277 /* loop until we have a usable GET pointer. the value in nouveau_dma_wait()
282 * the other case we discard GET is while the GPU is fetching in nouveau_dma_wait()
286 if (unlikely(get == -EINVAL) || get < NOUVEAU_DMA_SKIPS) in nouveau_dma_wait()
289 if (get <= chan->dma.cur) { in nouveau_dma_wait()
291 * idle (GET == PUT) so we have free space up until in nouveau_dma_wait()
300 * GET==PUT, in which case the below conditional will in nouveau_dma_wait()
313 /* wait for GET to depart from the skips area. in nouveau_dma_wait()
314 * prevents writing GET==PUT and causing a race in nouveau_dma_wait()
319 get = READ_GET(chan, &prev_get, &cnt); in nouveau_dma_wait()
320 if (unlikely(get == -EBUSY)) in nouveau_dma_wait()
322 if (unlikely(get == -EINVAL)) in nouveau_dma_wait()
324 } while (get <= NOUVEAU_DMA_SKIPS); in nouveau_dma_wait()
335 * current GET pointer. the "- 1" is to ensure there's in nouveau_dma_wait()
337 * push buffer if we require it. we can never get GET == PUT in nouveau_dma_wait()
340 chan->dma.free = get - chan->dma.cur - 1; in nouveau_dma_wait()