Merge "disp: msm: dp: clear notification states for dp mst"

This commit is contained in:
qctecmdr
2020-05-26 02:23:43 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 24 additions and 2 deletions

View File

@@ -723,8 +723,10 @@ static int dp_ctrl_link_setup(struct dp_ctrl_private *ctrl, bool shallow)
break; break;
} }
if (!link_train_max_retries || atomic_read(&ctrl->aborted)) if (!link_train_max_retries || atomic_read(&ctrl->aborted)) {
dp_ctrl_disable_link_clock(ctrl);
break; break;
}
if (rc != -EAGAIN) if (rc != -EAGAIN)
dp_ctrl_link_rate_down_shift(ctrl); dp_ctrl_link_rate_down_shift(ctrl);
@@ -1319,7 +1321,8 @@ static int dp_ctrl_on(struct dp_ctrl *dp_ctrl, bool mst_mode,
ctrl->initial_bw_code = ctrl->link->link_params.bw_code; ctrl->initial_bw_code = ctrl->link->link_params.bw_code;
rc = dp_ctrl_link_setup(ctrl, shallow); rc = dp_ctrl_link_setup(ctrl, shallow);
ctrl->power_on = true; if (!rc)
ctrl->power_on = true;
end: end:
return rc; return rc;
} }

View File

@@ -723,6 +723,7 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp)
if (dp->mst.mst_active) { if (dp->mst.mst_active) {
DP_DEBUG("skip notification for mst mode\n"); DP_DEBUG("skip notification for mst mode\n");
dp_display_state_remove(DP_STATE_DISCONNECT_NOTIFIED);
return; return;
} }
@@ -2646,6 +2647,11 @@ static int dp_display_config_hdr(struct dp_display *dp_display, void *panel,
return -EINVAL; return -EINVAL;
} }
if (!dp_display_state_is(DP_STATE_ENABLED)) {
dp_display_state_show("[not enabled]");
return 0;
}
/* /*
* In rare cases where HDR metadata is updated independently * In rare cases where HDR metadata is updated independently
* flush the HDR metadata immediately instead of relying on * flush the HDR metadata immediately instead of relying on
@@ -2667,12 +2673,20 @@ static int dp_display_setup_colospace(struct dp_display *dp_display,
u32 colorspace) u32 colorspace)
{ {
struct dp_panel *dp_panel; struct dp_panel *dp_panel;
struct dp_display_private *dp;
if (!dp_display || !panel) { if (!dp_display || !panel) {
pr_err("invalid input\n"); pr_err("invalid input\n");
return -EINVAL; return -EINVAL;
} }
dp = container_of(dp_display, struct dp_display_private, dp_display);
if (!dp_display_state_is(DP_STATE_ENABLED)) {
dp_display_state_show("[not enabled]");
return 0;
}
dp_panel = panel; dp_panel = panel;
return dp_panel->set_colorspace(dp_panel, colorspace); return dp_panel->set_colorspace(dp_panel, colorspace);
@@ -3005,6 +3019,11 @@ static int dp_display_update_pps(struct dp_display *dp_display,
return -EINVAL; return -EINVAL;
} }
if (!dp_display_state_is(DP_STATE_ENABLED)) {
dp_display_state_show("[not enabled]");
return 0;
}
dp_panel = sde_conn->drv_panel; dp_panel = sde_conn->drv_panel;
dp_panel->update_pps(dp_panel, pps_cmd); dp_panel->update_pps(dp_panel, pps_cmd);
return 0; return 0;