disp: msm: dsi: refine the logic for mode filling and calculation
Video and command mode will be included in same timing node when POMS is enabled, but DFPS is only applicable for video mode, so add this change to differentiate panel mode, and fill display mode according to panel mode. Change-Id: I6aa0f8572f23f0612684ed7cdf406b20ab3df822 Signed-off-by: Lei Chen <chenlei@codeaurora.org>
This commit is contained in:
@@ -3445,8 +3445,11 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)
|
||||
{
|
||||
const u32 SINGLE_MODE_SUPPORT = 1;
|
||||
struct dsi_parser_utils *utils;
|
||||
struct device_node *timings_np;
|
||||
struct device_node *timings_np, *child_np;
|
||||
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");
|
||||
@@ -3479,6 +3482,28 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)
|
||||
count = SINGLE_MODE_SUPPORT;
|
||||
|
||||
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"))
|
||||
num_video_modes++;
|
||||
else if (utils->read_bool(utils->data,
|
||||
"qcom,mdss-dsi-cmd-mode"))
|
||||
num_cmd_modes++;
|
||||
else if (panel->panel_mode == DSI_OP_VIDEO_MODE)
|
||||
num_video_modes++;
|
||||
else if (panel->panel_mode == DSI_OP_CMD_MODE)
|
||||
num_cmd_modes++;
|
||||
}
|
||||
|
||||
num_dfps_rates = !panel->dfps_caps.dfps_support ? 1 :
|
||||
panel->dfps_caps.dfps_list_len;
|
||||
|
||||
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);
|
||||
|
||||
error:
|
||||
return rc;
|
||||
|
Referens i nytt ärende
Block a user