drm/msm/sde: reset kickoff count atomically before irq enable

Rework physical encoder kickoff counting logic to address issues
where an interrupt could be missed, or completion could get out
of sync due to a race condition between kickoff count and irq
enable. It also generalizes the kickoff count across the video
and command interfaces.

Change-Id: Id88f5b2859f74ee1aced8fbd7552e9023155d01c
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c b/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
index 65524ea..768f59c 100644
--- a/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/sde/sde_encoder_phys_wb.c
@@ -1063,7 +1063,7 @@
 	phys_enc->split_role = p->split_role;
 	phys_enc->intf_mode = INTF_MODE_WB_LINE;
 	phys_enc->intf_idx = p->intf_idx;
-	spin_lock_init(&phys_enc->spin_lock);
+	phys_enc->enc_spinlock = p->enc_spinlock;
 	INIT_LIST_HEAD(&wb_enc->irq_cb.list);
 
 	ret = sde_encoder_phys_wb_init_debugfs(phys_enc, p->sde_kms);