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

Commit 3e25e84c authored by Vinu Deokaran's avatar Vinu Deokaran
Browse files

msm: mdss: read display id from device tree



Add support to read display ID string from device tree. The string
could be empty if it's not defined in the device tree.

Change-Id: I70584a1e20b7394145e40d83a2af7775f0117506
Signed-off-by: default avatarVinu Deokaran <vinud@codeaurora.org>
parent 396ff689
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -127,6 +127,11 @@ Optional properties:
					"lane_map_3210" = <3 2 1 0>
- qcom,pluggable			Boolean to enable hotplug feature.
- qcom,timing-db-mode:			Boolean specifies dsi timing mode registers are supported or not.
- qcom,display-id			A string indicates the display ID for the controller.
					The possible values are:
					- "primary"
					- "secondary"
					- "tertiary"

Example:
	mdss_dsi: qcom,mdss_dsi@0 {
@@ -241,5 +246,6 @@ Example:
			qcom,platform-mode-gpio = <&msmgpio 7 0>;
			qcom,dsi-irq-line;
			qcom,lane-map = "lane_map_3012";
			qcom,display-id = "primary";
	        };
	};
+6 −0
Original line number Diff line number Diff line
@@ -47,6 +47,11 @@ 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,display-id: A string indicates the display ID for the controller.
		   The possible values are:
		   - "primary"
		   - "secondary"
		   - "tertiary"

[Optional child nodes]: These nodes are for devices which are
dependent on HDMI Tx controller. If HDMI Tx controller is disabled then
@@ -90,6 +95,7 @@ Example:

		qcom,conditional-power-on;
		qcom,pluggable;
		qcom,display-id = "secondary";

		qcom,msm-hdmi-audio-rx {
			compatible = "qcom,msm-hdmi-audio-codec-rx";
+9 −0
Original line number Diff line number Diff line
@@ -3555,6 +3555,15 @@ static int mdss_dsi_parse_ctrl_params(struct platform_device *ctrl_pdev,
	pinfo->is_pluggable = of_property_read_bool(ctrl_pdev->dev.of_node,
		"qcom,pluggable");

	data = of_get_property(ctrl_pdev->dev.of_node,
		"qcom,display-id", &len);
	if (!data || len <= 0)
		pr_err("%s:%d Unable to read qcom,display-id, data=%p,len=%d\n",
			__func__, __LINE__, data, len);
	else
		snprintf(ctrl_pdata->panel_data.panel_info.display_id,
			MDSS_DISPLAY_ID_MAX_LEN, "%s", data);

	return 0;


+10 −1
Original line number Diff line number Diff line
@@ -4804,9 +4804,10 @@ static void hdmi_tx_put_dt_data(struct device *dev,
static int hdmi_tx_get_dt_data(struct platform_device *pdev,
	struct hdmi_tx_platform_data *pdata)
{
	int i, rc = 0;
	int i, rc = 0, len = 0;
	struct device_node *of_node = NULL;
	struct hdmi_tx_ctrl *hdmi_ctrl = platform_get_drvdata(pdev);
	const char *data;

	if (!pdev || !pdata) {
		DEV_ERR("%s: invalid input\n", __func__);
@@ -4871,6 +4872,14 @@ static int hdmi_tx_get_dt_data(struct platform_device *pdev,
	pdata->pluggable = of_property_read_bool(pdev->dev.of_node,
		"qcom,pluggable");

	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=%p,len=%d\n",
			__func__, __LINE__, data, len);
	else
		snprintf(hdmi_ctrl->panel_data.panel_info.display_id,
			MDSS_DISPLAY_ID_MAX_LEN, "%s", data);

	return rc;

error: