From 21223391638840c8a8a992023e5077468f08e60b Mon Sep 17 00:00:00 2001 From: Akash Gajjar Date: Thu, 29 Feb 2024 12:25:35 +0530 Subject: [PATCH] Revert "disp: msm: sde: avoid race on in_clone_mode flag in wb encoder" This change reverts 'commit 13d31e51110e ("disp: msm: sde: avoid race on in_clone_mode flag in wb encoder")'. Change-Id: Id5818ff189a77de0eac35e0c85f3bf67857c0820 Signed-off-by: Akash Gajjar --- msm/sde/sde_encoder_phys_wb.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/msm/sde/sde_encoder_phys_wb.c b/msm/sde/sde_encoder_phys_wb.c index a300c5068c..fd360da870 100644 --- a/msm/sde/sde_encoder_phys_wb.c +++ b/msm/sde/sde_encoder_phys_wb.c @@ -1865,13 +1865,11 @@ static void _sde_encoder_phys_wb_frame_done_helper(void *arg, bool frame_error) struct sde_encoder_phys *phys_enc = &wb_enc->base; u32 event = frame_error ? SDE_ENCODER_FRAME_EVENT_ERROR : 0; u32 ubwc_error = 0; - unsigned long flags; /* don't notify upper layer for internal commit */ if (phys_enc->enable_state == SDE_ENC_DISABLING && !phys_enc->in_clone_mode) goto end; - spin_lock_irqsave(phys_enc->enc_spinlock, flags); if (phys_enc->parent_ops.handle_frame_done && atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0)) { event |= SDE_ENCODER_FRAME_EVENT_DONE; @@ -1893,11 +1891,9 @@ static void _sde_encoder_phys_wb_frame_done_helper(void *arg, bool frame_error) | SDE_ENCODER_FRAME_EVENT_SIGNAL_RETIRE_FENCE; else event |= SDE_ENCODER_FRAME_EVENT_SIGNAL_RELEASE_FENCE; - } - spin_unlock_irqrestore(phys_enc->enc_spinlock, flags); - if (event & SDE_ENCODER_FRAME_EVENT_DONE) phys_enc->parent_ops.handle_frame_done(phys_enc->parent, phys_enc, event); + } if (!phys_enc->in_clone_mode && phys_enc->parent_ops.handle_vblank_virt) phys_enc->parent_ops.handle_vblank_virt(phys_enc->parent, phys_enc); @@ -2310,15 +2306,12 @@ end: static int sde_encoder_phys_wb_wait_for_tx_complete(struct sde_encoder_phys *phys_enc) { int rc = 0; - unsigned long flags; if (atomic_read(&phys_enc->pending_kickoff_cnt)) rc = _sde_encoder_phys_wb_wait_for_idle(phys_enc, true); if ((phys_enc->enable_state == SDE_ENC_DISABLING) && phys_enc->in_clone_mode) { - spin_lock_irqsave(phys_enc->enc_spinlock, flags); _sde_encoder_phys_wb_reset_state(phys_enc); - spin_unlock_irqrestore(phys_enc->enc_spinlock, flags); sde_encoder_phys_wb_irq_ctrl(phys_enc, false); }