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

Commit 0d76decf authored by Lipsa Rout's avatar Lipsa Rout
Browse files

disp: msm: dsi: Fix the total number of modes calculation



This change updates the parsing of timing nodes to check
the mode of operation as video or command. In command mode,
for each timing node, num of supported dfps rate is always
one. Accordingly, update the num_dfps_rate to 1 for
command mode.

Change-Id: I5098c7e0d4d2320609d6e10031eaef78c1d8b3c1
Signed-off-by: default avatarLipsa Rout <lrout@codeaurora.org>
parent d92ce846
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6103,8 +6103,6 @@ int dsi_display_get_modes(struct dsi_display *display,

	dyn_clk_caps = &(display->panel->dyn_clk_caps);

	num_dfps_rates = !dfps_caps.dfps_support ? 1 : dfps_caps.dfps_list_len;

	timing_mode_count = display->panel->num_timing_nodes;

	for (mode_idx = 0; mode_idx < timing_mode_count; mode_idx++) {
@@ -6128,6 +6126,9 @@ int dsi_display_get_modes(struct dsi_display *display,

		is_cmd_mode = (display_mode.panel_mode == DSI_OP_CMD_MODE);

		num_dfps_rates = ((!dfps_caps.dfps_support ||
			is_cmd_mode) ? 1 : dfps_caps.dfps_list_len);

		/* Calculate dsi frame transfer time */
		if (is_cmd_mode) {
			dsi_panel_calc_dsi_transfer_time(
+2 −4
Original line number Diff line number Diff line
@@ -3493,7 +3493,6 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)
	int num_dfps_rates, num_bit_clks;
	int num_video_modes = 0, num_cmd_modes = 0;
	int count, rc = 0;
	void *utils_data = NULL;

	if (!panel) {
		DSI_ERR("invalid params\n");
@@ -3530,10 +3529,9 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)

	panel->num_timing_nodes = count;
	dsi_for_each_child_node(timings_np, child_np) {
		utils_data = child_np;
		if (utils->read_bool(utils->data, "qcom,mdss-dsi-video-mode"))
		if (utils->read_bool(child_np, "qcom,mdss-dsi-video-mode"))
			num_video_modes++;
		else if (utils->read_bool(utils->data,
		else if (utils->read_bool(child_np,
					"qcom,mdss-dsi-cmd-mode"))
			num_cmd_modes++;
		else if (panel->panel_mode == DSI_OP_VIDEO_MODE)