Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +15 −3 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -31,6 +31,7 @@ static int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev, bool protect, int32_t offset) { struct scm_desc desc = {0}; int result = -1; if (offset >= CSIPHY_MAX_INSTANCES) return -EINVAL; Loading @@ -38,8 +39,19 @@ static int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev, desc.args[0] = protect; desc.args[1] = csiphy_dev->csiphy_cpas_cp_reg_mask[offset]; if (scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID_2), &desc)) { /* * If SECURE_SYSCALL_ID_2 is not supported * then fallback to SECURE_SYSCALL_ID */ result = scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID_2), &desc); if (result == -EOPNOTSUPP) { desc.args[1] = csiphy_dev->soc_info.index; CAM_ERR(CAM_CSIPHY, "SCM CALL 7 not supported fallback to 6"); result = scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID), &desc); } if (result) { CAM_ERR(CAM_CSIPHY, "scm call to hypervisor failed"); return -EINVAL; } Loading Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +15 −3 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -31,6 +31,7 @@ static int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev, bool protect, int32_t offset) { struct scm_desc desc = {0}; int result = -1; if (offset >= CSIPHY_MAX_INSTANCES) return -EINVAL; Loading @@ -38,8 +39,19 @@ static int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev, desc.args[0] = protect; desc.args[1] = csiphy_dev->csiphy_cpas_cp_reg_mask[offset]; if (scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID_2), &desc)) { /* * If SECURE_SYSCALL_ID_2 is not supported * then fallback to SECURE_SYSCALL_ID */ result = scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID_2), &desc); if (result == -EOPNOTSUPP) { desc.args[1] = csiphy_dev->soc_info.index; CAM_ERR(CAM_CSIPHY, "SCM CALL 7 not supported fallback to 6"); result = scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID), &desc); } if (result) { CAM_ERR(CAM_CSIPHY, "scm call to hypervisor failed"); return -EINVAL; } Loading