}\r
}\r
\r
- AllSize = (DstMemSize + 3) & (~3);\r
+ AllSize = (DstMemSize + 15) & (~15);\r
\r
pages = kzalloc((AllSize)* sizeof(struct page *), GFP_KERNEL);\r
if(pages == NULL) {\r
MMU_Base = rga2_mmu_buf.buf_virtual + (rga2_mmu_buf.front & (rga2_mmu_buf.size - 1));\r
mutex_unlock(&rga2_service.lock);\r
\r
- if (DstMemSize)\r
- {\r
- ret = rga2_MapUserMemory(&pages[0], &MMU_Base[0], DstStart, DstMemSize);\r
+ if (DstMemSize) {\r
+ if (req->sg_dst) {\r
+ ret = rga2_MapION(req->sg_dst, &MMU_Base[0], DstMemSize);\r
+ }\r
+ else {\r
+ ret = rga2_MapUserMemory(&pages[0], &MMU_Base[0], DstStart, DstMemSize);\r
+ }\r
if (ret < 0) {\r
pr_err("rga2 map dst memory failed\n");\r
status = ret;\r
}\r
\r
/* change the buf address in req struct */\r
- req->mmu_info.src0_base_addr = (((uint32_t)MMU_Base_phys)>>4);\r
+ req->mmu_info.dst_base_addr = ((uint32_t)MMU_Base_phys);\r
req->dst.yrgb_addr = (req->dst.yrgb_addr & (~PAGE_MASK));\r
}\r
\r