}\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.uv_addr = req->src.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
+ req->src.v_addr = req->src.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
ion_free(rga2_drvdata->ion_client, hdl);\r
}\r
else {\r
req->src.yrgb_addr = req->src.uv_addr;\r
- req->src.uv_addr = req->src.yrgb_addr + (req->src.vir_w * req->src.vir_h);\r
+ req->src.uv_addr = req->src.yrgb_addr + (req->dst.vir_w * req->dst.vir_h);\r
+ req->src.v_addr = req->src.uv_addr + (req->dst.vir_w * req->dst.vir_h)/4;\r
}\r
\r
if(req->dst.yrgb_addr) {\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
ion_free(rga2_drvdata->ion_client, hdl);\r
}\r
else {\r
req->dst.yrgb_addr = req->dst.uv_addr;\r
- req->dst.uv_addr = req->dst.yrgb_addr + (req->src.vir_w * req->src.vir_h);\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
}\r
\r
return 0;\r
}\r
\r
*bRGA_DST_BASE0 = (RK_U32)yrgb_addr;\r
- *bRGA_DST_BASE1 = (RK_U32)u_addr;\r
- *bRGA_DST_BASE2 = (RK_U32)v_addr;\r
+\r
+ if((msg->dst.format == RGA2_FORMAT_YCbCr_420_P) || (msg->dst.format == RGA2_FORMAT_YCrCb_420_P))\r
+ {\r
+ if(dst_cbcr_swp == 0) {\r
+ *bRGA_DST_BASE1 = (RK_U32)v_addr;\r
+ *bRGA_DST_BASE2 = (RK_U32)u_addr;\r
+ }\r
+ else {\r
+ *bRGA_DST_BASE1 = (RK_U32)u_addr;\r
+ *bRGA_DST_BASE2 = (RK_U32)v_addr;\r
+ }\r
+ }\r
+ else {\r
+ *bRGA_DST_BASE1 = (RK_U32)u_addr;\r
+ *bRGA_DST_BASE2 = (RK_U32)v_addr;\r
+ }\r
+\r
*bRGA_SRC_BASE3 = (RK_U32)s_y_lt_addr;\r
}\r
\r