video: rockchip: mpp: rkvdec2: fix pagefault on start

Fix pagefault on decoder first task.

[  151.797045][    C0] rk_iommu fdc38700.iommu: Page fault at 0x00000000fefc0000 of type write
[  151.797071][    C0] rk_iommu fdc38700.iommu: iova = 0x00000000fefc0000: dte_index: 0x3fb pte_index: 0x3c0 page_offset: 0x0
[  151.797080][    C0] rk_iommu fdc38700.iommu: mmu_dte_addr: 0x0000000000305000 dte@0x0000000000305fec: 0x34f001 valid: 1 pte@0x000000000034ff00: 0x77aec407 valid: 1 page@0x0000000477aec000 flags: 0x6
[  151.797088][    C0] mpp_rkvdec2 fdc38100.rkvdec: fault addr 0xfefc0000 status 6b
[  151.797094][    C0] rk_vcodec: mpp_task_dump_mem_region:1654: --- dump mem region ---

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I991d86c931cdd07df85a6458cf1351c68ce87007
This commit is contained in:
Herman Chen
2021-12-14 08:43:41 +08:00
committed by Tao Huang
parent 99582ba73a
commit e026e105c8

View File

@@ -302,6 +302,10 @@ static int rkvdec2_run(struct mpp_dev *mpp, struct mpp_task *mpp_task)
e = s + req->size / sizeof(u32);
mpp_write_req(mpp, task->reg, s, e, reg_en);
}
/* flush tlb before starting hardware */
mpp_iommu_flush_tlb(mpp->iommu_info);
/* init current task */
mpp->cur_task = mpp_task;
/* Flush the register before the start the device */