mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
disp: msm: sde: cancel delayed_off_work before reinitialization
Canceling delayed_off_work in encoder pre_modeset might not be executed in all cases, but the following encoder enable might initialize the work. This will lead to list corruption as delayed_off work list node is reinitialized before removing from linked list. Move canceling delayed_off_work to start of encoder mode_set to ensure work is canceled before reinitialization. Change-Id: I38687604f2eedced308ea02019c162022725534e Signed-off-by: Lei Chen <quic_chenlei@quicinc.com> Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
This commit is contained in:
parent
c5ff99c3a3
commit
8d57f083f2
1 changed files with 3 additions and 3 deletions
|
|
@ -1842,9 +1842,6 @@ static int _sde_encoder_rc_pre_modeset(struct drm_encoder *drm_enc,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
/* cancel delayed off work, if any */
|
||||
_sde_encoder_rc_cancel_delayed(sde_enc, sw_event);
|
||||
|
||||
mutex_lock(&sde_enc->rc_lock);
|
||||
|
||||
if (sde_enc->rc_state == SDE_ENC_RC_STATE_OFF) {
|
||||
|
|
@ -2371,6 +2368,9 @@ static void sde_encoder_virt_mode_set(struct drm_encoder *drm_enc,
|
|||
sde_connector_state_get_mode_info(conn->state, &sde_enc->mode_info);
|
||||
sde_encoder_dce_set_bpp(sde_enc->mode_info, sde_enc->crtc);
|
||||
|
||||
/* cancel delayed off work, if any */
|
||||
kthread_cancel_delayed_work_sync(&sde_enc->delayed_off_work);
|
||||
|
||||
/* release resources before seamless mode change */
|
||||
ret = sde_encoder_virt_modeset_rc(drm_enc, adj_mode, true);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue