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

Commit 73f713fd authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: common: Enable flash operation at EOF" into camera-kernel.lnx.4.0

parents 91a37fd0 96a10ecb
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -558,6 +558,8 @@ static void __cam_req_mgr_flush_req_slot(
	in_q->rd_idx = 0;
	link->trigger_cnt[0] = 0;
	link->trigger_cnt[1] = 0;
	link->trigger_mask = 0;
	link->subscribe_event &= ~CAM_TRIGGER_POINT_EOF;
}

/**
@@ -811,12 +813,6 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
			continue;
		}

		if (slot->ops.apply_at_eof && slot->ops.skip_next_frame) {
			CAM_ERR(CAM_CRM,
				"Both EOF and SOF trigger is not supported");
			return -EINVAL;
		}

		if (dev->dev_hdl != slot->ops.dev_hdl) {
			CAM_DBG(CAM_CRM,
				"Dev_hdl : %d Not matched:: Expected dev_hdl: %d",
@@ -2586,8 +2582,7 @@ int cam_req_mgr_process_add_req(void *priv, void *data)
			(add_req->skip_before_applying & 0xFF));
	}

	/* Used when Precise Flash is enabled */
	if ((add_req->trigger_eof) && (!add_req->skip_before_applying)) {
	if (add_req->trigger_eof) {
		slot->ops.apply_at_eof = true;
		slot->ops.dev_hdl = add_req->dev_hdl;
		CAM_DBG(CAM_REQ,
+3 −6
Original line number Diff line number Diff line
@@ -1546,12 +1546,9 @@ int cam_flash_pmic_pkt_parser(struct cam_flash_ctrl *fctrl, void *arg)

			CAM_DBG(CAM_FLASH,
				"FLASH_CMD_TYPE op:%d", flash_data->opcode);
			if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_OFF)
				add_req.skip_before_applying |= SKIP_NEXT_FRAME;

			if (flash_data->opcode ==
				CAMERA_SENSOR_FLASH_OP_FIREDURATION) {
				add_req.trigger_eof = true;
				/* Active time for the preflash */
				flash_data->flash_active_time_ms =
				(flash_operation_info->time_on_duration_ns)
@@ -1748,12 +1745,12 @@ int cam_flash_pmic_pkt_parser(struct cam_flash_ctrl *fctrl, void *arg)

		if ((csl_packet->header.op_code & 0xFFFFF) ==
			CAM_FLASH_PACKET_OPCODE_SET_OPS) {
			add_req.skip_before_applying |= SKIP_NEXT_FRAME;
			add_req.trigger_eof = true;

			if ((flash_data->opcode !=
				CAMERA_SENSOR_FLASH_OP_FIREDURATION))
				add_req.skip_before_applying |= 1;
			else if (flash_data->opcode ==
				CAMERA_SENSOR_FLASH_OP_FIREDURATION)
				add_req.trigger_eof = true;
			else
				add_req.skip_before_applying = 0;
		} else {