disp: msm: dsi: add indexing for panel timing nodes

The order of the panel timing nodes specified in the device tree is
not guaranteed to be the same while being parsed in the driver. This
results in unintended modes being set as preferred timing mode. The change
introduces cell-index property, so that the timing modes can be
accurately indexed and parsed.

Change-Id: I8ccd4d5a15643bfe72bc8be084f5e91fac26feb4
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:
Satya Rama Aditya Pinapala
2021-03-21 20:22:59 -07:00
committed by Gerrit - the friendly Code Review server
parent 19e9831a45
commit 2fec1685d0
4 changed files with 14 additions and 7 deletions

View File

@@ -4039,6 +4039,10 @@ int dsi_panel_get_mode(struct dsi_panel *panel,
mode->panel_mode_caps = panel->panel_mode;
}
rc = utils->read_u32(utils->data, "cell-index", &mode->mode_idx);
if (rc)
mode->mode_idx = index;
rc = dsi_panel_parse_timing(&mode->timing, utils);
if (rc) {
DSI_ERR("failed to parse panel timing, rc=%d\n", rc);