fix rga 2 compile bug
authorzsq <zsq@rock-chips.com>
Thu, 5 Jun 2014 11:10:15 +0000 (19:10 +0800)
committerzsq <zsq@rock-chips.com>
Thu, 5 Jun 2014 11:10:15 +0000 (19:10 +0800)
drivers/video/rockchip/rga2/rga2.h
drivers/video/rockchip/rga2/rga2_drv.c

index 799365e7ca54134f804434bbeb35819f17b0aea0..d67cba9ef9dca5d1774c08ed666aef552236871a 100644 (file)
@@ -449,12 +449,10 @@ struct rga2_req
 \r
     u8 rgb2yuv_mode;\r
 \r
-    #if defined(CONFIG_ROCKCHIP_IOMMU) & defined(CONFIG_ION_ROCKCHIP)\r
     struct sg_table *sg_src0;\r
     struct sg_table *sg_src1;\r
     struct sg_table *sg_dst;\r
     struct sg_table *sg_els;\r
-    #endif\r
 };\r
 \r
 struct rga2_mmu_buf_t {\r
index e57006910fe00b863a425c6db44d175278b6ef70..d739a8a5c988c919fd01042939ce5adc46837f74 100755 (executable)
@@ -545,7 +545,6 @@ static void rga2_try_set_reg(void)
 \r
             rga2_power_on();\r
             udelay(1);\r
-            //mdelay(500);\r
 \r
             rga2_copy_reg(reg, 0);\r
             rga2_reg_from_wait_to_run(reg);\r
@@ -688,10 +687,13 @@ 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
     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
@@ -782,7 +784,7 @@ static int rga2_convert_dma_buf(struct rga2_req *req)
             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
+       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