From 60aae8c7d9ef68f24de7202386db4570fa9b8b14 Mon Sep 17 00:00:00 2001 From: Jayaprakash Date: Thu, 11 Jul 2019 13:12:46 +0530 Subject: [PATCH] drm/msm/sde: avoid connector state mode update in commit thread There is a race condition where connector state mode info is updated in sde_encoder_virt_mode_set in crtc_commit thread and mode info getting copied to new connector state in connector_atomic_duplicate_state in hwbinder thread. This is causing new connector state to be in invalid state leading to wrong dsc config and further leading to ping pong timeouts. Removed connector state mode info update in crtc_commit thread as connector state mode info is updated in mode_fixup and does not need updation in sde_encoder_virt_mode_set in crtc_commit thread. Change-Id: Idb05948f7ad0a6af9846a7e1e90c7f934a072815 Signed-off-by: Jayaprakash --- drivers/gpu/drm/msm/sde/sde_encoder.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/msm/sde/sde_encoder.c b/drivers/gpu/drm/msm/sde/sde_encoder.c index d97490f2a77ec..8be253ddd3988 100644 --- a/drivers/gpu/drm/msm/sde/sde_encoder.c +++ b/drivers/gpu/drm/msm/sde/sde_encoder.c @@ -2684,8 +2684,6 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc, struct sde_kms *sde_kms; struct list_head *connector_list; struct drm_connector *conn = NULL, *conn_iter; - struct sde_connector_state *sde_conn_state = NULL; - struct sde_connector *sde_conn = NULL; struct sde_rm_hw_iter dsc_iter, pp_iter; struct sde_rm_hw_request request_hw; bool is_cmd_mode = false; @@ -2734,20 +2732,6 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc, return; } - sde_conn = to_sde_connector(conn); - sde_conn_state = to_sde_connector_state(conn->state); - if (sde_conn && sde_conn_state) { - ret = sde_conn->ops.get_mode_info(&sde_conn->base, adj_mode, - &sde_conn_state->mode_info, - sde_kms->catalog->max_mixer_width, - sde_conn->display); - if (ret) { - SDE_ERROR_ENC(sde_enc, - "failed to get mode info from the display\n"); - return; - } - } - /* release resources before seamless mode change */ if (msm_is_mode_seamless_dms(adj_mode) || (msm_is_mode_seamless_dyn_clk(adj_mode) &&