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

Commit 7d22e1f6 authored by Narender Ankam's avatar Narender Ankam Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: hdmi: limit max supported HDMI pclk frequency



Read max-pclk-frequency-khz dt property and set max supported pclk
frequency to minimum of max-pclk-frequency-khz or max pclk frequency
as per hdmi controller's version.

Change-Id: I27815171886089a427c63f1722efc8f9b941497f
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent 4bd759b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ Optional properties:
  HDMI interface will remain powered on from LK to kernel with continuous
  display of bootup logo.
- qcom,pluggable: boolean to enable hotplug feature.
- qcom,max-pclk-frequency-khz: maximum supported pclk frequency in KHz.
- qcom,display-id: A string indicates the display ID for the controller.
		   The possible values are:
		   - "primary"
+14 −0
Original line number Diff line number Diff line
@@ -192,6 +192,13 @@ static int hdmi_tx_get_version(struct hdmi_tx_ctrl *hdmi_ctrl)
		break;
	}

	/*
	 * Override max pclk frequency as indicated in dt.
	 */
	if (hdmi_ctrl->pdata.max_pclk_freq_khz)
		hdmi_ctrl->max_pclk_khz = min(hdmi_ctrl->max_pclk_khz,
				hdmi_ctrl->pdata.max_pclk_freq_khz);

	rc = hdmi_tx_enable_power(hdmi_ctrl, HDMI_TX_HPD_PM, false);
	if (rc) {
		DEV_ERR("%s: FAILED to disable power\n", __func__);
@@ -4642,6 +4649,13 @@ static int hdmi_tx_get_dt_data(struct platform_device *pdev,
	pdata->pluggable = of_property_read_bool(pdev->dev.of_node,
		"qcom,pluggable");

	rc = of_property_read_u32(pdev->dev.of_node,
		"qcom,max-pclk-frequency-khz", &pdata->max_pclk_freq_khz);
	if (rc) {
		pdata->max_pclk_freq_khz = 0;
		rc = 0;
	}

	data = of_get_property(pdev->dev.of_node, "qcom,display-id", &len);
	if (!data || len <= 0)
		pr_err("%s:%d Unable to read qcom,display-id, data=%pK,len=%d\n",
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ struct hdmi_tx_platform_data {
	bool pluggable;
	struct clk *hdmi_pclk_rcg;
	struct clk *ext_hdmi_pixel_clk;
	u32 max_pclk_freq_khz;
};

struct hdmi_tx_pinctrl {