diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-03-13 11:49:58 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-13 11:49:58 -0700 |
commit | e1e51328248bf865a753b10561f8ef0ef0db08ad (patch) | |
tree | a74da6fea93b4d4b7d1163e99721d7154c043755 | |
parent | b09bf7ca5dbfc0d8a408da09ba2656fa3a100ab1 (diff) | |
parent | 9f07864f8193441e2510caaab47804e9fae4cfa3 (diff) |
Merge "msm: camera: Remove exit on error conditions for smmu apis"
-rw-r--r-- | drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c index a0f1d5148c94..01b8e0878ea9 100644 --- a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c +++ b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c @@ -894,8 +894,13 @@ static int cam_smmu_attach_sec_cpp(int idx) rc = msm_camera_tz_set_mode(MSM_CAMERA_TZ_MODE_SECURE, MSM_CAMERA_TZ_HW_BLOCK_CPP); if (rc != 0) { - pr_err("fail to set secure mode for cpp, rc %d", rc); - return rc; + pr_err("secure mode TA notification for cpp unsuccessful, rc %d\n", + rc); + /* + * Although the TA notification failed, the flow should proceed + * without returning an error as at this point cpp had already + * entered the secure mode. + */ } iommu_cb_set.cb_info[idx].state = CAM_SMMU_ATTACH; @@ -910,8 +915,13 @@ static int cam_smmu_detach_sec_cpp(int idx) rc = msm_camera_tz_set_mode(MSM_CAMERA_TZ_MODE_NON_SECURE, MSM_CAMERA_TZ_HW_BLOCK_CPP); if (rc != 0) { - pr_err("fail to switch to non secure mode for cpp, rc %d", rc); - return rc; + pr_err("secure mode TA notification for cpp unsuccessful, rc %d\n", + rc); + /* + * Although the TA notification failed, the flow should proceed + * without returning an error, as at this point cpp is in secure + * mode and should be switched to non-secure regardless + */ } iommu_cb_set.cb_info[idx].state = CAM_SMMU_DETACH; @@ -950,8 +960,13 @@ static int cam_smmu_attach_sec_vfe_ns_stats(int idx) rc = msm_camera_tz_set_mode(MSM_CAMERA_TZ_MODE_SECURE, MSM_CAMERA_TZ_HW_BLOCK_ISP); if (rc != 0) { - pr_err("fail to set secure mode for vfe, rc %d", rc); - return rc; + pr_err("secure mode TA notification for vfe unsuccessful, rc %d\n", + rc); + /* + * Although the TA notification failed, the flow should proceed + * without returning an error as at this point vfe had already + * entered the secure mode + */ } return 0; @@ -964,8 +979,13 @@ static int cam_smmu_detach_sec_vfe_ns_stats(int idx) rc = msm_camera_tz_set_mode(MSM_CAMERA_TZ_MODE_NON_SECURE, MSM_CAMERA_TZ_HW_BLOCK_ISP); if (rc != 0) { - pr_err("fail to switch to non secure mode for vfe, rc %d", rc); - return rc; + pr_err("secure mode TA notification for vfe unsuccessful, rc %d\n", + rc); + /* + * Although the TA notification failed, the flow should proceed + * without returning an error, as at this point vfe is in secure + * mode and should be switched to non-secure regardless + */ } /* |