From 8cac568d1a0d3e5176c8e50fe22c6a17cbb010f1 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 18 Apr 2014 09:56:16 +0800 Subject: [PATCH] rk3288: vcodec iommu support, fix unmap bug --- arch/arm/mach-rockchip/vcodec_service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/vcodec_service.c b/arch/arm/mach-rockchip/vcodec_service.c index 068029e6924c..0c340d4fcb4b 100755 --- a/arch/arm/mach-rockchip/vcodec_service.c +++ b/arch/arm/mach-rockchip/vcodec_service.c @@ -623,6 +623,8 @@ static int vcodec_bufid_to_iova(struct vpu_service_info *pservice, u8 *tbl, int return -1; } + vpu_service_power_on(pservice); + for (i=0; ireg[addr_tbl_vpu_dec[i]], sizeof(usr_fd))) @@ -663,7 +665,9 @@ static int vcodec_bufid_to_iova(struct vpu_service_info *pservice, u8 *tbl, int return -1; } - ret = ion_map_iommu(pservice->dev, pservice->ion_client, hdl, &mem_region->iova, &mem_region->len); + mem_region->hdl = hdl; + + ret = ion_map_iommu(pservice->dev, pservice->ion_client, mem_region->hdl, &mem_region->iova, &mem_region->len); if (ret < 0) { dev_err(pservice->dev, "ion map iommu failed\n"); kfree(mem_region); -- 2.34.1