disp: msm: dsi: recount drm mode count
Drm driver will remove the same mode that defined in dsi panel dtsi. But the mode count was not updated, so when checked drm mode, need to recount the mode. Change-Id: I51a2c40ceb7d4ee83a15f74d9d724b4fb9c8a618 Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
此提交包含在:

提交者
Gerrit - the friendly Code Review server

父節點
71267af524
當前提交
0cf3838ac8
@@ -1152,7 +1152,7 @@ void dsi_conn_set_allowed_mode_switch(struct drm_connector *connector,
|
||||
struct list_head *mode_list = &connector->modes;
|
||||
struct dsi_display *disp = display;
|
||||
struct dsi_panel *panel;
|
||||
int mode_count, rc = 0;
|
||||
int mode_count = 0, rc = 0;
|
||||
struct dsi_display_mode_priv_info *dsi_mode_info, *cmp_dsi_mode_info;
|
||||
bool allow_switch = false;
|
||||
|
||||
@@ -1162,7 +1162,8 @@ void dsi_conn_set_allowed_mode_switch(struct drm_connector *connector,
|
||||
}
|
||||
|
||||
panel = disp->panel;
|
||||
mode_count = panel->num_display_modes;
|
||||
list_for_each_entry(drm_mode, &connector->modes, head)
|
||||
mode_count++;
|
||||
|
||||
list_for_each_entry(drm_mode, &connector->modes, head) {
|
||||
|
||||
@@ -1180,6 +1181,8 @@ void dsi_conn_set_allowed_mode_switch(struct drm_connector *connector,
|
||||
mode_list = mode_list->next;
|
||||
cmp_mode_idx = 1;
|
||||
list_for_each_entry(cmp_drm_mode, mode_list, head) {
|
||||
if (&cmp_drm_mode->head == &connector->modes)
|
||||
continue;
|
||||
convert_to_dsi_mode(cmp_drm_mode, &dsi_mode);
|
||||
|
||||
rc = dsi_display_find_mode(display, &dsi_mode,
|
||||
|
新增問題並參考
封鎖使用者