disp: msm: dsi: handle gpios for sim panels

For simulation panels, GPIOS are not needed for panel bootup.
This change handles GPIO parsing, toggle sequences in
simulation panels.

Change-Id: I0a3f03d1958ffe9079a7d9fef3f412e2445b0b9b
Signed-off-by: Santosh Kumar Aenugu <santoshkumar@codeaurora.org>
This commit is contained in:
Santosh Kumar Aenugu
2021-01-26 15:37:59 -08:00
committed by Gerrit - the friendly Code Review server
parent 8a3abf2cdf
commit 323f1b54d3
2 changed files with 21 additions and 3 deletions

View File

@@ -4115,6 +4115,20 @@ error:
return rc;
}
static bool dsi_display_validate_panel_resources(struct dsi_display *display)
{
if (!display->panel->te_using_watchdog_timer) {
if (!gpio_is_valid(display->panel->reset_config.reset_gpio)) {
DSI_ERR("invalid reset gpio for the panel\n");
return false;
}
} else {
display->panel->power_info.count = 0;
DSI_DEBUG("no dir set and no request for gpios in sim panel\n");
}
return true;
}
static int dsi_display_res_init(struct dsi_display *display)
{
int rc = 0;
@@ -4154,6 +4168,11 @@ static int dsi_display_res_init(struct dsi_display *display)
goto error_ctrl_put;
}
display->panel->te_using_watchdog_timer |= display->sw_te_using_wd;
if (!dsi_display_validate_panel_resources(display))
goto error_ctrl_put;
display_for_each_ctrl(i, display) {
struct msm_dsi_phy *phy = display->ctrl[i].phy;
struct dsi_host_common_cfg *host = &display->panel->host_config;

View File

@@ -2253,9 +2253,8 @@ static int dsi_panel_parse_gpios(struct dsi_panel *panel)
reset_gpio_name, 0);
if (!gpio_is_valid(panel->reset_config.reset_gpio) &&
!panel->host_config.ext_bridge_mode) {
rc = panel->reset_config.reset_gpio;
DSI_ERR("[%s] failed get reset gpio, rc=%d\n", panel->name, rc);
goto error;
DSI_DEBUG("[%s] reset gpio not set, rc=%d\n", panel->name,
panel->reset_config.reset_gpio);
}
panel->reset_config.disp_en_gpio = utils->get_named_gpio(utils->data,