ion_phys_addr_t phy_addr;\r
size_t len;\r
int ret;\r
- \r
- #ifdef CONFIG_RGA_IOMMU\r
+\r
req->sg_src0 = NULL;\r
req->sg_src1 = NULL;\r
req->sg_dst = NULL;\r
req->sg_els = NULL;\r
- #endif\r
\r
if(req->src.yrgb_addr) {\r
hdl = ion_import_dma_buf(rga2_drvdata->ion_client, req->src.yrgb_addr);\r
printk("RGA2 ERROR ion buf handle\n");\r
return ret;\r
}\r
- #ifdef CONFIG_RGA_IOMMU\r
if (req->mmu_info.src0_mmu_flag) {\r
req->sg_src0 = ion_sg_table(rga2_drvdata->ion_client, hdl);\r
req->src.yrgb_addr = req->src.uv_addr;\r
req->src.uv_addr = req->src.yrgb_addr + (req->src.vir_w * req->src.vir_h);\r
req->src.v_addr = req->src.uv_addr + (req->src.vir_w * req->src.vir_h)/4;\r
}\r
- #else\r
- ion_phys(rga2_drvdata->ion_client, hdl, &phy_addr, &len);\r
- req->src.yrgb_addr = phy_addr;\r
- req->src.uv_addr = req->src.yrgb_addr + (req->src.vir_w * req->src.vir_h);\r
- req->src.v_addr = req->src.uv_addr + (req->src.vir_w * req->src.vir_h)/4;\r
- #endif\r
ion_free(rga2_drvdata->ion_client, hdl);\r
}\r
else {\r
printk("RGA2 ERROR ion buf handle\n");\r
return ret;\r
}\r
- #ifdef CONFIG_RGA_IOMMU\r
if (req->mmu_info.dst_mmu_flag) {\r
req->sg_dst = ion_sg_table(rga2_drvdata->ion_client, hdl);\r
req->dst.yrgb_addr = req->dst.uv_addr;\r
req->dst.uv_addr = req->dst.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
req->dst.v_addr = req->dst.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
}\r
- #else\r
- ion_phys(rga2_drvdata->ion_client, hdl, &phy_addr, &len);\r
- req->dst.yrgb_addr = phy_addr;\r
- req->dst.uv_addr = req->dst.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
- req->dst.v_addr = req->dst.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
- #endif\r
ion_free(rga2_drvdata->ion_client, hdl);\r
}\r
else {\r
printk("RGA2 ERROR ion buf handle\n");\r
return ret;\r
}\r
- #ifdef CONFIG_RGA_IOMMU\r
if (req->mmu_info.dst_mmu_flag) {\r
req->sg_src1 = ion_sg_table(rga2_drvdata->ion_client, hdl);\r
req->src1.yrgb_addr = 0;\r
req->src1.uv_addr = req->dst.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
req->src1.v_addr = req->dst.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
}\r
- #else\r
- ion_phys(rga2_drvdata->ion_client, hdl, &phy_addr, &len);\r
- req->src1.yrgb_addr = phy_addr;\r
- req->src1.uv_addr = req->dst.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
- req->src1.v_addr = req->dst.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
- #endif\r
ion_free(rga2_drvdata->ion_client, hdl);\r
}\r
else {\r