Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1ce3464 authored by Harsh Shah's avatar Harsh Shah
Browse files

msm: camera: isp: Configure WM10 as LSB aligned for PDAF



WM 10 is muxed between 2PD out and PDAF out. Configure the
WM 10 as LSB-aligned if it is associated with PDAF out. Also
change WM10 to frame based for both PDAF and 2PD outputs.

Change-Id: Ia25160a6fc6a4314b062ac46a74fc755b47f555d
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 38bf0c90
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -1049,12 +1049,21 @@ static int cam_vfe_bus_acquire_wm(
			return -EINVAL;
		}
		rsrc_data->en_cfg = 0x1;
	} else if ((rsrc_data->index >= 10) && (rsrc_data->index < 20)) {
		/* Write master 10-19 stats */
	} else if (rsrc_data->index >= 11 && rsrc_data->index < 20) {
		/* Write master 11 - 19 stats */
		rsrc_data->width = 0;
		rsrc_data->height = 0;
		rsrc_data->stride = 1;
		rsrc_data->en_cfg = 0x3;
	} else if (rsrc_data->index == 10) {
		/* Write master 10 - PDAF/2PD */
		rsrc_data->width = 0;
		rsrc_data->height = 0;
		rsrc_data->stride = 1;
		rsrc_data->en_cfg = 0x3;
		if (vfe_out_res_id == CAM_VFE_BUS_VER2_VFE_OUT_PDAF)
			/* LSB aligned */
			rsrc_data->pack_fmt |= 0x10;
	}  else if (rsrc_data->index == 9) {
		/* Write master 9 - Raw dump */
		rsrc_data->width = rsrc_data->width * 2;
@@ -1063,7 +1072,7 @@ static int cam_vfe_bus_acquire_wm(
		/* LSB aligned */
		rsrc_data->pack_fmt |= 0x10;
	}  else {
		/* Write master 5-6 DS ports, 10 PDAF */
		/* Write master 5-6 DS ports */
		uint32_t align_width;

		rsrc_data->width = rsrc_data->width * 4;