Lines Matching refs:dma_pages

310 	dev_priv->dma_pages = kmalloc_array(dev_priv->nr_dma_pages,  in savage_dma_init()
313 if (dev_priv->dma_pages == NULL) in savage_dma_init()
317 SET_AGE(&dev_priv->dma_pages[i].age, 0, 0); in savage_dma_init()
318 dev_priv->dma_pages[i].used = 0; in savage_dma_init()
319 dev_priv->dma_pages[i].flushed = 0; in savage_dma_init()
336 SET_AGE(&dev_priv->dma_pages[i].age, event, wrap); in savage_dma_reset()
337 dev_priv->dma_pages[i].used = 0; in savage_dma_reset()
338 dev_priv->dma_pages[i].flushed = 0; in savage_dma_reset()
362 if (dev_priv->dma_pages[page].age.wrap > wrap || in savage_dma_wait()
363 (dev_priv->dma_pages[page].age.wrap == wrap && in savage_dma_wait()
364 dev_priv->dma_pages[page].age.event > event)) { in savage_dma_wait()
366 dev_priv->dma_pages[page].age.event) in savage_dma_wait()
376 dev_priv->dma_pages[cur].used; in savage_dma_alloc()
383 cur, dev_priv->dma_pages[cur].used, n, rest, nr_pages); in savage_dma_alloc()
387 cur * SAVAGE_DMA_PAGE_SIZE + dev_priv->dma_pages[cur].used; in savage_dma_alloc()
390 dev_priv->dma_pages[cur].used += rest; in savage_dma_alloc()
398 dev_priv->dma_pages[i].age = dev_priv->last_dma_age; in savage_dma_alloc()
399 dev_priv->dma_pages[i].used = 0; in savage_dma_alloc()
400 dev_priv->dma_pages[i].flushed = 0; in savage_dma_alloc()
407 if (dev_priv->dma_pages[i].used) { in savage_dma_alloc()
409 i, dev_priv->dma_pages[i].used); in savage_dma_alloc()
413 dev_priv->dma_pages[i].used = SAVAGE_DMA_PAGE_SIZE; in savage_dma_alloc()
415 dev_priv->dma_pages[i].used = n; in savage_dma_alloc()
421 i, dev_priv->dma_pages[i].used, n); in savage_dma_alloc()
438 dev_priv->dma_pages[cur].used == dev_priv->dma_pages[cur].flushed) in savage_dma_flush()
443 pad = -dev_priv->dma_pages[cur].used & 1; in savage_dma_flush()
444 align = -(dev_priv->dma_pages[cur].used + pad) & 7; in savage_dma_flush()
448 first, cur, dev_priv->dma_pages[first].flushed, in savage_dma_flush()
449 dev_priv->dma_pages[cur].used, pad, align); in savage_dma_flush()
454 cur * SAVAGE_DMA_PAGE_SIZE + dev_priv->dma_pages[cur].used; in savage_dma_flush()
455 dev_priv->dma_pages[cur].used += pad; in savage_dma_flush()
467 dev_priv->dma_pages[first].flushed) * 4; in savage_dma_flush()
469 dev_priv->dma_pages[cur].used - dev_priv->dma_pages[first].flushed; in savage_dma_flush()
480 dev_priv->dma_pages[cur].used += align; in savage_dma_flush()
486 SET_AGE(&dev_priv->dma_pages[i].age, event, wrap); in savage_dma_flush()
487 dev_priv->dma_pages[i].used = 0; in savage_dma_flush()
488 dev_priv->dma_pages[i].flushed = 0; in savage_dma_flush()
491 if (dev_priv->dma_pages[cur].used == SAVAGE_DMA_PAGE_SIZE) { in savage_dma_flush()
492 SET_AGE(&dev_priv->dma_pages[cur].age, event, wrap); in savage_dma_flush()
493 dev_priv->dma_pages[cur].used = 0; in savage_dma_flush()
494 dev_priv->dma_pages[cur].flushed = 0; in savage_dma_flush()
502 dev_priv->dma_pages[cur].flushed = dev_priv->dma_pages[i].used; in savage_dma_flush()
507 dev_priv->dma_pages[cur].used, in savage_dma_flush()
508 dev_priv->dma_pages[cur].flushed); in savage_dma_flush()
517 dev_priv->dma_pages[dev_priv->current_dma_page].used == 0) in savage_fake_dma_flush()
522 dev_priv->dma_pages[dev_priv->current_dma_page].used); in savage_fake_dma_flush()
525 i <= dev_priv->current_dma_page && dev_priv->dma_pages[i].used; in savage_fake_dma_flush()
532 dev_priv->dma_pages[i].used != SAVAGE_DMA_PAGE_SIZE) { in savage_fake_dma_flush()
534 i, dev_priv->dma_pages[i].used); in savage_fake_dma_flush()
537 BEGIN_BCI(dev_priv->dma_pages[i].used); in savage_fake_dma_flush()
538 for (j = 0; j < dev_priv->dma_pages[i].used; ++j) { in savage_fake_dma_flush()
541 dev_priv->dma_pages[i].used = 0; in savage_fake_dma_flush()
908 kfree(dev_priv->dma_pages); in savage_do_cleanup_bci()