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>
Этот коммит содержится в:
Anand Tarakh
2023-10-12 11:38:20 +05:30
родитель 1bb44a8184
Коммит 78cde5eaf5
2 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@@ -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;