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

Commit 5ebc319a authored by TARKZiM's avatar TARKZiM Committed by Bernhard Thoben
Browse files

drivers: mdss: Apply lividisplay changes to our dis panel specific driver

parent 621a8b52
Loading
Loading
Loading
Loading
+16 −7
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@


#include "mdss_mdp.h"
#include "mdss_mdp.h"
#include "mdss_dsi.h"
#include "mdss_dsi.h"
#include "mdss_livedisplay.h"


#define DT_CMD_HDR 6
#define DT_CMD_HDR 6
#define MIN_REFRESH_RATE 30
#define MIN_REFRESH_RATE 30
@@ -242,7 +243,7 @@ u32 mdss_dsi_panel_cmd_read(struct mdss_dsi_ctrl_pdata *ctrl, char cmd0,
	return 0;
	return 0;
}
}


static void mdss_dsi_panel_cmds_send(struct mdss_dsi_ctrl_pdata *ctrl,
void mdss_dsi_panel_cmds_send(struct mdss_dsi_ctrl_pdata *ctrl,
			struct dsi_panel_cmds *pcmds, u32 flags)
			struct dsi_panel_cmds *pcmds, u32 flags)
{
{
	struct dcs_cmd_req cmdreq;
	struct dcs_cmd_req cmdreq;
@@ -1337,6 +1338,7 @@ static int mdss_dsi_panel_on(struct mdss_panel_data *pdata)
			}
			}
		}
		}
	}
	}

end:
end:
	pinfo->blank_state = MDSS_PANEL_BLANK_UNBLANK;
	pinfo->blank_state = MDSS_PANEL_BLANK_UNBLANK;
	pr_debug("%s:-\n", __func__);
	pr_debug("%s:-\n", __func__);
@@ -1804,7 +1806,7 @@ static void mdss_dsi_parse_trigger(struct device_node *np, char *trigger,
	}
	}
}
}


static int mdss_dsi_parse_dcs_cmds(struct device_node *np,
int mdss_dsi_parse_dcs_cmds(struct device_node *np,
		struct dsi_panel_cmds *pcmds, char *cmd_key, char *link_key)
		struct dsi_panel_cmds *pcmds, char *cmd_key, char *link_key)
{
{
	const char *data;
	const char *data;
@@ -2833,19 +2835,24 @@ static int mdss_dsi_panel_parse_display_timings(struct device_node *np,


	timings_np = of_get_child_by_name(np, "qcom,mdss-dsi-display-timings");
	timings_np = of_get_child_by_name(np, "qcom,mdss-dsi-display-timings");
	if (!timings_np) {
	if (!timings_np) {
		struct dsi_panel_timing pt;
		struct dsi_panel_timing *pt;
		memset(&pt, 0, sizeof(struct dsi_panel_timing));

		pt = kzalloc(sizeof(*pt), GFP_KERNEL);
		if (!pt)
			return -ENOMEM;


		/*
		/*
		 * display timings node is not available, fallback to reading
		 * display timings node is not available, fallback to reading
		 * timings directly from root node instead
		 * timings directly from root node instead
		 */
		 */
		pr_debug("reading display-timings from panel node\n");
		pr_debug("reading display-timings from panel node\n");
		rc = mdss_dsi_panel_timing_from_dt(np, &pt);
		rc = mdss_dsi_panel_timing_from_dt(np, pt);
		if (!rc) {
		if (!rc) {
			mdss_dsi_panel_config_res_properties(np,
			mdss_dsi_panel_config_res_properties(np,
				panel_data->panel_info.sim_panel_mode, &pt);
				panel_data->panel_info.sim_panel_mode, pt);
			rc = mdss_dsi_panel_timing_switch(ctrl, &pt.timing);
			rc = mdss_dsi_panel_timing_switch(ctrl, &pt->timing);
		} else {
			kfree(pt);
		}
		}
		return rc;
		return rc;
	}
	}
@@ -3449,6 +3456,8 @@ static int mdss_panel_parse_dt(struct device_node *np,
		spec_pdata->polling.esd.correct_val = (!rc ? tmp : 0x9C);
		spec_pdata->polling.esd.correct_val = (!rc ? tmp : 0x9C);
	}
	}


	mdss_livedisplay_parse_dt(np, pinfo);

	return 0;
	return 0;


error:
error: