Lines Matching refs:sq
332 struct t4_sq sq; member
388 static inline int t4_sq_onchip(struct t4_sq *sq) in t4_sq_onchip() argument
390 return sq->flags & T4_SQ_ONCHIP; in t4_sq_onchip()
395 return wq->sq.in_use == 0; in t4_sq_empty()
400 return wq->sq.in_use == (wq->sq.size - 1); in t4_sq_full()
405 return wq->sq.size - 1 - wq->sq.in_use; in t4_sq_avail()
410 wq->sq.in_use++; in t4_sq_produce()
411 if (++wq->sq.pidx == wq->sq.size) in t4_sq_produce()
412 wq->sq.pidx = 0; in t4_sq_produce()
413 wq->sq.wq_pidx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in t4_sq_produce()
414 if (wq->sq.wq_pidx >= wq->sq.size * T4_SQ_NUM_SLOTS) in t4_sq_produce()
415 wq->sq.wq_pidx %= wq->sq.size * T4_SQ_NUM_SLOTS; in t4_sq_produce()
420 BUG_ON(wq->sq.in_use < 1); in t4_sq_consume()
421 if (wq->sq.cidx == wq->sq.flush_cidx) in t4_sq_consume()
422 wq->sq.flush_cidx = -1; in t4_sq_consume()
423 wq->sq.in_use--; in t4_sq_consume()
424 if (++wq->sq.cidx == wq->sq.size) in t4_sq_consume()
425 wq->sq.cidx = 0; in t4_sq_consume()
430 return wq->sq.queue[wq->sq.size].status.host_wq_pidx; in t4_sq_host_wq_pidx()
435 return wq->sq.size * T4_SQ_NUM_SLOTS; in t4_sq_wq_size()
463 __func__, wq->sq.pidx); in t4_ring_sq_db()
464 pio_copy(wq->sq.udb + 7, (void *)wqe); in t4_ring_sq_db()
467 __func__, wq->sq.pidx); in t4_ring_sq_db()
468 writel(PIDX_T5_V(inc), wq->sq.udb); in t4_ring_sq_db()
475 writel(QID_V(wq->sq.qid) | PIDX_V(inc), wq->db); in t4_ring_sq_db()