drm/msm/sde: fix race condition in vblank control interrupts

In Dual display concurrencies there are certain cases where
irq_idx and vblank_refcount state mismatch can occur.
To avoid it, during setup of irq_hw_idx, reset the vblank_refcount
and unregister read ptr irq if not yet done by then along with
maintaining global mutex lock for vblank_refcount.
Also, if register IRQ fails, correct vblank_refcount so
that IRQ registration can be tried again.

Change-Id: I06bcbf71c6a43bd161ff61093d9f6063a292d6bc
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
このコミットが含まれているのは:
Samantha Tran
2020-01-16 12:06:34 -08:00
committed by Gerrit - the friendly Code Review server
コミット 0064a0227b
3個のファイルの変更34行の追加4行の削除

ファイルの表示

@@ -3418,6 +3418,8 @@ static int sde_kms_hw_init(struct msm_kms *kms)
dev->mode_config.max_height = sde_kms->catalog->max_display_height;
mutex_init(&sde_kms->secure_transition_lock);
mutex_init(&sde_kms->vblank_ctl_global_lock);
atomic_set(&sde_kms->detach_sec_cb, 0);
atomic_set(&sde_kms->detach_all_cb, 0);