Forráskód Böngészése

msm: camera: isp: Add correct plain16_10 format for AI port

Currently format defined for AI port is not proper. Correct
the format for AI port.

CRs-Fixed: 3640786
Signed-off-by: Alok Chauhan <[email protected]>
Change-Id: If7b3323a9732a6834434fe2226da841d8383b6f3
(cherry picked from commit 7c1e2d4468835b55ada86932120e9a2fea3b999e)
Alok Chauhan 1 éve
szülő
commit
1f4d0deb5a
1 módosított fájl, 16 hozzáadás és 1 törlés
  1. 16 1
      drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c

+ 16 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c

@@ -335,7 +335,7 @@ static int cam_tfe_bus_get_num_wm(
 		switch (format) {
 		case CAM_FORMAT_NV12:
 		case CAM_FORMAT_TP10:
-		case CAM_FORMAT_PD10:
+		case CAM_FORMAT_PLAIN16_10:
 			return 2;
 		default:
 			break;
@@ -874,6 +874,21 @@ static int cam_tfe_bus_acquire_wm(
 		case CAM_FORMAT_PLAIN16_10:
 			rsrc_data->pack_fmt = 0x5;
 			rsrc_data->pack_fmt |= 0x10;
+
+			/* AI port */
+			if (rsrc_data->index == 13 || rsrc_data->index == 14) {
+				rsrc_data->pack_fmt = 0x5;
+				switch (plane) {
+				case PLANE_C:
+					rsrc_data->height /= 2;
+					break;
+				case PLANE_Y:
+					break;
+				default:
+					CAM_ERR(CAM_ISP, "Invalid plane %d", plane);
+					return -EINVAL;
+				}
+			}
 			break;
 		case CAM_FORMAT_PLAIN16_12:
 			rsrc_data->pack_fmt = 0x6;