Ver código fonte

msm: camera: cci: Make cci can be realesed when cci status is negative

Make MSM_CCI_RELEASE command can be executed even if CCI status is
negative. When IIC meets NACK error, CCI status will be set to
negative state. But in function cam_cci_core_cfg, if CCI status is
negative, then the command will not be executed, and the return value
of function camera_io_release is never checked, so we do nothing
even if cam_cci_release is not executed, if all MSM_CCI_INIT cmd
is executed successfully but one or more MSM_CCI_RELEASE cmd is not
executed, the streamon_clients of cpas will never be reduced to 0
and cpas will never be powered off.

CRs-Fixed: 3316756
Change-Id: I7f3d8d4e604f5a41983f1419ccc8b5817b199740
Signed-off-by: mingpan <[email protected]>
mingpan 2 anos atrás
pai
commit
9ce2d9e82a
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/cam_sensor_module/cam_cci/cam_cci_core.c

+ 1 - 1
drivers/cam_sensor_module/cam_cci/cam_cci_core.c

@@ -1964,7 +1964,7 @@ int32_t cam_cci_core_cfg(struct v4l2_subdev *sd,
 		return -EINVAL;
 	}
 
-	if (cci_dev->cci_master_info[master].status < 0) {
+	if ((cci_dev->cci_master_info[master].status < 0) && (cci_ctrl->cmd != MSM_CCI_RELEASE)) {
 		CAM_WARN(CAM_CCI, "CCI hardware is resetting");
 		return -EAGAIN;
 	}