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

Commit 1497c8f0 authored by Sandeep Panda's avatar Sandeep Panda
Browse files

drm/msm/dsi-staging: handle reset gpio parsing error properly



Currently in dsi driver any failure while parsing panel
reset gpio during probe is not handled gracefully, which
causes system boot up issues. Fix this issue by properly
propagating the error number to caller function.

Change-Id: I49225dad2edf7f09e8dca0fe009a59c013835ba5
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent e89a5466
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1862,8 +1862,8 @@ static int dsi_panel_parse_gpios(struct dsi_panel *panel)
					      reset_gpio_name, 0);
	if (!gpio_is_valid(panel->reset_config.reset_gpio) &&
		!panel->host_config.ext_bridge_mode) {
		rc = panel->reset_config.reset_gpio;
		pr_err("[%s] failed get reset gpio, rc=%d\n", panel->name, rc);
		rc = -EINVAL;
		goto error;
	}

@@ -1887,7 +1887,7 @@ static int dsi_panel_parse_gpios(struct dsi_panel *panel)
	if (!gpio_is_valid(panel->reset_config.lcd_mode_sel_gpio))
		pr_debug("%s:%d mode gpio not specified\n", __func__, __LINE__);

	pr_err("mode gpio=%d\n", panel->reset_config.lcd_mode_sel_gpio);
	pr_debug("mode gpio=%d\n", panel->reset_config.lcd_mode_sel_gpio);

	data = utils->get_property(utils->data,
		"qcom,mdss-dsi-mode-sel-gpio-state", NULL);
@@ -2949,14 +2949,16 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
		goto error;
	}

	rc = dsi_panel_parse_gpios(panel);
	if (rc) {
		pr_err("failed to parse panel gpios, rc=%d\n", rc);
		goto error;
	}

	rc = dsi_panel_parse_power_cfg(panel);
	if (rc)
		pr_err("failed to parse power config, rc=%d\n", rc);

	rc = dsi_panel_parse_gpios(panel);
	if (rc)
		pr_err("failed to parse panel gpios, rc=%d\n", rc);

	rc = dsi_panel_parse_bl_config(panel);
	if (rc)
		pr_err("failed to parse backlight config, rc=%d\n", rc);