del RGA suppot iommu releate to IOMMU must be open
authorzsq <zsq@rock-chips.com>
Fri, 6 Jun 2014 06:27:51 +0000 (14:27 +0800)
committerzsq <zsq@rock-chips.com>
Fri, 6 Jun 2014 06:27:51 +0000 (14:27 +0800)
drivers/video/rockchip/rga2/rga2_drv.c
drivers/video/rockchip/rga2/rga2_mmu_info.c

index d739a8a5c988c919fd01042939ce5adc46837f74..222109173422dcf4ffd98ccf0540fa1a9a7ae59c 100755 (executable)
@@ -687,13 +687,11 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
        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
@@ -702,7 +700,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
@@ -715,12 +712,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
@@ -736,7 +727,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
@@ -749,12 +739,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
@@ -770,7 +754,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
@@ -783,12 +766,6 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
index 5a75cac8ebe5b9fe80a3552ac969996c5be1d39d..b975f4a73c2f74c762505e0856ceda3e2728cef8 100644 (file)
@@ -409,17 +409,14 @@ static int rga2_MapION(struct sg_table *sg,
 \r
     status = 0;\r
     Address = 0;\r
-    //printk("pageCount=%d\n", pageCount);\r
     do {\r
         len = sg_dma_len(sgl) >> PAGE_SHIFT;\r
         Address = sg_phys(sgl);\r
-        //printk("len = %d\n", len);\r
-        //printk("Address = %.8x\n", Address);\r
+\r
         for(i=0; i<len; i++) {\r
             Memory[mapped_size + i] = Address + (i << PAGE_SHIFT);\r
         }\r
 \r
-        //printk("mapped_size = %d\n", mapped_size);\r
         mapped_size += len;\r
         sg_num += 1;\r
     }\r