Lines Matching refs:acc_queue
456 gt->usm.acc_queue[i].gt = gt;
457 spin_lock_init(>->usm.acc_queue[i].lock);
458 INIT_WORK(>->usm.acc_queue[i].worker, acc_queue_work_func);
493 spin_lock(>->usm.acc_queue[i].lock);
494 gt->usm.acc_queue[i].head = 0;
495 gt->usm.acc_queue[i].tail = 0;
496 spin_unlock(>->usm.acc_queue[i].lock);
599 static bool get_acc(struct acc_queue *acc_queue, struct acc *acc)
604 spin_lock(&acc_queue->lock);
605 if (acc_queue->tail != acc_queue->head) {
607 (acc_queue->data + acc_queue->tail);
620 acc_queue->tail = (acc_queue->tail + ACC_MSG_LEN_DW) %
624 spin_unlock(&acc_queue->lock);
631 struct acc_queue *acc_queue = container_of(w, struct acc_queue, worker);
632 struct xe_gt *gt = acc_queue->gt;
640 while (get_acc(acc_queue, &acc)) {
648 acc_queue->tail != acc_queue->head) {
655 static bool acc_queue_full(struct acc_queue *acc_queue)
657 lockdep_assert_held(&acc_queue->lock);
659 return CIRC_SPACE(acc_queue->head, acc_queue->tail, ACC_QUEUE_NUM_DW) <=
666 struct acc_queue *acc_queue;
679 acc_queue = >->usm.acc_queue[asid % NUM_ACC_QUEUE];
681 spin_lock(&acc_queue->lock);
682 full = acc_queue_full(acc_queue);
684 memcpy(acc_queue->data + acc_queue->head, msg,
686 acc_queue->head = (acc_queue->head + len) % ACC_QUEUE_NUM_DW;
687 queue_work(gt->usm.acc_wq, &acc_queue->worker);
691 spin_unlock(&acc_queue->lock);