diff --git a/msm/dp/dp_ctrl.c b/msm/dp/dp_ctrl.c index 19445de21d..3f69f235ad 100644 --- a/msm/dp/dp_ctrl.c +++ b/msm/dp/dp_ctrl.c @@ -723,8 +723,10 @@ static int dp_ctrl_link_setup(struct dp_ctrl_private *ctrl, bool shallow) 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; + } if (rc != -EAGAIN) 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; rc = dp_ctrl_link_setup(ctrl, shallow); - ctrl->power_on = true; + if (!rc) + ctrl->power_on = true; end: return rc; } diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index 487c63fed2..be5c7edcac 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -723,6 +723,7 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp) if (dp->mst.mst_active) { DP_DEBUG("skip notification for mst mode\n"); + dp_display_state_remove(DP_STATE_DISCONNECT_NOTIFIED); return; } @@ -2646,6 +2647,11 @@ static int dp_display_config_hdr(struct dp_display *dp_display, void *panel, 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 * 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) { struct dp_panel *dp_panel; + struct dp_display_private *dp; if (!dp_display || !panel) { pr_err("invalid input\n"); 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; 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; } + if (!dp_display_state_is(DP_STATE_ENABLED)) { + dp_display_state_show("[not enabled]"); + return 0; + } + dp_panel = sde_conn->drv_panel; dp_panel->update_pps(dp_panel, pps_cmd); return 0;