Selaa lähdekoodia

msm: camera: isp: Fix the width calculation for WM packing

On CSID unpack and WM pack, align the sensor width to 8,
when WM packs the data when writing to DDR.

CRs-Fixed: 3140614
Change-Id: Ie994cbe45b5b87c8a50a4ae2a9929dee6a31860e
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 3 vuotta sitten
vanhempi
sitoutus
f0d04ce780

+ 3 - 3
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.c

@@ -522,7 +522,7 @@ static int cam_sfe_bus_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_MIPI10;
 			if (rsrc_data->wm_mode == CAM_SFE_WM_LINE_BASED_MODE)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_6:
@@ -564,7 +564,7 @@ static int cam_sfe_bus_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_MIPI12;
 			if (rsrc_data->wm_mode == CAM_SFE_WM_LINE_BASED_MODE)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_14:
@@ -581,7 +581,7 @@ static int cam_sfe_bus_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_MIPI14;
 			if (rsrc_data->wm_mode == CAM_SFE_WM_LINE_BASED_MODE)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_16:

+ 3 - 3
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -869,7 +869,7 @@ static int cam_vfe_bus_ver3_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_VER3_MIPI10;
 			if (rsrc_data->default_line_based)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_6:
@@ -912,7 +912,7 @@ static int cam_vfe_bus_ver3_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_VER3_MIPI12;
 			if (rsrc_data->default_line_based)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_14:
@@ -930,7 +930,7 @@ static int cam_vfe_bus_ver3_config_rdi_wm(
 		if (rsrc_data->use_wm_pack) {
 			rsrc_data->pack_fmt = PACKER_FMT_VER3_MIPI14;
 			if (rsrc_data->default_line_based)
-				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 16);
+				rsrc_data->width = ALIGNUP((rsrc_data->acquired_width), 8);
 		}
 		break;
 	case CAM_FORMAT_MIPI_RAW_16: