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

Commit 50585c27 authored by Junzhe Zou's avatar Junzhe Zou
Browse files

msm: camera: lrme: support y8 format input as well as pd format



Add check to determine the unpacker register in order to support y8 format.

Change-Id: Iebb49cf631287a5d199f0cc55d134ee8ec376e40
Signed-off-by: default avatarJunzhe Zou <jnzhezou@codeaurora.org>
parent e5c3238b
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -60,8 +60,17 @@ static void cam_lrme_hw_util_fill_fe_reg(struct cam_lrme_hw_io_buffer *io_buf,
		hw_info->bus_rd_reg.bus_client_reg[index].core_cfg, 0x1);

	/* 5. unpack_cfg */
	if (io_buf->io_cfg->format == CAM_FORMAT_PD10)
		cam_lrme_cdm_write_reg_val_pair(reg_val_pair, num_cmd,
		hw_info->bus_rd_reg.bus_client_reg[index].unpack_cfg_0, 0x0);
			hw_info->bus_rd_reg.bus_client_reg[index].unpack_cfg_0,
			0x0);
	else if (io_buf->io_cfg->format == CAM_FORMAT_Y_ONLY)
		cam_lrme_cdm_write_reg_val_pair(reg_val_pair, num_cmd,
			hw_info->bus_rd_reg.bus_client_reg[index].unpack_cfg_0,
			0x1);
	else
		CAM_ERR(CAM_LRME, "Unsupported format %d",
			io_buf->io_cfg->format);
}

static void cam_lrme_hw_util_fill_we_reg(struct cam_lrme_hw_io_buffer *io_buf,