Lines Matching refs:gmi

180 			 struct gdma_mem_info *gmi)  in mana_gd_alloc_memory()  argument
188 gmi->dev = gc->dev; in mana_gd_alloc_memory()
189 buf = dma_alloc_coherent(gmi->dev, length, &dma_handle, GFP_KERNEL); in mana_gd_alloc_memory()
193 gmi->dma_handle = dma_handle; in mana_gd_alloc_memory()
194 gmi->virt_addr = buf; in mana_gd_alloc_memory()
195 gmi->length = length; in mana_gd_alloc_memory()
200 void mana_gd_free_memory(struct gdma_mem_info *gmi) in mana_gd_free_memory() argument
202 dma_free_coherent(gmi->dev, gmi->length, gmi->virt_addr, in mana_gd_free_memory()
203 gmi->dma_handle); in mana_gd_free_memory()
656 struct gdma_mem_info *gmi; in mana_gd_create_hwc_queue() local
664 gmi = &queue->mem_info; in mana_gd_create_hwc_queue()
665 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_hwc_queue()
671 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_hwc_queue()
688 mana_gd_free_memory(gmi); in mana_gd_create_hwc_queue()
719 struct gdma_mem_info *gmi) in mana_gd_create_dma_region() argument
721 unsigned int num_page = gmi->length / MANA_PAGE_SIZE; in mana_gd_create_dma_region()
726 u32 length = gmi->length; in mana_gd_create_dma_region()
734 if (!MANA_PAGE_ALIGNED(gmi->virt_addr)) in mana_gd_create_dma_region()
755 req->page_addr_list[i] = gmi->dma_handle + i * MANA_PAGE_SIZE; in mana_gd_create_dma_region()
769 gmi->dma_region_handle = resp.dma_region_handle; in mana_gd_create_dma_region()
780 struct gdma_mem_info *gmi; in mana_gd_create_mana_eq() local
791 gmi = &queue->mem_info; in mana_gd_create_mana_eq()
792 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_mana_eq()
796 err = mana_gd_create_dma_region(gd, gmi); in mana_gd_create_mana_eq()
802 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_mana_eq()
815 mana_gd_free_memory(gmi); in mana_gd_create_mana_eq()
827 struct gdma_mem_info *gmi; in mana_gd_create_mana_wq_cq() local
839 gmi = &queue->mem_info; in mana_gd_create_mana_wq_cq()
840 err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); in mana_gd_create_mana_wq_cq()
844 err = mana_gd_create_dma_region(gd, gmi); in mana_gd_create_mana_wq_cq()
850 queue->queue_mem_ptr = gmi->virt_addr; in mana_gd_create_mana_wq_cq()
862 mana_gd_free_memory(gmi); in mana_gd_create_mana_wq_cq()
870 struct gdma_mem_info *gmi = &queue->mem_info; in mana_gd_destroy_queue() local
893 mana_gd_destroy_dma_region(gc, gmi->dma_region_handle); in mana_gd_destroy_queue()
894 mana_gd_free_memory(gmi); in mana_gd_destroy_queue()