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: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:
Lipsa Rout
2020-04-06 11:52:11 +05:30
committed by Gerrit - the friendly Code Review server
parent d59451d9e9
commit e009f7f81f
2 changed files with 23 additions and 5 deletions

View File

@@ -6224,9 +6224,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);
}

View File

@@ -3478,9 +3478,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;