#define make_u64(hi__, low__) ((u64)(hi__) << 32 | (u64)(low__))
+#define ACC_MSG_LEN_DW 4
+
static int get_acc(struct acc_queue *acc_queue, struct acc *acc)
{
const struct xe_guc_acc_desc *desc;
acc->access_type = FIELD_GET(ACC_TYPE, desc->dw0);
acc->va_range_base = make_u64(desc->dw3 & ACC_VIRTUAL_ADDR_RANGE_HI,
desc->dw2 & ACC_VIRTUAL_ADDR_RANGE_LO);
+
+ acc_queue->head = (acc_queue->head + ACC_MSG_LEN_DW) %
+ ACC_QUEUE_NUM_DW;
} else {
ret = -1;
}
}
}
-#define ACC_MSG_LEN_DW 4
-
static bool acc_queue_full(struct acc_queue *acc_queue)
{
lockdep_assert_held(&acc_queue->lock);