video/rockchip: rga2: Fix some errors.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com> Change-Id: I2bc574f6423da23d44a0b5361e216854636d83a0
This commit is contained in:
@@ -2032,7 +2032,9 @@ static void RGA2_flush_page(void)
|
||||
reg = list_entry(rga2_service.running.prev,
|
||||
struct rga2_reg, status_link);
|
||||
|
||||
if (reg == NULL && reg->MMU_base == NULL)
|
||||
if (reg == NULL)
|
||||
return;
|
||||
if (reg->MMU_base == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < reg->MMU_count; i++)
|
||||
|
||||
@@ -556,8 +556,10 @@ static int rga2_mmu_flush_cache(struct rga2_reg *reg, struct rga2_req *req)
|
||||
DstPageCount = 0;
|
||||
DstStart = 0;
|
||||
|
||||
if (reg->MMU_map != true)
|
||||
if (reg->MMU_map != true) {
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* cal dst buf mmu info */
|
||||
if (req->mmu_info.dst_mmu_flag & 1) {
|
||||
@@ -589,6 +591,7 @@ static int rga2_mmu_flush_cache(struct rga2_reg *reg, struct rga2_req *req)
|
||||
mutex_unlock(&rga2_service.lock);
|
||||
if (DstMemSize) {
|
||||
if (req->sg_dst) {
|
||||
status = -EINVAL;
|
||||
goto out;
|
||||
} else {
|
||||
ret = rga2_MapUserMemory(&pages[0],
|
||||
@@ -1128,6 +1131,8 @@ static int rga2_mmu_info_update_patten_buff_mode(struct rga2_reg *reg, struct rg
|
||||
pages = rga2_mmu_buf.pages;
|
||||
|
||||
MMU_Base = kzalloc(AllSize * sizeof(uint32_t), GFP_KERNEL);
|
||||
if (MMU_Base == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
for(i=0; i<CMDMemSize; i++) {
|
||||
MMU_Base[i] = virt_to_phys((uint32_t *)((CMDStart + i) << PAGE_SHIFT));
|
||||
|
||||
Reference in New Issue
Block a user