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

Commit 2db113ca authored by Jigarkumar Zala's avatar Jigarkumar Zala
Browse files

UPSTREAM commit '3ba9e1d5' 11/20



* commit '3ba9e1d5':
  msm: camera: Add put_cpu_buf for signaling end of cpu access
  msm: camera: isp: Avoid stop during IFE flush
  msm: camera: isp: Reset last flush req id as part of release
  msm: camera: Update camera memory table for kernel mapped memory
  msm: camera: isp: Dump hbi & vbi info incase of dual VFE
  msm: camera: icp: Reduce delay between subsequent A5 polls
  msm: camera: isp: Validate packet op-code while checking last flush req
  msm: camera: crm: Fix use-after-free for link
  msm: camera: isp: Release HW during shutdown
  msm: camera: csiphy: Update 8nm csiphy register sequence
  msm: camera: isp: avoid changing camif setting in stop
  msm: camera: isp: Cleanup the start/stop/release functions
  msm: camera: Add stride info as part of pf dump
  ARM: dts: msm: Add correct offset for error irq for sdmmagpie cpas
  msm: camera: Add support for mapping secure memory for CDSP access
  ARM: dts: msm: Add Camnoc register map to VFE for sm6150
  ARM: dts: msm: Change power-source for cam_reset GPIOs
  msm: camera: isp: Move event payload to free list in deinit
  msm: camera: icp: signal error on fences in case of frame process error

Change-Id: Ib290f6182939d4ff676f1ed3fb3453a7dc124c86
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parents f43dabe3 3ba9e1d5
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -313,39 +313,39 @@
	cam_sensor_rear_active: cam_sensor_rear_active {
	cam_sensor_rear_active: cam_sensor_rear_active {
		pins = "gpio1";
		pins = "gpio1";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-disable;
		bias-disable;
	};
	};
	cam_sensor_rear_suspend: cam_sensor_rear_suspend {
	cam_sensor_rear_suspend: cam_sensor_rear_suspend {
		pins = "gpio1";
		pins = "gpio1";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-pull-down;
		bias-pull-down;
	};
	};


	cam_sensor_rear2_active: cam_sensor_rear2_active {
	cam_sensor_rear2_active: cam_sensor_rear2_active {
		pins = "gpio2";
		pins = "gpio2";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-disable;
		bias-disable;
	};
	};
	cam_sensor_rear2_suspend: cam_sensor_rear2_suspend {
	cam_sensor_rear2_suspend: cam_sensor_rear2_suspend {
		pins = "gpio2";
		pins = "gpio2";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-pull-down;
		bias-pull-down;
	};
	};


	cam_sensor_front_active: cam_sensor_front_active {
	cam_sensor_front_active: cam_sensor_front_active {
		pins = "gpio4";
		pins = "gpio4";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-disable;
		bias-disable;
	};
	};
	cam_sensor_front_suspend: cam_sensor_front_suspend {
	cam_sensor_front_suspend: cam_sensor_front_suspend {
		pins = "gpio4";
		pins = "gpio4";
		function = "normal";
		function = "normal";
		power-source = <0>;
		power-source = <1>;
		bias-pull-down;
		bias-pull-down;
	};
	};
};
};
+8 −6
Original line number Original line Diff line number Diff line
@@ -638,9 +638,10 @@
	cam_vfe0: qcom,vfe0@acaf000 {
	cam_vfe0: qcom,vfe0@acaf000 {
		cell-index = <0>;
		cell-index = <0>;
		compatible = "qcom,vfe170";
		compatible = "qcom,vfe170";
		reg-names = "ife";
		reg-names = "ife", "cam_camnoc";
		reg = <0xacaf000 0x4000>;
		reg = <0xacaf000 0x4000>,
		reg-cam-base = <0xaf000>;
			<0xac42000 0x5000>;
		reg-cam-base = <0xaf000 0x42000>;
		interrupt-names = "ife";
		interrupt-names = "ife";
		interrupts = <0 465 0>;
		interrupts = <0 465 0>;
		regulator-names = "camss", "ife0";
		regulator-names = "camss", "ife0";
@@ -725,9 +726,10 @@
	cam_vfe1: qcom,vfe1@acb6000 {
	cam_vfe1: qcom,vfe1@acb6000 {
		cell-index = <1>;
		cell-index = <1>;
		compatible = "qcom,vfe170";
		compatible = "qcom,vfe170";
		reg-names = "ife";
		reg-names = "ife", "cam_camnoc";
		reg = <0xacb6000 0x4000>;
		reg = <0xacb6000 0x4000>,
		reg-cam-base = <0xb6000>;
			<0xac42000 0x5000>;
		reg-cam-base = <0xb6000 0x42000>;
		interrupt-names = "ife";
		interrupt-names = "ife";
		interrupts = <0 467 0>;
		interrupts = <0 467 0>;
		regulator-names = "camss", "ife1";
		regulator-names = "camss", "ife1";
+1 −0
Original line number Original line Diff line number Diff line
@@ -527,6 +527,7 @@ int cam_context_init(struct cam_context *ctx,
	ctx->dev_name = dev_name;
	ctx->dev_name = dev_name;
	ctx->dev_id = dev_id;
	ctx->dev_id = dev_id;
	ctx->ctx_id = ctx_id;
	ctx->ctx_id = ctx_id;
	ctx->last_flush_req = 0;
	ctx->ctx_crm_intf = NULL;
	ctx->ctx_crm_intf = NULL;
	ctx->crm_ctx_intf = crm_node_intf;
	ctx->crm_ctx_intf = crm_node_intf;
	ctx->hw_mgr_intf = hw_mgr_intf;
	ctx->hw_mgr_intf = hw_mgr_intf;
+15 −13
Original line number Original line Diff line number Diff line
@@ -337,15 +337,13 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,


	if (!ctx || !cmd) {
	if (!ctx || !cmd) {
		CAM_ERR(CAM_CTXT, "Invalid input params %pK %pK", ctx, cmd);
		CAM_ERR(CAM_CTXT, "Invalid input params %pK %pK", ctx, cmd);
		rc = -EINVAL;
		return -EINVAL;
		goto end;
	}
	}


	if (!ctx->hw_mgr_intf) {
	if (!ctx->hw_mgr_intf) {
		CAM_ERR(CAM_CTXT, "[%s][%d] HW interface is not ready",
		CAM_ERR(CAM_CTXT, "[%s][%d] HW interface is not ready",
			ctx->dev_name, ctx->ctx_id);
			ctx->dev_name, ctx->ctx_id);
		rc = -EFAULT;
		return -EFAULT;
		goto end;
	}
	}
	rc = cam_context_validate_thread();
	rc = cam_context_validate_thread();
	if (rc)
	if (rc)
@@ -362,8 +360,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
	if (!req) {
	if (!req) {
		CAM_ERR(CAM_CTXT, "[%s][%d] No more request obj free",
		CAM_ERR(CAM_CTXT, "[%s][%d] No more request obj free",
			ctx->dev_name, ctx->ctx_id);
			ctx->dev_name, ctx->ctx_id);
		rc = -ENOMEM;
		return -ENOMEM;
		goto end;
	}
	}


	memset(req, 0, sizeof(*req));
	memset(req, 0, sizeof(*req));
@@ -389,7 +386,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
			"request %lld has been flushed, reject packet",
			"request %lld has been flushed, reject packet",
			packet->header.request_id);
			packet->header.request_id);
		rc = -EINVAL;
		rc = -EINVAL;
		goto free_req;
		goto free_cpu_buf;
	}
	}


	if (packet->header.request_id > ctx->last_flush_req)
	if (packet->header.request_id > ctx->last_flush_req)
@@ -415,7 +412,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
			"[%s][%d] Prepare config packet failed in HW layer",
			"[%s][%d] Prepare config packet failed in HW layer",
			ctx->dev_name, ctx->ctx_id);
			ctx->dev_name, ctx->ctx_id);
		rc = -EFAULT;
		rc = -EFAULT;
		goto free_req;
		goto free_cpu_buf;
	}
	}
	req->num_hw_update_entries = cfg.num_hw_update_entries;
	req->num_hw_update_entries = cfg.num_hw_update_entries;
	req->num_out_map_entries = cfg.num_out_map_entries;
	req->num_out_map_entries = cfg.num_out_map_entries;
