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

Commit 312e606b authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: fix dsi hw config string parsing



The dsi hw config is parsed from the string passed from bootloader.
It is parsed based on the delimiter ':', but when a panel is booted
in simulator mode, an additional override parameter prefixed with '#'
is passed from bootloader. Fix the parsing to account for the override
parameter when simulator panels are used.

Change-Id: Id9d7419179048d8b564efbbb8ea238d987d6a83c
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent b245a027
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2800,7 +2800,7 @@ static int mdss_dsi_parse_hw_cfg(struct platform_device *pdev, char *pan_cfg)
	struct mdss_dsi_data *dsi_res = platform_get_drvdata(pdev);
	struct dsi_shared_data *sdata;
	char dsi_cfg[20];
	char *cfg_prim = NULL, *cfg_sec = NULL;
	char *cfg_prim = NULL, *cfg_sec = NULL, *ch = NULL;
	int i = 0;

	if (!dsi_res) {
@@ -2833,6 +2833,13 @@ static int mdss_dsi_parse_hw_cfg(struct platform_device *pdev, char *pan_cfg)
	}

	if (data) {
		/*
		 * To handle the  override parameter (#override:sim)
		 * passed for simulator panels
		 */
		ch = strnstr(data, "#", strlen(data));
		ch ? *ch = '\0' : false;

		if (!strcmp(data, "dual_dsi"))
			sdata->hw_config = DUAL_DSI;
		else if (!strcmp(data, "split_dsi"))