Skip to content

Commit

Permalink
drm/msm/sde: avoid connector state mode update in commit thread
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Jayaprakash committed Jul 11, 2019
1 parent 0bcb2a9 commit 60aae8c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions drivers/gpu/drm/msm/sde/sde_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) &&
Expand Down

2 comments on commit 60aae8c

@kholk
Copy link
Contributor

@kholk kholk commented on 60aae8c Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check Kirin/Mermaid for possible breakage in recovery environment with this commit.

@stefanhh0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been cherry picked already earlier, see: 4f89539

Please sign in to comment.