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

Commit aa6ff8f0 authored by Suresh Vankadara's avatar Suresh Vankadara
Browse files

msm: camera: icp: Changes to support SDM670



changes are needed to support SDM670 for camera
- Update CPAS Hardware Capability register
- Handle Single IPE

Change-Id: I70ca9f92c38f62c277361884fc3ebca3968d85bc
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
parent 98472473
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -131,6 +131,11 @@ and name of firmware image.
  Value type: <string>
  Definition: Name of firmware image.

- ubwc-cfg
  Usage: required
  Value type: <u32>
  Definition: UBWC configuration.

Examples:
a5: qcom,a5@ac00000 {
	cell-index = <0>;
@@ -169,6 +174,7 @@ a5: qcom,a5@ac00000 {
	clock-rates = <0 0 0 80000000 0 0 0 0 600000000 0 0>;
	clock-cntl-level = "turbo";
	fw_name = "CAMERA_ICP.elf";
	ubwc-cfg = <0x7F 0x1FF>;
};

qcom,ipe0 {
+1 −0
Original line number Diff line number Diff line
@@ -841,6 +841,7 @@
		clock-rates = <0 0 400000000 0 0 0 0 600000000>;
		clock-cntl-level = "turbo";
		fw_name = "CAMERA_ICP.elf";
		ubwc-cfg = <0x7F 0x1FF>;
		status = "ok";
	};

+8 −5
Original line number Diff line number Diff line
@@ -79,22 +79,24 @@ int cam_cpas_get_cpas_hw_version(uint32_t *hw_version)

int cam_cpas_get_hw_info(uint32_t *camera_family,
	struct cam_hw_version *camera_version,
	struct cam_hw_version *cpas_version)
	struct cam_hw_version *cpas_version,
	uint32_t *cam_caps)
{
	if (!CAM_CPAS_INTF_INITIALIZED()) {
		CAM_ERR(CAM_CPAS, "cpas intf not initialized");
		return -ENODEV;
	}

	if (!camera_family || !camera_version || !cpas_version) {
		CAM_ERR(CAM_CPAS, "invalid input %pK %pK %pK", camera_family,
			camera_version, cpas_version);
	if (!camera_family || !camera_version || !cpas_version || !cam_caps) {
		CAM_ERR(CAM_CPAS, "invalid input %pK %pK %pK %pK",
			camera_family, camera_version, cpas_version, cam_caps);
		return -EINVAL;
	}

	*camera_family = g_cpas_intf->hw_caps.camera_family;
	*camera_version = g_cpas_intf->hw_caps.camera_version;
	*cpas_version = g_cpas_intf->hw_caps.cpas_version;
	*cam_caps = g_cpas_intf->hw_caps.camera_capability;

	return 0;
}
@@ -364,6 +366,7 @@ int cam_cpas_subdev_cmd(struct cam_cpas_intf *cpas_intf,
	switch (cmd->op_code) {
	case CAM_QUERY_CAP: {
		struct cam_cpas_query_cap query;
		uint32_t cam_cpas;

		rc = copy_from_user(&query, (void __user *) cmd->handle,
			sizeof(query));
@@ -374,7 +377,7 @@ int cam_cpas_subdev_cmd(struct cam_cpas_intf *cpas_intf,
		}

		rc = cam_cpas_get_hw_info(&query.camera_family,
			&query.camera_version, &query.cpas_version);
			&query.camera_version, &query.cpas_version, &cam_cpas);
		if (rc)
			break;

+3 −1
Original line number Diff line number Diff line
@@ -314,6 +314,7 @@ int cam_cpas_reg_read(
 *                   CAM_FAMILY_CPAS_SS
 * @camera_version : Camera platform version
 * @cpas_version   : Camera cpas version
 * @cam_caps       : Camera capability
 *
 * @return 0 on success.
 *
@@ -321,7 +322,8 @@ int cam_cpas_reg_read(
int cam_cpas_get_hw_info(
	uint32_t                 *camera_family,
	struct cam_hw_version    *camera_version,
	struct cam_hw_version    *cpas_version);
	struct cam_hw_version    *cpas_version,
	uint32_t                 *cam_caps);

/**
 * cam_cpas_get_cpas_hw_version()
+6 −0
Original line number Diff line number Diff line
@@ -124,4 +124,10 @@ int hfi_set_debug_level(uint32_t lvl);
 */
int hfi_enable_ipe_bps_pc(bool enable);

/**
 * hfi_cmd_ubwc_config() - UBWC configuration to firmware
 * @ubwc_cfg: UBWC configuration parameters
 */
int hfi_cmd_ubwc_config(uint32_t *ubwc_cfg);

#endif /* _HFI_INTF_H_ */
Loading