From: ljf Date: Fri, 18 Apr 2014 01:56:16 +0000 (+0800) Subject: rk3288: vcodec iommu support, fix unmap bug X-Git-Tag: firefly_0821_release~5506 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8cac568d1a0d3e5176c8e50fe22c6a17cbb010f1;p=firefly-linux-kernel-4.4.55.git rk3288: vcodec iommu support, fix unmap bug --- 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);