Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac70425c authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

drm/msm/sde: move frame_done_timeout after phys encoder disable



During virtual encoder disable, frame_done_timeout is checked
incorrectly before disabling master phys encoder. The frame
transfer wait is accounted only in the phys encoder disable which
would eventually lead to resetting the frame_done_timeout. Move
the check after master phys encoder disable to avoid the error.

Change-Id: Iab4e180091f53c64f5b2ff9ac1843cb584bc5f76
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent b9ed6bdf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1709,15 +1709,15 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)
		}
	}

	if (sde_enc->cur_master && sde_enc->cur_master->ops.disable)
		sde_enc->cur_master->ops.disable(sde_enc->cur_master);

	/* after phys waits for frame-done, should be no more frames pending */
	if (atomic_xchg(&sde_enc->frame_done_timeout, 0)) {
		SDE_ERROR("enc%d timeout pending\n", drm_enc->base.id);
		del_timer_sync(&sde_enc->frame_done_timer);
	}

	if (sde_enc->cur_master && sde_enc->cur_master->ops.disable)
		sde_enc->cur_master->ops.disable(sde_enc->cur_master);

	sde_encoder_resource_control(drm_enc, SDE_ENC_RC_EVENT_STOP);

	if (sde_enc->cur_master) {