msm: camera: Fix video recording corruption

Change buffer config to use stride info.
Add case to avoid config CBCR plane as single planar.

Change-Id: Ia897320da0e346bafe176766b3628a7ffca775f8
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
diff --git a/drivers/media/video/msmb/isp/msm_isp32.c b/drivers/media/video/msmb/isp/msm_isp32.c
index d7b62d1..d8ac4e0 100644
--- a/drivers/media/video/msmb/isp/msm_isp32.c
+++ b/drivers/media/video/msmb/isp/msm_isp32.c
@@ -530,7 +530,7 @@
 	/*WR_BUFFER_CFG*/
 	val =
 		msm_isp_cal_word_per_line(stream_cfg_cmd->output_format,
-		  stream_cfg_cmd->plane_cfg[plane_idx].output_width) << 16 |
+		  stream_cfg_cmd->plane_cfg[plane_idx].output_stride) << 16 |
 		(stream_cfg_cmd->plane_cfg[
 			plane_idx].output_scan_lines - 1) << 4 |
 		VFE32_BURST_LEN >> 2;
@@ -599,8 +599,8 @@
 	switch (stream_cfg_cmd->stream_src) {
 	case PIX_ENCODER:
 	case PIX_VIEWFINDER: {
-		if (plane_cfg->output_plane_format
-			!= CRCB_PLANE) {
+		if (plane_cfg->output_plane_format != CRCB_PLANE &&
+			plane_cfg->output_plane_format != CBCR_PLANE) {
 			/*SINGLE_STREAM_SEL*/
 			xbar_cfg |= plane_cfg->output_plane_format << 5;
 		} else {
diff --git a/drivers/media/video/msmb/isp/msm_isp40.c b/drivers/media/video/msmb/isp/msm_isp40.c
index 47abcef..b9788eb 100644
--- a/drivers/media/video/msmb/isp/msm_isp40.c
+++ b/drivers/media/video/msmb/isp/msm_isp40.c
@@ -668,7 +668,7 @@
 	val =
 		msm_isp_cal_word_per_line(stream_cfg_cmd->output_format,
 		stream_cfg_cmd->plane_cfg[
-			plane_idx].output_width) << 16 |
+			plane_idx].output_stride) << 16 |
 		(stream_cfg_cmd->plane_cfg[
 			plane_idx].output_scan_lines - 1) << 4 |
 		VFE40_BURST_LEN >> 2;
@@ -750,8 +750,8 @@
 	switch (stream_cfg_cmd->stream_src) {
 	case PIX_ENCODER:
 	case PIX_VIEWFINDER: {
-		if (plane_cfg->output_plane_format
-				!= CRCB_PLANE) {
+		if (plane_cfg->output_plane_format != CRCB_PLANE &&
+			plane_cfg->output_plane_format != CBCR_PLANE) {
 			/*SINGLE_STREAM_SEL*/
 			xbar_cfg |= plane_cfg->output_plane_format << 8;
 		} else {