msm: camera: icp: Add support for synx testing
Add support to receive synx test cmds, and forward it to ICP FW. Synx on ICP will process that cmd, and send a response. This response is returned to the caller. The objective of this infrastructure is to allow synx test app to validate synx functionality on ICP without running any actual use-case. CRs-Fixed: 3448052 Change-Id: I3785264f74c5c698146f4de1a82d25fe141cfc2a Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
c5af31b5fd
commit
9bf7e70f2d
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __UAPI_CAM_DEFS_H__
|
||||
@@ -30,6 +30,7 @@
|
||||
#define CAM_RELEASE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x2)
|
||||
#define CAM_DUMP_REQ (CAM_COMMON_OPCODE_BASE_v2 + 0x3)
|
||||
#define CAM_QUERY_CAP_V3 (CAM_COMMON_OPCODE_BASE_v2 + 0x4)
|
||||
#define CAM_SYNX_TEST_TRIGGER (CAM_COMMON_OPCODE_BASE_v2 + 0x5)
|
||||
|
||||
#define CAM_EXT_OPCODE_BASE 0x200
|
||||
#define CAM_CONFIG_DEV_EXTERNAL (CAM_EXT_OPCODE_BASE + 0x1)
|
||||
@@ -258,6 +259,10 @@ struct cam_iommu_handle {
|
||||
/* constants */
|
||||
#define CAM_PACKET_MAX_PLANES 3
|
||||
|
||||
/* synx test cmd types */
|
||||
#define CAM_SYNX_TEST_CMD_TYPE_CORE_CTRL 1
|
||||
#define CAM_SYNX_TEST_CMD_TYPE_SYNX_CMD 2
|
||||
|
||||
/**
|
||||
* struct cam_plane_cfg - Plane configuration info
|
||||
*
|
||||
@@ -907,4 +912,73 @@ struct cam_dump_req_cmd {
|
||||
__s32 dev_handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_synx_test_cmd - Synx test cmds
|
||||
*
|
||||
* @version: Struct version
|
||||
* @ip_mem_hdl: Input buf mem handle
|
||||
* corresponds to synx test inputs to the
|
||||
* fencing core
|
||||
* @op_mem_hdl: Output buf mem handle
|
||||
* corresponds to synx output generated by
|
||||
* the fencing core
|
||||
* @num_valid_params: Num valid params
|
||||
* @valid_param_mask: Valid param mask
|
||||
* @params: additional params
|
||||
*/
|
||||
struct cam_synx_test_cmd {
|
||||
__u32 version;
|
||||
__s32 ip_mem_hdl;
|
||||
__s32 op_mem_hdl;
|
||||
__u32 num_valid_params;
|
||||
__u32 valid_param_mask;
|
||||
__u32 params[5];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_synx_core_control - Synx core ctrl
|
||||
*
|
||||
* @version: Struct version
|
||||
* @core_control: Set for resume, unset for collapse
|
||||
* @num_valid_params: Num valid params
|
||||
* @valid_param_mask: Valid param mask
|
||||
* @params: additional params
|
||||
*/
|
||||
struct cam_synx_core_control {
|
||||
__u32 version;
|
||||
__u32 core_control;
|
||||
__u32 num_valid_params;
|
||||
__u32 valid_param_mask;
|
||||
__u32 params[4];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct cam_synx_test_params - Synx test params
|
||||
*
|
||||
* A test sequence could include creating and signaling
|
||||
* synx handle between ICP <-> APPs. These test params
|
||||
* would be cmds such as session initialize, synx create,
|
||||
* synx async wait, synx signal and so on
|
||||
*
|
||||
* @version: Struct version
|
||||
* @cmd_type: Type of test cmd - core control/synx cmd/...
|
||||
* @num_valid_params: Num valid params
|
||||
* @valid_param_mask: Valid param mask
|
||||
* @params: additional params
|
||||
* @test_cmd: Synx test cmd forwarded to the core
|
||||
* @core_ctrl: Synx test cmd to control fencing core
|
||||
*/
|
||||
struct cam_synx_test_params {
|
||||
__u32 version;
|
||||
__u32 cmd_type;
|
||||
__u32 num_valid_params;
|
||||
__u32 valid_param_mask;
|
||||
__u32 params[4];
|
||||
union {
|
||||
struct cam_synx_test_cmd test_cmd;
|
||||
struct cam_synx_core_control core_ctrl;
|
||||
} u;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#endif /* __UAPI_CAM_DEFS_H__ */
|
||||
|
Reference in New Issue
Block a user