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

Commit e50e5663 authored by Ravikishore Pampana's avatar Ravikishore Pampana
Browse files

msm: camera: tfe: Add packet code get command for tfe



Add packet opcode get command in the tfe hw manager.
This is required during the packet config in the isp context to
check the packet type init or config.

CRs-Fixed: 2599088
Change-Id: Id1ecf60bccc00aedf317d9cd223c4daea83fe84e
Signed-off-by: default avatarRavikishore Pampana <rpampana@codeaurora.org>
parent c2352724
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -4146,6 +4146,7 @@ static int cam_tfe_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
	struct cam_tfe_hw_mgr_ctx *ctx = (struct cam_tfe_hw_mgr_ctx *)
		hw_cmd_args->ctxt_to_hw_map;
	struct cam_isp_hw_cmd_args *isp_hw_cmd_args = NULL;
	struct cam_packet          *packet;

	if (!hw_mgr_priv || !cmd_args) {
		CAM_ERR(CAM_ISP, "Invalid arguments");
@@ -4184,6 +4185,17 @@ static int cam_tfe_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
			else
				isp_hw_cmd_args->u.ctx_type = CAM_ISP_CTX_PIX;
			break;
		case CAM_ISP_HW_MGR_GET_PACKET_OPCODE:
			packet = (struct cam_packet *)
				isp_hw_cmd_args->cmd_data;
			if ((packet->header.op_code & 0xF) ==
				CAM_ISP_TFE_PACKET_INIT_DEV)
				isp_hw_cmd_args->u.packet_op_code =
				CAM_ISP_TFE_PACKET_INIT_DEV;
			else
				isp_hw_cmd_args->u.packet_op_code =
				CAM_ISP_TFE_PACKET_CONFIG_DEV;
			break;
		default:
			CAM_ERR(CAM_ISP, "Invalid HW mgr command:0x%x",
				hw_cmd_args->cmd_type);
@@ -4231,7 +4243,6 @@ static int cam_tfe_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
			return rc;
		}
		break;

	default:
		CAM_ERR(CAM_ISP, "Invalid cmd");
	}