Sfoglia il codice sorgente

Merge "msm: camera: isp: Add correct plain16_10 format for AI port" into camera-kernel.lnx.7.0

Camera Software Integration 1 anno fa
parent
commit
c37b6e662c
1 ha cambiato i file con 16 aggiunte e 1 eliminazioni
  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;