drm/msm/sde: fix plane stage setup in sde crtc

SDE crtc handles the plane stage based on mixer
loop. That adds an issue when two planes are staged
on same z_order. It overwrites the second plane
configuration with first one. That leads to underrun.

This cleans up the issues in and around plane stage
setup to avoid overwrite or unnecessary locking. It
fixes the issue for source split cases.

Change-Id: I2e784ab4fbb06b8156bef3a8d53a5ae8d69b2fd3
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_hw_ctl.h b/drivers/gpu/drm/msm/sde/sde_hw_ctl.h
index 007cb80..6e08c8a 100644
--- a/drivers/gpu/drm/msm/sde/sde_hw_ctl.h
+++ b/drivers/gpu/drm/msm/sde/sde_hw_ctl.h
@@ -34,8 +34,8 @@
  * @border_enable
  */
 struct sde_hw_stage_cfg {
-	enum sde_sspp stage[SDE_STAGE_MAX][PIPES_PER_STAGE];
-	u8 border_enable;
+	enum sde_sspp stage[SDE_STAGE_MAX][SDE_MAX_PIPES_PER_STAGE];
+	u8 border_enable[CRTC_DUAL_MIXERS];
 };
 
 /**
@@ -123,8 +123,7 @@
 		enum sde_wb blk);
 
 	void (*setup_blendstage)(struct sde_hw_ctl *ctx,
-		enum sde_lm lm,
-		struct sde_hw_stage_cfg *cfg);
+		enum sde_lm lm, struct sde_hw_stage_cfg *cfg, u32 index);
 };
 
 /**