Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64866dc4 authored by satyavaraprasad yerramsetti's avatar satyavaraprasad yerramsetti
Browse files

msm: camera_v2: Don't touch CCI if camera daemon crashed.



If daemon crashes, refrain from writing to the CCI. This is needed
because these writes will not wait in a process crash scenario and can
potentially leave the CCI in a bad state.

Change-Id: Ic523c7e6c5ca891a322b8219234d8f04515394f3
Signed-off-by: default avatarSatyavaraprasad Yerramsetti <satyav@codeaurora.org>
parent 06300feb
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -879,10 +879,7 @@ static long msm_cci_subdev_ioctl(struct v4l2_subdev *sd,
		rc = msm_cci_config(sd, arg);
		break;
	case MSM_SD_SHUTDOWN: {
		struct msm_camera_cci_ctrl ctrl_cmd;
		ctrl_cmd.cmd = MSM_CCI_RELEASE;
		rc = msm_cci_config(sd, &ctrl_cmd);
		break;
		return rc;
	}
	default:
		rc = -ENOIOCTLCMD;
+2 −1
Original line number Diff line number Diff line
@@ -1272,9 +1272,10 @@ static long msm_sensor_subdev_ioctl(struct v4l2_subdev *sd,
	case VIDIOC_MSM_SENSOR_GET_AF_STATUS:
		return msm_sensor_get_af_status(s_ctrl, argp);
	case VIDIOC_MSM_SENSOR_RELEASE:
	case MSM_SD_SHUTDOWN:
		msm_sensor_stop_stream(s_ctrl);
		return 0;
	case MSM_SD_SHUTDOWN:
		return 0;
	default:
		return -ENOIOCTLCMD;
	}