@@ -466,30 +463,35 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
						req->request_id);
						req->request_id);


				cam_context_putref(ctx);
				cam_context_putref(ctx);

				goto put_ref;
				goto put_ref;
			}
			}
			CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d",
			CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d",
				req->in_map_entries[j].sync_id, rc);
				req->in_map_entries[j].sync_id, rc);
		}
		}
		goto end;
	}
	}


	if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle))
		CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address",
			ctx->dev_name, ctx->ctx_id);

	return rc;
	return rc;


put_ref:
put_ref:
	for (--i; i >= 0; i--) {
	for (--i; i >= 0; i--) {
		rc = cam_sync_put_obj_ref(req->out_map_entries[i].sync_id);
		if (cam_sync_put_obj_ref(req->out_map_entries[i].sync_id))
		if (rc)
			CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d",
			CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d",
				req->out_map_entries[i].sync_id);
				req->out_map_entries[i].sync_id);
	}
	}
free_cpu_buf:
	if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle))
		CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address",
			ctx->dev_name, ctx->ctx_id);
free_req:
free_req:
	spin_lock(&ctx->lock);
	spin_lock(&ctx->lock);
	list_add_tail(&req->list, &ctx->free_req_list);
	list_add_tail(&req->list, &ctx->free_req_list);
	req->ctx = NULL;
	req->ctx = NULL;
	spin_unlock(&ctx->lock);
	spin_unlock(&ctx->lock);
end:

	return rc;
	return rc;
}
}


+3 −3
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ static struct cam_camnoc_irq_err
		.err_enable = {
		.err_enable = {
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.enable = true,
			.enable = true,
			.offset = 0x3Ba0, /* SPECIFIC_IFE02_ENCERREN_LOW */
			.offset = 0x3BA0, /* SPECIFIC_IFE02_ENCERREN_LOW */
			.value = 1,
			.value = 1,
		},
		},
		.err_status = {
		.err_status = {
@@ -163,13 +163,13 @@ static struct cam_camnoc_irq_err
		.err_enable = {
		.err_enable = {
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.enable = true,
			.enable = true,
			.offset = 0x2088, /* SBM_FLAGOUTSET0_LOW */
			.offset = 0x2288, /* SBM_FLAGOUTSET0_LOW */
			.value = 0x1,
			.value = 0x1,
		},
		},
		.err_status = {
		.err_status = {
			.access_type = CAM_REG_TYPE_READ,
			.access_type = CAM_REG_TYPE_READ,
			.enable = true,
			.enable = true,
			.offset = 0x2090, /* SBM_FLAGOUTSTATUS0_LOW */
			.offset = 0x2290, /* SBM_FLAGOUTSTATUS0_LOW */
		},
		},
		.err_clear = {
		.err_clear = {
			.enable = false,
			.enable = false,
Loading