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

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

Merge "msm: camera: isp: Support all patterns for TOP TPG" into camera-kernel.lnx.4.0

parents 12c02d3c 6e685521
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -3252,6 +3252,17 @@ static int cam_tfe_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args)
	if (ctx->init_done && start_isp->start_only)
		goto start_only;

	/* set tpg debug information for top tpg */
	for (i = 0; i < CAM_TOP_TPG_HW_NUM_MAX; i++) {
		if (g_tfe_hw_mgr.tpg_devices[i]) {
			rc = g_tfe_hw_mgr.tpg_devices[i]->hw_ops.process_cmd(
				g_tfe_hw_mgr.tpg_devices[i]->hw_priv,
				CAM_ISP_HW_CMD_TPG_SET_PATTERN,
				&g_tfe_hw_mgr.debug_cfg.set_tpg_pattern,
				sizeof(g_tfe_hw_mgr.debug_cfg.set_tpg_pattern));
		}
	}

	list_for_each_entry(hw_mgr_res, &ctx->res_list_tfe_csid, list) {
		for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
			if (!hw_mgr_res->hw_res[i])
@@ -5813,6 +5824,7 @@ static int cam_tfe_hw_mgr_debug_register(void)
	int rc = 0;
	struct dentry *dbgfileptr = NULL;

	g_tfe_hw_mgr.debug_cfg.set_tpg_pattern = CAM_TOP_TPG_DEFAULT_PATTERN;
	dbgfileptr = debugfs_create_dir("camera_tfe", NULL);
	if (!dbgfileptr) {
		CAM_ERR(CAM_ISP, "DebugFS could not create directory!");
@@ -5833,6 +5845,9 @@ static int cam_tfe_hw_mgr_debug_register(void)
	dbgfileptr = debugfs_create_u32("enable_csid_recovery", 0644,
		g_tfe_hw_mgr.debug_cfg.dentry,
		&g_tfe_hw_mgr.debug_cfg.enable_csid_recovery);
	dbgfileptr = debugfs_create_u32("set_tpg_pattern", 0644,
		g_tfe_hw_mgr.debug_cfg.dentry,
		&g_tfe_hw_mgr.debug_cfg.set_tpg_pattern);
	dbgfileptr = debugfs_create_file("tfe_camif_debug", 0644,
		g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug);
	dbgfileptr = debugfs_create_u32("per_req_reg_dump", 0644,
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _CAM_TFE_HW_MGR_H_
@@ -30,6 +30,7 @@
 * @enable_recovery:           enable recovery
 * @enable_csid_recovery:      enable csid recovery
 * @camif_debug:               enable sensor diagnosis status
 * @set_tpg_pattern:           tpg pattern information
 * @enable_reg_dump:           enable reg dump on error;
 * @per_req_reg_dump:          Enable per request reg dump
 *
@@ -40,6 +41,7 @@ struct cam_tfe_hw_mgr_debug {
	uint32_t       enable_recovery;
	uint32_t       enable_csid_recovery;
	uint32_t       camif_debug;
	uint32_t       set_tpg_pattern;
	uint32_t       enable_reg_dump;
	uint32_t       per_req_reg_dump;
};
+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ enum cam_isp_hw_cmd_type {
	CAM_ISP_HW_CMD_GET_CLOCK_RATE,
	CAM_ISP_HW_CMD_DYNAMIC_CLOCK_UPDATE,
	CAM_ISP_HW_DUMP_HW_SRC_CLK_RATE,
	CAM_ISP_HW_CMD_TPG_SET_PATTERN,
	CAM_ISP_HW_CMD_MAX,
};

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

#ifndef _CAM_TOP_TPG_HW_INTF_H_
@@ -14,7 +14,8 @@
#define CAM_TOP_TPG_HW_NUM_MAX                        3
/* Max supported number of DT for TPG */
#define CAM_TOP_TPG_MAX_SUPPORTED_DT                  4

/* TPG default pattern should be color bar */
#define CAM_TOP_TPG_DEFAULT_PATTERN                   0x8
/**
 * enum cam_top_tpg_id - top tpg hw instance id
 */
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _CAM_TOP_TPG101_H_
@@ -49,6 +49,7 @@ static struct cam_top_tpg_ver1_reg_offset cam_top_tpg101_reg = {
	.tpg_payload_mode_color = 0x8,
	.tpg_split_en_shift = 5,
	.top_mux_reg_offset = 0x1C,
	.top_unicolor_bar_shift = 2,
};

struct cam_top_tpg_hw_info cam_top_tpg101_hw_info = {
Loading