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

Commit 5edca2e7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Provision to read svs freq for VFE"

parents 3d7aa420 4b6d3e44
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ Required properties for child node:
  different SoC can have same hardware version and still different QOS, VBIF,
  and DS parameters. In this case they are exported if separate SoC version
  specific dts files.
- max-svs-clk: svs rate of the VFE clock in Hertz.
- max-nominal-clk: nominal rate of the VFE clock in Hertz.
- max-turbo-clk: turbo/high rate of the VFE clock in Hertz.

@@ -100,6 +101,7 @@ qcom,vfe {
			0x44441111 0x44441111 0x44441111
			0x44441111 0x44441111 0x44441111
			0x44441111 0x00000103>;
		max-clk-svs = <300000000>;
		max-clk-nominal = <465000000>;
		max-clk-turbo = <600000000>;
	};
@@ -152,6 +154,7 @@ qcom,vfe {
			0x44441111 0x44441111 0x44441111
			0x44441111 0x44441111 0x44441111
			0x44441111 0x00000103>;
		max-clk-svs = <300000000>;
		max-clk-nominal = <465000000>;
		max-clk-turbo = <600000000>;
	};
@@ -196,6 +199,7 @@ SoC versions with same VFE HW version:
			0x44441111
			0x44441111
			0x00000103>;
		max-clk-svs = <300000000>;
		max-clk-nominal = <465000000>;
		max-clk-turbo = <600000000>;
	};
+13 −1
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ static int msm_isp_get_clk_rates(struct vfe_device *vfe_dev,
{
	struct device_node *of_node;
	int32_t  rc = 0;
	uint32_t nominal = 0, turbo = 0;
	uint32_t svs = 0, nominal = 0, turbo = 0;
	if (!vfe_dev || !rates) {
		pr_err("%s:%d failed: vfe_dev %p rates %p\n", __func__,
			__LINE__, vfe_dev, rates);
@@ -514,6 +514,16 @@ static int msm_isp_get_clk_rates(struct vfe_device *vfe_dev,
		 __LINE__, of_node);
		return -EINVAL;
	}

	/*
	 * Many older targets dont define svs.
	 * return svs=0 for older targets.
	 */
	rc = of_property_read_u32(of_node, "max-clk-svs",
		&svs);
	if (rc < 0)
		svs = 0;

	rc = of_property_read_u32(of_node, "max-clk-nominal",
		&nominal);
	if (rc < 0 || !nominal) {
@@ -527,6 +537,7 @@ static int msm_isp_get_clk_rates(struct vfe_device *vfe_dev,
		pr_err("%s: turbo rate error\n", __func__);
			return -EINVAL;
	}
	rates->svs_rate = svs;
	rates->nominal_rate = nominal;
	rates->high_rate = turbo;
	return 0;
@@ -1424,6 +1435,7 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev,
			pr_err("%s:%d failed: rc %d\n", __func__, __LINE__, rc);
			return -EINVAL;
		}
		user_data->svs_rate = rates.svs_rate;
		user_data->nominal_rate = rates.nominal_rate;
		user_data->high_rate = rates.high_rate;
		break;
+1 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ struct msm_isp_qbuf_info {
};

struct msm_isp_clk_rates {
	uint32_t svs_rate;
	uint32_t nominal_rate;
	uint32_t high_rate;
};