fix rga copy DMA_buf error
authorzsq <zsq@rock-chips.com>
Thu, 6 Mar 2014 09:54:57 +0000 (17:54 +0800)
committerzsq <zsq@rock-chips.com>
Thu, 6 Mar 2014 09:54:57 +0000 (17:54 +0800)
drivers/video/rockchip/rga/rga_drv.c

index 1faaf3b86f6ba92ca53ef920f6fe85e20b109fb0..c2f4a2ccc2f2885331c199aa1ccaf115f3bb1a00 100755 (executable)
@@ -798,7 +798,7 @@ static int rga_convert_dma_buf(struct rga_req *req)
        ion_phys_addr_t phy_addr;\r
        size_t len;\r
 \r
-    if(!req->src.yrgb_addr) {\r
+    if(req->src.yrgb_addr) {\r
         if (copy_from_user(&usr_fd, &req->src.yrgb_addr, sizeof(usr_fd)))\r
             return -EFAULT;\r
         hdl = ion_import_dma_buf(drvdata->ion_client, usr_fd);\r
@@ -812,7 +812,7 @@ static int rga_convert_dma_buf(struct rga_req *req)
         req->src.uv_addr = req->src.yrgb_addr + (req->src.vir_w * req->src.vir_h);\r
     }\r
 \r
-    if(!req->dst.yrgb_addr) {\r
+    if(req->dst.yrgb_addr) {\r
         if (copy_from_user(&usr_fd, &req->dst.yrgb_addr, sizeof(usr_fd)))\r
             return -EFAULT;\r
         hdl = ion_import_dma_buf(drvdata->ion_client, usr_fd);\r