From: zsq Date: Thu, 6 Mar 2014 09:54:57 +0000 (+0800) Subject: fix rga copy DMA_buf error X-Git-Tag: firefly_0821_release~6177 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61072dd4e2502a254033878ad965d8e577543c2d;p=firefly-linux-kernel-4.4.55.git fix rga copy DMA_buf error --- 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);