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

Commit 607ef760 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: flash: Remove wrong bubble condition check" into dev/msm-4.14-camx

parents 8da9ea1d ae66c60d
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -521,8 +521,14 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl,
					"Flash off failed %d", rc);
				goto apply_setting_err;
			}
		} else if (flash_data->opcode == CAM_PKT_NOP_OPCODE) {
			flash_data->opcode = 0;
			CAM_DBG(CAM_FLASH, "NOP Packet");
		} else {
			CAM_DBG(CAM_FLASH, "NOP opcode: req_id: %u", req_id);
			rc = -EINVAL;
			CAM_ERR(CAM_FLASH, "Invalid opcode: %d req_id: %llu",
				flash_data->opcode, req_id);
			goto apply_setting_err;
		}
	}

@@ -807,17 +813,20 @@ int cam_flash_parser(struct cam_flash_ctrl *fctrl, void *arg)
		break;
	}
	case CAM_PKT_NOP_OPCODE: {
		frm_offset = csl_packet->header.request_id %
			MAX_PER_FRAME_ARRAY;
		if ((fctrl->flash_state == CAM_FLASH_STATE_INIT) ||
			(fctrl->flash_state == CAM_FLASH_STATE_ACQUIRE)) {
			CAM_WARN(CAM_FLASH,
				"Rxed NOP packets without linking");
			frm_offset = csl_packet->header.request_id %
				MAX_PER_FRAME_ARRAY;
			fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid
				= false;
			return 0;
		}

		fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid = false;
		fctrl->per_frame[frm_offset].cmn_attr.request_id = 0;
		fctrl->per_frame[frm_offset].opcode = CAM_PKT_NOP_OPCODE;
		CAM_DBG(CAM_FLASH, "NOP Packet is Received: req_id: %u",
			csl_packet->header.request_id);
		goto update_req_mgr;
@@ -967,19 +976,15 @@ int cam_flash_apply_request(struct cam_req_mgr_apply_request *apply)
	fctrl = (struct cam_flash_ctrl *) cam_get_device_priv(apply->dev_hdl);
	if (!fctrl) {
		CAM_ERR(CAM_FLASH, "Device data is NULL");
		rc = -EINVAL;
		goto free_resource;
		return -EINVAL;
	}

	if (!(apply->report_if_bubble)) {
	mutex_lock(&fctrl->flash_wq_mutex);
	rc = cam_flash_apply_setting(fctrl, apply->request_id);
	if (rc)
		CAM_ERR(CAM_FLASH, "apply_setting failed with rc=%d",
			rc);
	mutex_unlock(&fctrl->flash_wq_mutex);
	}

free_resource:
	return rc;
}
+4 −4
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ struct cam_flash_intf_params {
 */
struct cam_flash_common_attr {
	bool      is_settings_valid;
	int32_t  request_id;
	uint64_t  request_id;
	uint16_t  count;
	uint8_t   cmd_type;
};