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

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

Merge "msm: camera: cci: Add report id in report command for CCI I2C queue"...

Merge "msm: camera: cci: Add report id in report command for CCI I2C queue" into camera-kernel.lnx.4.0
parents c3f06e4d d2808569
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -104,13 +104,20 @@ static int32_t cam_cci_validate_queue(struct cci_device *cci_dev,
	if ((read_val + len + 1) >
		cci_dev->cci_i2c_queue_info[master][queue].max_queue_size) {
		uint32_t reg_val = 0;
		uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8);
		uint32_t report_id =
			cci_dev->cci_i2c_queue_info[master][queue].report_id;
		uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8) |
			(1 << 9) | (report_id << 4);

		CAM_DBG(CAM_CCI, "CCI_I2C_REPORT_CMD");
		cam_io_w_mb(report_val,
			base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR +
			reg_offset);
		read_val++;
		cci_dev->cci_i2c_queue_info[master][queue].report_id++;
		if (cci_dev->cci_i2c_queue_info[master][queue].report_id == REPORT_IDSIZE)
			cci_dev->cci_i2c_queue_info[master][queue].report_id = 0;

		CAM_DBG(CAM_CCI,
			"CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR %d, queue: %d",
			read_val, queue);
@@ -305,14 +312,22 @@ static void cam_cci_load_report_cmd(struct cci_device *cci_dev,
	uint32_t reg_offset = master * 0x200 + queue * 0x100;
	uint32_t read_val = cam_io_r_mb(base +
		CCI_I2C_M0_Q0_CUR_WORD_CNT_ADDR + reg_offset);
	uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8);
	uint32_t report_id =
		cci_dev->cci_i2c_queue_info[master][queue].report_id;
	uint32_t report_val = CCI_I2C_REPORT_CMD | (1 << 8) |
		(1 << 9) | (report_id << 4);

	CAM_DBG(CAM_CCI, "CCI_I2C_REPORT_CMD curr_w_cnt: %d", read_val);
	CAM_DBG(CAM_CCI, "CCI_I2C_REPORT_CMD curr_w_cnt: %d report_id %d",
		read_val, report_id);
	cam_io_w_mb(report_val,
		base + CCI_I2C_M0_Q0_LOAD_DATA_ADDR +
		reg_offset);
	read_val++;

	cci_dev->cci_i2c_queue_info[master][queue].report_id++;
	if (cci_dev->cci_i2c_queue_info[master][queue].report_id == REPORT_IDSIZE)
		cci_dev->cci_i2c_queue_info[master][queue].report_id = 0;

	CAM_DBG(CAM_CCI, "CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR %d", read_val);
	cam_io_w_mb(read_val, base +
		CCI_I2C_M0_Q0_EXEC_WORD_CNT_ADDR + reg_offset);
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
#define CAM_CCI_TIMEOUT_DUMP_EN   BIT(2)

#define CCI_VERSION_1_2_9 0x10020009
#define REPORT_IDSIZE 16
enum cci_i2c_sync {
	MSM_SYNC_DISABLE,
	MSM_SYNC_ENABLE,