Lines Matching full:gmi

177 			 struct gdma_mem_info *gmi)  in mana_gd_alloc_memory()  argument
185 gmi->dev = gc->dev; in mana_gd_alloc_memory()
186 buf = dma_alloc_coherent(gmi->dev, length, &dma_handle, GFP_KERNEL); in mana_gd_alloc_memory()
190 gmi->dma_handle = dma_handle; in mana_gd_alloc_memory()
191 gmi->virt_addr = buf; in mana_gd_alloc_memory()
192 gmi->length = length; in mana_gd_alloc_memory()
197 void mana_gd_free_memory(struct gdma_mem_info *gmi) in mana_gd_free_memory() argument
199 dma_free_coherent(gmi->dev, gmi->length, gmi->virt_addr, in mana_gd_free_memory()
200 gmi->dma_handle); in mana_gd_free_memory()
658 struct gdma_mem_info *gmi; in mana_gd_create_hwc_queue() local
666 gmi = &queue->mem_info; in mana_gd_create_hwc_queue()
667 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_hwc_queue()
673 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_hwc_queue()
690 mana_gd_free_memory(gmi); in mana_gd_create_hwc_queue()
721 struct gdma_mem_info *gmi) in mana_gd_create_dma_region() argument
723 unsigned int num_page = gmi->length / PAGE_SIZE; in mana_gd_create_dma_region()
728 u32 length = gmi->length; in mana_gd_create_dma_region()
736 if (offset_in_page(gmi->virt_addr) != 0) in mana_gd_create_dma_region()
757 req->page_addr_list[i] = gmi->dma_handle + i * PAGE_SIZE; in mana_gd_create_dma_region()
771 gmi->dma_region_handle = resp.dma_region_handle; in mana_gd_create_dma_region()
782 struct gdma_mem_info *gmi; in mana_gd_create_mana_eq() local
793 gmi = &queue->mem_info; in mana_gd_create_mana_eq()
794 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_mana_eq()
798 err = mana_gd_create_dma_region(gd, gmi); in mana_gd_create_mana_eq()
804 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_mana_eq()
817 mana_gd_free_memory(gmi); in mana_gd_create_mana_eq()
828 struct gdma_mem_info *gmi; in mana_gd_create_mana_wq_cq() local
840 gmi = &queue->mem_info; in mana_gd_create_mana_wq_cq()
841 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_mana_wq_cq()
845 err = mana_gd_create_dma_region(gd, gmi); in mana_gd_create_mana_wq_cq()
851 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_mana_wq_cq()
863 mana_gd_free_memory(gmi); in mana_gd_create_mana_wq_cq()
871 struct gdma_mem_info *gmi = &queue->mem_info; in mana_gd_destroy_queue() local
894 mana_gd_destroy_dma_region(gc, gmi->dma_region_handle); in mana_gd_destroy_queue()
895 mana_gd_free_memory(gmi); in mana_gd_destroy_queue()