msm: vidc: Fix camcorder stability issue
IOMMU detach should be called before subsystem put, otherwise
IOMMU pagefaults are seen sometimes when camcorder session
is stopped.
Change-Id: I2800641fc770df0f2af05ae3f950c09f864c700f
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
index 1b7ecf0..7fda3bd 100644
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
+++ b/drivers/media/platform/msm/vidc/venus_hfi.c
@@ -2672,8 +2672,8 @@
}
if (device->resources.fw.cookie) {
venus_hfi_disable_clks(device);
- subsystem_put(device->resources.fw.cookie);
venus_hfi_iommu_detach(device);
+ subsystem_put(device->resources.fw.cookie);
device->resources.fw.cookie = NULL;
}
}