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

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

msm: camera: isp: Update packer format for NV21



NV21 format has odd and even bytes swapped compared to NV12. Updated
the packer format to configure the WM correctly for NV21.

Change-Id: I9c210b119a7878f4a62a7dacae68f9e28bb07d63
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent de8b7f5d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -738,10 +738,12 @@ static int cam_vfe_bus_get_wm_idx(
}

static enum cam_vfe_bus_packer_format
	cam_vfe_bus_get_packer_fmt(uint32_t out_fmt)
	cam_vfe_bus_get_packer_fmt(uint32_t out_fmt, int wm_index)
{
	switch (out_fmt) {
	case CAM_FORMAT_NV21:
		if (wm_index == 4 || wm_index == 6)
			return PACKER_FMT_PLAIN_8_LSB_MSB_10_ODD_EVEN;
	case CAM_FORMAT_NV12:
	case CAM_FORMAT_UBWC_NV12:
	case CAM_FORMAT_UBWC_NV12_4R:
@@ -817,7 +819,8 @@ static int cam_vfe_bus_acquire_wm(
	rsrc_data->irq_enabled = subscribe_irq;
	rsrc_data->ctx = ctx;
	rsrc_data->format = out_port_info->format;
	rsrc_data->pack_fmt = cam_vfe_bus_get_packer_fmt(rsrc_data->format);
	rsrc_data->pack_fmt = cam_vfe_bus_get_packer_fmt(rsrc_data->format,
		wm_idx);

	rsrc_data->width = out_port_info->width;
	rsrc_data->height = out_port_info->height;