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

Commit bd817a7a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "UPSTREAM: Merge commit 'ab1d1040' into mainline - PC189 - 062118"

parents e2c41460 89f25028
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -403,17 +403,17 @@
				iova-mem-region-io {
					/* IO region is approximately 3.3 GB */
					iova-region-name = "io";
					iova-region-start = <0xd911000>;
					iova-region-len = <0xd26ef000>;
					iova-region-start = <0xda00000>;
					iova-region-len = <0xd2500000>;
					iova-region-id = <0x3>;
					status = "ok";
				};

				iova-mem-qdss-region {
					/* QDSS region is appropriate 64K */
					/* QDSS region is appropriate 1MB */
					iova-region-name = "qdss";
					iova-region-start = <0xd900000>;
					iova-region-len = <0x10000>;
					iova-region-len = <0x100000>;
					iova-region-id = <0x5>;
					qdss-phy-addr = <0x16790000>;
					status = "ok";
+47 −9
Original line number Diff line number Diff line
@@ -70,6 +70,12 @@ int cam_isp_add_change_base(
			hw_entry[num_ent].handle = kmd_buf_info->handle;
			hw_entry[num_ent].len    = get_base.cmd.used_bytes;
			hw_entry[num_ent].offset = kmd_buf_info->offset;
			CAM_DBG(CAM_ISP,
				"num_ent=%d handle=0x%x, len=%u, offset=%u",
				num_ent,
				hw_entry[num_ent].handle,
				hw_entry[num_ent].len,
				hw_entry[num_ent].offset);

			kmd_buf_info->used_bytes += get_base.cmd.used_bytes;
			kmd_buf_info->offset     += get_base.cmd.used_bytes;
@@ -184,6 +190,16 @@ int cam_isp_add_cmd_buf_update(
		return -EINVAL;
	}

	cmd_update.cmd_type = hw_cmd_type;
	cmd_update.cmd.cmd_buf_addr = cmd_buf_addr;
	cmd_update.cmd.size = kmd_buf_remain_size;
	cmd_update.cmd.used_bytes = 0;
	cmd_update.data = cmd_update_data;
	CAM_DBG(CAM_ISP, "cmd_type %u cmd buffer 0x%pK, size %d",
		cmd_update.cmd_type,
		cmd_update.cmd.cmd_buf_addr,
		cmd_update.cmd.size);

	for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
		if (!hw_mgr_res->hw_res[i])
			continue;
@@ -193,14 +209,7 @@ int cam_isp_add_cmd_buf_update(

		res = hw_mgr_res->hw_res[i];
		cmd_update.res = res;
		cmd_update.cmd_type = hw_cmd_type;
		cmd_update.cmd.cmd_buf_addr = cmd_buf_addr;
		cmd_update.cmd.size = kmd_buf_remain_size;
		cmd_update.data = cmd_update_data;

		CAM_DBG(CAM_ISP, "cmd buffer 0x%pK, size %d",
			cmd_update.cmd.cmd_buf_addr,
			cmd_update.cmd.size);
		rc = res->hw_intf->hw_ops.process_cmd(
			res->hw_intf->hw_priv,
			cmd_update.cmd_type, &cmd_update,
@@ -280,6 +289,12 @@ int cam_isp_add_command_buffers(
				hw_entry[num_ent].handle =
					cmd_desc[i].mem_handle;
				hw_entry[num_ent].offset = cmd_desc[i].offset;
				CAM_DBG(CAM_ISP,
					"Meta_Left num_ent=%d handle=0x%x, len=%u, offset=%u",
					num_ent,
					hw_entry[num_ent].handle,
					hw_entry[num_ent].len,
					hw_entry[num_ent].offset);

				if (cmd_meta_data ==
					CAM_ISP_PACKET_META_DMI_LEFT)
@@ -295,6 +310,12 @@ int cam_isp_add_command_buffers(
				hw_entry[num_ent].handle =
					cmd_desc[i].mem_handle;
				hw_entry[num_ent].offset = cmd_desc[i].offset;
				CAM_DBG(CAM_ISP,
					"Meta_Right num_ent=%d handle=0x%x, len=%u, offset=%u",
					num_ent,
					hw_entry[num_ent].handle,
					hw_entry[num_ent].len,
					hw_entry[num_ent].offset);

				if (cmd_meta_data ==
					CAM_ISP_PACKET_META_DMI_RIGHT)
@@ -308,7 +329,12 @@ int cam_isp_add_command_buffers(
			hw_entry[num_ent].handle =
				cmd_desc[i].mem_handle;
			hw_entry[num_ent].offset = cmd_desc[i].offset;

			CAM_DBG(CAM_ISP,
				"Meta_Common num_ent=%d handle=0x%x, len=%u, offset=%u",
				num_ent,
				hw_entry[num_ent].handle,
				hw_entry[num_ent].len,
				hw_entry[num_ent].offset);
			if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_COMMON)
				hw_entry[num_ent].flags = 0x1;

@@ -647,6 +673,12 @@ int cam_isp_add_io_buffers(
		prepare->hw_update_entries[num_ent].len = io_cfg_used_bytes;
		prepare->hw_update_entries[num_ent].offset =
			kmd_buf_info->offset;
		CAM_DBG(CAM_ISP,
			"num_ent=%d handle=0x%x, len=%u, offset=%u",
			num_ent,
			prepare->hw_update_entries[num_ent].handle,
			prepare->hw_update_entries[num_ent].len,
			prepare->hw_update_entries[num_ent].offset);
		num_ent++;

		kmd_buf_info->used_bytes += io_cfg_used_bytes;
@@ -741,6 +773,12 @@ int cam_isp_add_reg_update(
		prepare->hw_update_entries[num_ent].len = reg_update_size;
		prepare->hw_update_entries[num_ent].offset =
			kmd_buf_info->offset;
		CAM_DBG(CAM_ISP,
			"num_ent=%d handle=0x%x, len=%u, offset=%u",
			num_ent,
			prepare->hw_update_entries[num_ent].handle,
			prepare->hw_update_entries[num_ent].len,
			prepare->hw_update_entries[num_ent].offset);
		num_ent++;

		kmd_buf_info->used_bytes += reg_update_size;
+28 −48
Original line number Diff line number Diff line
@@ -287,12 +287,12 @@ static int cam_ife_csid_get_format_ipp(
}

static int cam_ife_csid_cid_get(struct cam_ife_csid_hw *csid_hw,
	struct cam_isp_resource_node **res, int32_t vc, uint32_t dt,
	uint32_t res_type)
	struct cam_isp_resource_node **res, int32_t vc, uint32_t dt)
{
	int  rc = 0;
	struct cam_ife_csid_cid_data    *cid_data;
	uint32_t  i = 0, j = 0;
	uint32_t  i = 0;

	*res = NULL;

	/* Return already reserved CID if the VC/DT matches */
	for (i = 0; i < CAM_IFE_CSID_CID_RES_MAX; i++) {
@@ -300,55 +300,36 @@ static int cam_ife_csid_cid_get(struct cam_ife_csid_hw *csid_hw,
			CAM_ISP_RESOURCE_STATE_RESERVED) {
			cid_data = (struct cam_ife_csid_cid_data *)
				csid_hw->cid_res[i].res_priv;
			if (res_type == CAM_ISP_IFE_IN_RES_TPG) {
				if (cid_data->tpg_set) {
					cid_data->cnt++;
					*res = &csid_hw->cid_res[i];
					break;
				}
			} else {
			if (cid_data->vc == vc && cid_data->dt == dt) {
				cid_data->cnt++;
				*res = &csid_hw->cid_res[i];
					break;
				}
			}
				return 0;
			}
		}

	if (i == CAM_IFE_CSID_CID_RES_MAX) {
		if (res_type == CAM_ISP_IFE_IN_RES_TPG) {
			CAM_ERR(CAM_ISP, "CSID:%d TPG CID not available",
				 csid_hw->hw_intf->hw_idx);
			rc = -EINVAL;
	}

		for (j = 0; j < CAM_IFE_CSID_CID_RES_MAX; j++) {
			if (csid_hw->cid_res[j].res_state ==
	for (i = 0; i < CAM_IFE_CSID_CID_RES_MAX; i++) {
		if (csid_hw->cid_res[i].res_state ==
			CAM_ISP_RESOURCE_STATE_AVAILABLE) {
			cid_data = (struct cam_ife_csid_cid_data *)
					csid_hw->cid_res[j].res_priv;
				csid_hw->cid_res[i].res_priv;
			cid_data->vc  = vc;
			cid_data->dt  = dt;
			cid_data->cnt = 1;
				csid_hw->cid_res[j].res_state =
			csid_hw->cid_res[i].res_state =
				CAM_ISP_RESOURCE_STATE_RESERVED;
				*res = &csid_hw->cid_res[j];
			*res = &csid_hw->cid_res[i];
			CAM_DBG(CAM_ISP, "CSID:%d CID %d allocated",
				csid_hw->hw_intf->hw_idx,
					csid_hw->cid_res[j].res_id);
				break;
				csid_hw->cid_res[i].res_id);
			return 0;
		}
	}

		if (j == CAM_IFE_CSID_CID_RES_MAX) {
	CAM_ERR(CAM_ISP, "CSID:%d Free cid is not available",
		 csid_hw->hw_intf->hw_idx);
			rc = -EINVAL;
		}
	}

	return rc;
	return -EINVAL;
}


@@ -717,8 +698,7 @@ static int cam_ife_csid_cid_reserve(struct cam_ife_csid_hw *csid_hw,
	rc = cam_ife_csid_cid_get(csid_hw,
		&cid_reserv->node_res,
		cid_reserv->in_port->vc,
		cid_reserv->in_port->dt,
		cid_reserv->in_port->res_type);
		cid_reserv->in_port->dt);
	if (rc) {
		CAM_ERR(CAM_ISP, "CSID:%d CID Reserve failed res_type %d",
			csid_hw->hw_intf->hw_idx,
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ int32_t cam_actuator_construct_default_power_setting(

free_power_settings:
	kfree(power_info->power_setting);
	power_info->power_setting = NULL;
	return rc;
}

+4 −0
Original line number Diff line number Diff line
@@ -252,6 +252,8 @@ static int32_t cam_actuator_platform_remove(struct platform_device *pdev)
	a_ctrl->io_master_info.cci_client = NULL;
	kfree(power_info->power_setting);
	kfree(power_info->power_down_setting);
	power_info->power_setting = NULL;
	power_info->power_down_setting = NULL;
	kfree(a_ctrl->soc_info.soc_private);
	kfree(a_ctrl->i2c_data.per_frame);
	a_ctrl->i2c_data.per_frame = NULL;
@@ -284,6 +286,8 @@ static int32_t cam_actuator_driver_i2c_remove(struct i2c_client *client)
	kfree(power_info->power_setting);
	kfree(power_info->power_down_setting);
	kfree(a_ctrl->soc_info.soc_private);
	power_info->power_setting = NULL;
	power_info->power_down_setting = NULL;
	a_ctrl->soc_info.soc_private = NULL;
	kfree(a_ctrl);
	return rc;
Loading