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

Commit 6a625066 authored by Wyes Karny's avatar Wyes Karny Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: ife: Do not acquire IFE2 for HVX usecase in lagoon



In Lagoon camera there is no HVX support for IFE2.
Therefore at acquire time while acquiring IFE2 we are checking
if dsp_mode (HVX usecase) is set or not. If it is set then we are
failing the acquire.

CRs-Fixed: 2663455
Change-Id: I86235d8bcb9861db1d2570a59615ed227ee1b1eb
Signed-off-by: default avatarWyes Karny <wkarny@codeaurora.org>
parent f9b7fd02
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1524,6 +1524,16 @@ static int cam_ife_hw_mgr_acquire_csid_hw(
			if (!ife_hw_mgr->csid_devices[i])
				continue;

			if (csid_acquire->in_port->dsp_mode) {
				rc = ife_hw_mgr->ife_devices[i]->hw_ops
					.process_cmd(
					ife_hw_mgr->ife_devices[i]->hw_priv,
					CAM_ISP_HW_CMD_QUERY_DSP_MODE,
					NULL, 0);
				if (rc)
					continue;
			}

			hw_intf = ife_hw_mgr->csid_devices[i];
			rc = hw_intf->hw_ops.reserve(hw_intf->hw_priv,
				csid_acquire,
@@ -1539,6 +1549,15 @@ static int cam_ife_hw_mgr_acquire_csid_hw(
		if (!ife_hw_mgr->csid_devices[i])
			continue;

		if (csid_acquire->in_port->dsp_mode) {
			rc = ife_hw_mgr->ife_devices[i]->hw_ops.process_cmd(
				ife_hw_mgr->ife_devices[i]->hw_priv,
				CAM_ISP_HW_CMD_QUERY_DSP_MODE,
				NULL, 0);
			if (rc)
				continue;
		}

		hw_intf = ife_hw_mgr->csid_devices[i];
		rc = hw_intf->hw_ops.reserve(hw_intf->hw_priv,
			csid_acquire,
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ enum cam_isp_hw_cmd_type {
	CAM_ISP_HW_CMD_WM_CONFIG_UPDATE,
	CAM_ISP_HW_CMD_CSID_QCFA_SUPPORTED,
	CAM_ISP_HW_CMD_QUERY_REGSPACE_DATA,
	CAM_ISP_HW_CMD_QUERY_DSP_MODE,
	CAM_ISP_HW_CMD_DUMP_HW,
	CAM_ISP_HW_CMD_FE_TRIGGER_CMD,
	CAM_ISP_HW_CMD_MAX,
+1 −0
Original line number Diff line number Diff line
@@ -594,6 +594,7 @@ int cam_vfe_process_cmd(void *hw_priv, uint32_t cmd_type,
	case CAM_ISP_HW_CMD_CORE_CONFIG:
	case CAM_ISP_HW_CMD_BW_UPDATE_V2:
	case CAM_ISP_HW_CMD_DUMP_HW:
	case CAM_ISP_HW_CMD_QUERY_DSP_MODE:
		rc = core_info->vfe_top->hw_ops.process_cmd(
			core_info->vfe_top->top_priv, cmd_type, cmd_args,
			arg_size);
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/slab.h>
@@ -85,6 +85,9 @@ static int cam_vfe_get_dt_properties(struct cam_hw_soc_info *soc_info)
		break;
	}

	vfe_soc_private->dsp_disabled = of_property_read_bool(of_node,
		"dsp-disabled");

end:
	return rc;
}
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
 * @cpas_version:            Has cpas version read from Hardware
 * @ubwc_static_ctrl:        UBWC static control configuration
 * @is_ife_lite:             Flag to indicate full vs lite IFE
 * @dsp_disabled:            Flag to indicate DSP is not supported for VFE
 */
struct cam_vfe_soc_private {
	uint32_t    cpas_handle;
@@ -33,6 +34,7 @@ struct cam_vfe_soc_private {
	int32_t     dsp_clk_rate;
	uint32_t    ubwc_static_ctrl[UBWC_STATIC_CONFIG_MAX];
	bool        is_ife_lite;
	bool        dsp_disabled;
};

/*
Loading