Lines Matching refs:q_depth
357 static int mana_hwc_create_cq(struct hw_channel_context *hwc, u16 q_depth, in mana_hwc_create_cq() argument
370 eq_size = roundup_pow_of_two(GDMA_EQE_SIZE * q_depth); in mana_hwc_create_cq()
374 cq_size = roundup_pow_of_two(GDMA_CQE_SIZE * q_depth); in mana_hwc_create_cq()
397 comp_buf = kcalloc(q_depth, sizeof(*comp_buf), GFP_KERNEL); in mana_hwc_create_cq()
405 hwc_cq->queue_depth = q_depth; in mana_hwc_create_cq()
418 static int mana_hwc_alloc_dma_buf(struct hw_channel_context *hwc, u16 q_depth, in mana_hwc_alloc_dma_buf() argument
432 dma_buf = kzalloc(struct_size(dma_buf, reqs, q_depth), GFP_KERNEL); in mana_hwc_alloc_dma_buf()
436 dma_buf->num_reqs = q_depth; in mana_hwc_alloc_dma_buf()
438 buf_size = MANA_PAGE_ALIGN(q_depth * max_msg_size); in mana_hwc_alloc_dma_buf()
450 for (i = 0; i < q_depth; i++) { in mana_hwc_alloc_dma_buf()
490 enum gdma_queue_type q_type, u16 q_depth, in mana_hwc_create_wq() argument
502 queue_size = roundup_pow_of_two(GDMA_MAX_RQE_SIZE * q_depth); in mana_hwc_create_wq()
504 queue_size = roundup_pow_of_two(GDMA_MAX_SQE_SIZE * q_depth); in mana_hwc_create_wq()
519 hwc_wq->queue_depth = q_depth; in mana_hwc_create_wq()
522 err = mana_hwc_alloc_dma_buf(hwc, q_depth, max_msg_size, in mana_hwc_create_wq()
593 static int mana_hwc_test_channel(struct hw_channel_context *hwc, u16 q_depth, in mana_hwc_test_channel() argument
604 for (i = 0; i < q_depth; i++) { in mana_hwc_test_channel()
611 ctx = kcalloc(q_depth, sizeof(*ctx), GFP_KERNEL); in mana_hwc_test_channel()
615 for (i = 0; i < q_depth; ++i) in mana_hwc_test_channel()
623 static int mana_hwc_establish_channel(struct gdma_context *gc, u16 *q_depth, in mana_hwc_establish_channel() argument
648 *q_depth = hwc->hwc_init_q_depth_max; in mana_hwc_establish_channel()
665 static int mana_hwc_init_queues(struct hw_channel_context *hwc, u16 q_depth, in mana_hwc_init_queues() argument
670 err = mana_hwc_init_inflight_msg(hwc, q_depth); in mana_hwc_init_queues()
677 err = mana_hwc_create_cq(hwc, q_depth * 2, in mana_hwc_init_queues()
686 err = mana_hwc_create_wq(hwc, GDMA_RQ, q_depth, max_req_msg_size, in mana_hwc_init_queues()
693 err = mana_hwc_create_wq(hwc, GDMA_SQ, q_depth, max_resp_msg_size, in mana_hwc_init_queues()
700 hwc->num_inflight_msg = q_depth; in mana_hwc_init_queues()