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

Commit 2f9eab3e authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Correct halt command for Yupik camera" into camera-kernel.lnx.4.0

parents bf2c5a30 39c0ecd7
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* SPDX-License-Identifier: GPL-2.0-only */
/*
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */
 */


 #ifndef _CPASTOP_V165_100_H_
 #ifndef _CPASTOP_V165_100_H_
@@ -337,7 +337,7 @@ static struct cam_camnoc_specific
			 * Power on default values are taking care of required
			 * Power on default values are taking care of required
			 * register settings.
			 * register settings.
			 */
			 */
			.enable = true,
			.enable = false,
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.access_type = CAM_REG_TYPE_READ_WRITE,
			.masked_value = 0,
			.masked_value = 0,
			.offset = 0x3B88, /* IFE01_NRDI_ENCCTL_LOW */
			.offset = 0x3B88, /* IFE01_NRDI_ENCCTL_LOW */
@@ -555,7 +555,7 @@ static struct cam_camnoc_specific
	{
	{
		/*SidebandManager_main_SidebandManager_FlagOutSet0_Low*/
		/*SidebandManager_main_SidebandManager_FlagOutSet0_Low*/
		.port_type = CAM_CAMNOC_ICP,
		.port_type = CAM_CAMNOC_ICP,
		.enable = true,
		.enable = false,
		.flag_out_set0_low = {
		.flag_out_set0_low = {
			.enable = true,
			.enable = true,
			.access_type = CAM_REG_TYPE_WRITE,
			.access_type = CAM_REG_TYPE_WRITE,
+6 −1
Original line number Original line Diff line number Diff line
@@ -2290,6 +2290,7 @@ static int cam_ife_csid_enable_pxl_path(
	uint32_t                                  val = 0;
	uint32_t                                  val = 0;
	struct cam_isp_sensor_dimension          *path_config;
	struct cam_isp_sensor_dimension          *path_config;
	unsigned int                              irq_mask_val = 0;
	unsigned int                              irq_mask_val = 0;
	uint32_t                                  camera_hw_version;


	path_data = (struct cam_ife_csid_path_cfg   *) res->res_priv;
	path_data = (struct cam_ife_csid_path_cfg   *) res->res_priv;
	csid_reg = csid_hw->csid_info->csid_reg;
	csid_reg = csid_hw->csid_info->csid_reg;
@@ -2342,6 +2343,8 @@ static int cam_ife_csid_enable_pxl_path(
		}
		}
	}
	}


	cam_cpas_get_cpas_hw_version(&camera_hw_version);

	/* Set master or slave path */
	/* Set master or slave path */
	if (path_data->sync_mode == CAM_ISP_HW_SYNC_MASTER) {
	if (path_data->sync_mode == CAM_ISP_HW_SYNC_MASTER) {
		/*Set halt mode as master */
		/*Set halt mode as master */
@@ -2352,7 +2355,8 @@ static int cam_ife_csid_enable_pxl_path(
			val = CSID_HALT_MODE_MASTER << 2;
			val = CSID_HALT_MODE_MASTER << 2;
	} else if (path_data->sync_mode == CAM_ISP_HW_SYNC_SLAVE) {
	} else if (path_data->sync_mode == CAM_ISP_HW_SYNC_SLAVE) {
		/*Set halt mode as slave and set master idx */
		/*Set halt mode as slave and set master idx */
		if (pxl_reg->halt_master_sel_en)
		if (pxl_reg->halt_master_sel_en ||
			camera_hw_version == CAM_CPAS_TITAN_165_V100)
			val = CSID_HALT_MODE_SLAVE << 2;
			val = CSID_HALT_MODE_SLAVE << 2;
		else
		else
			val = path_data->master_idx  << 4 |
			val = path_data->master_idx  << 4 |
@@ -2361,6 +2365,7 @@ static int cam_ife_csid_enable_pxl_path(
		/* Default is internal halt mode */
		/* Default is internal halt mode */
		val = 0;
		val = 0;
	}
	}

	/*
	/*
	 * Resume at frame boundary if Master or No Sync.
	 * Resume at frame boundary if Master or No Sync.
	 * Slave will get resume command from Master.
	 * Slave will get resume command from Master.
+2 −1
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* SPDX-License-Identifier: GPL-2.0-only */
/*
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */
 */


#ifndef _CAM_VFE165_160_H_
#ifndef _CAM_VFE165_160_H_
@@ -88,6 +88,7 @@ static struct cam_vfe_camif_reg_data vfe_165_160_camif_reg_data = {
	.subscribe_irq_mask0             = 0x00000017,
	.subscribe_irq_mask0             = 0x00000017,
	.subscribe_irq_mask1             = 0x00000000,
	.subscribe_irq_mask1             = 0x00000000,
	.enable_diagnostic_hw            = 0x1,
	.enable_diagnostic_hw            = 0x1,
	.dual_vfe_sync_mask              = 0x3,
};
};


static struct cam_vfe_fe_ver1_reg vfe165_160_fe_reg = {
static struct cam_vfe_fe_ver1_reg vfe165_160_fe_reg = {
+3 −6
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/ratelimit.h>
#include <linux/ratelimit.h>
@@ -2639,11 +2639,6 @@ static void cam_vfe_bus_update_ubwc_meta_addr(
	if (rc) {
	if (rc) {
		CAM_ERR(CAM_ISP, "Failed to get HW version rc: %d", rc);
		CAM_ERR(CAM_ISP, "Failed to get HW version rc: %d", rc);
		goto end;
		goto end;
	} else if ((camera_hw_version < CAM_CPAS_TITAN_170_V100) ||
		(camera_hw_version > CAM_CPAS_TITAN_175_V130)) {
		CAM_ERR(CAM_ISP, "Invalid HW version: %d",
			camera_hw_version);
		goto end;
	}
	}


	switch (camera_hw_version) {
	switch (camera_hw_version) {
@@ -2670,6 +2665,8 @@ static void cam_vfe_bus_update_ubwc_meta_addr(
			image_buf);
			image_buf);
		break;
		break;
	default:
	default:
		CAM_ERR(CAM_ISP, "Invalid HW version: %d",
			camera_hw_version);
		break;
		break;
	}
	}
end:
end: