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

Commit 10feb0ac authored by Lipsa Rout's avatar Lipsa Rout Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: Update mode population logic for POMS feature



This change adds support to populate one command mode for
video mode panels supporting panel operating mode switch
feature.

Change-Id: I850b889ebfa8c2ee1406ad946061b96143537b09
Signed-off-by: default avatarLipsa Rout <lrout@codeaurora.org>
parent 00d07447
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -6263,9 +6263,16 @@ int dsi_display_get_modes(struct dsi_display *display,
		}
		end = array_idx;
		/*
		 * if dynamic clk switch is supported then update all the bit
		 * clk rates.
		 * if POMS is enabled and boot up mode is video mode,
		 * skip bit clk rates update for command mode,
		 * else if dynamic clk switch is supported then update all
		 * the bit clk rates.
		 */

		if (is_cmd_mode &&
			(display->panel->panel_mode == DSI_OP_VIDEO_MODE))
			continue;

		_dsi_display_populate_bit_clks(display, start, end, &array_idx);
	}

+14 −3
Original line number Diff line number Diff line
@@ -3549,9 +3549,20 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)
	num_bit_clks = !panel->dyn_clk_caps.dyn_clk_support ? 1 :
					panel->dyn_clk_caps.bit_clk_list_len;

	/* Inflate num_of_modes by fps and bit clks in dfps */
	panel->num_display_modes = (num_cmd_modes * num_bit_clks) +
			(num_video_modes * num_bit_clks * num_dfps_rates);
	/*
	 * Inflate num_of_modes by fps and bit clks in dfps.
	 * Single command mode for video mode panels supporting
	 * panel operating mode switch.
	 */
	num_video_modes = num_video_modes * num_bit_clks * num_dfps_rates;

	if ((panel->panel_mode == DSI_OP_VIDEO_MODE) &&
			(panel->panel_mode_switch_enabled))
		num_cmd_modes  = 1;
	else
		num_cmd_modes = num_cmd_modes * num_bit_clks;

	panel->num_display_modes = num_video_modes + num_cmd_modes;

error:
	return rc;