disp: msm: dsi: fix mode count for POMS enabled video mode panel
In legacy POMS feature, there were separate timing nodes for video and command mode. So, while calculating the total number of modes, 1 extra mode is added for command mode if POMS feature is enabled in video mode panel. But as per the new design, this is clubbed into one timing node. So, there is no separate mode for command mode. This change removes the check to add 1 extra mode count otherwise it leads to null pointer dereference while getting lm for this extra mode. Also avoid overriding mode capability when POMS is enabled. Change-Id: I73f3b89b22f566e40c88178f2af392214b1ada8d Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
This commit is contained in:
@@ -7286,7 +7286,10 @@ int dsi_display_get_modes_helper(struct dsi_display *display,
|
||||
|
||||
dsi_display_get_dfps_timing(display, sub_mode,
|
||||
curr_refresh_rate);
|
||||
sub_mode->panel_mode_caps = DSI_OP_VIDEO_MODE;
|
||||
|
||||
/* Avoid override for first sub mode in POMS enabled video mode usecase */
|
||||
if ((i != start) && support_cmd_mode && support_video_mode)
|
||||
sub_mode->panel_mode_caps = DSI_OP_VIDEO_MODE;
|
||||
}
|
||||
end = array_idx;
|
||||
|
||||
|
@@ -4009,17 +4009,9 @@ int dsi_panel_get_mode_count(struct dsi_panel *panel)
|
||||
num_dfps_rates = !panel->dfps_caps.dfps_support ? 1 :
|
||||
panel->dfps_caps.dfps_list_len;
|
||||
|
||||
/*
|
||||
* Inflate num_of_modes by fps in dfps.
|
||||
* Single command mode for video mode panels supporting
|
||||
* panel operating mode switch.
|
||||
*/
|
||||
/* Inflate num_of_modes by fps in dfps. */
|
||||
num_video_modes = num_video_modes * num_dfps_rates;
|
||||
|
||||
if ((panel->panel_mode == DSI_OP_VIDEO_MODE) &&
|
||||
(panel->panel_mode_switch_enabled))
|
||||
num_cmd_modes = 1;
|
||||
|
||||
panel->num_display_modes = num_video_modes + num_cmd_modes;
|
||||
|
||||
error:
|
||||
|
Reference in New Issue
Block a user