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

Commit 5a91e480 authored by Sandeep Panda's avatar Sandeep Panda
Browse files

drm/msm/dsi-staging: fix incorrect logging of ESD information



In the current implementation DSI driver is logging ESD
feature to be enabled even if the property is not added.
This change fixes the same by moving the log location to
end of ESD feature parsing function.

Change-Id: I1c4824f78325c102352348d10710b025b266ba7d
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent 099e9fc7
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -2512,8 +2512,10 @@ static int dsi_panel_parse_esd_config(struct dsi_panel *panel,
	struct property *data;
	const char *string;
	struct drm_panel_esd_config *esd_config;
	u8 *esd_mode = NULL;

	esd_config = &panel->esd_config;
	esd_config->status_mode = ESD_MODE_MAX;
	esd_config->esd_enabled = of_property_read_bool(of_node,
		"qcom,esd-check-enabled");

@@ -2635,6 +2637,15 @@ static int dsi_panel_parse_esd_config(struct dsi_panel *panel,
				esd_config->groups * status_len);
	}

	if (panel->esd_config.status_mode == ESD_MODE_REG_READ)
		esd_mode = "register_read";
	else if (panel->esd_config.status_mode == ESD_MODE_SW_BTA)
		esd_mode = "bta_trigger";
	else if (panel->esd_config.status_mode ==  ESD_MODE_PANEL_TE)
		esd_mode = "te_check";

	pr_info("ESD enabled with mode: %s\n", esd_mode);

	return 0;

error4:
@@ -2725,20 +2736,8 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
		pr_debug("failed to get dms info, rc=%d\n", rc);

	rc = dsi_panel_parse_esd_config(panel, of_node);
	if (rc) {
	if (rc)
		pr_debug("failed to parse esd config, rc=%d\n", rc);
	} else {
		u8 *esd_mode = NULL;

		if (panel->esd_config.status_mode == ESD_MODE_REG_READ)
			esd_mode = "register_read";
		else if (panel->esd_config.status_mode == ESD_MODE_SW_BTA)
			esd_mode = "bta_trigger";
		else if (panel->esd_config.status_mode ==  ESD_MODE_PANEL_TE)
			esd_mode = "te_check";

		pr_info("ESD enabled with mode: %s\n", esd_mode);
	}

	panel->panel_of_node = of_node;
	drm_panel_init(&panel->drm_panel);