From 61072dd4e2502a254033878ad965d8e577543c2d Mon Sep 17 00:00:00 2001 From: zsq Date: Thu, 6 Mar 2014 17:54:57 +0800 Subject: [PATCH] fix rga copy DMA_buf error --- drivers/video/rockchip/rga/rga_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/rockchip/rga/rga_drv.c b/drivers/video/rockchip/rga/rga_drv.c index 1faaf3b86f6b..c2f4a2ccc2f2 100755 --- a/drivers/video/rockchip/rga/rga_drv.c +++ b/drivers/video/rockchip/rga/rga_drv.c @@ -798,7 +798,7 @@ static int rga_convert_dma_buf(struct rga_req *req) ion_phys_addr_t phy_addr; size_t len; - if(!req->src.yrgb_addr) { + if(req->src.yrgb_addr) { if (copy_from_user(&usr_fd, &req->src.yrgb_addr, sizeof(usr_fd))) return -EFAULT; hdl = ion_import_dma_buf(drvdata->ion_client, usr_fd); @@ -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); } - if(!req->dst.yrgb_addr) { + if(req->dst.yrgb_addr) { if (copy_from_user(&usr_fd, &req->dst.yrgb_addr, sizeof(usr_fd))) return -EFAULT; hdl = ion_import_dma_buf(drvdata->ion_client, usr_fd); -- 2.34.1