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

Commit 6562f695 authored by Jing Zhou's avatar Jing Zhou Committed by Gerrit - the friendly Code Review server
Browse files

msm: cam: uapi: Modify the uapi header for the camera driver



Move acquire and query caps commands to the common definition file.
Also add more flags in the input port information structure.

CRs-Fixed: 2018082
Change-Id: I4f584f8cbe44d16f433bb985886ea523f61dc065
Signed-off-by: default avatarJing Zhou <jzhou70@codeaurora.org>
parent bed4cbb7
Loading
Loading
Loading
Loading
+41 −4
Original line number Diff line number Diff line
@@ -250,18 +250,18 @@ struct cam_cmd_buf_desc {
 * struct cam_packet_header - camera packet header
 *
 * @op_code:                    camera packet opcode
 * @dev_type:                   camera packet device type
 * @size:                       size of the camera packet in bytes
 * @flags:                      flags for the camera packet
 * @request_id:                 request id for this camera packet
 * @flags:                      flags for the camera packet
 * @dev_type:                   camera packet device type
 *
 */
struct cam_packet_header {
	uint32_t                op_code;
	uint32_t                dev_type;
	uint32_t                size;
	uint32_t                flags;
	uint64_t                request_id;
	uint32_t                flags;
	uint32_t                dev_type;
};

/**
@@ -354,4 +354,41 @@ struct cam_config_dev_cmd {
	uint64_t                packet_handle;
};

/* Query Device Caps */
/**
 * struct cam_query_cap_cmd - payload for query device capability
 *
 * @size:               handle size
 * @handle_type:        user pointer or shared memory handle
 * @caps_handle:        device specific query command payload
 *
 */
struct cam_query_cap_cmd {
	uint32_t        size;
	uint32_t        handle_type;
	uint64_t        caps_handle;
};

/* Acquire Device */
/**
 * struct cam_acquire_dev_cmd - control payload for acquire devices
 *
 * @session_handle:     session handle for the acquire command
 * @dev_handle:         device handle to be returned
 * @handle_type:        resource handle type:
 *                             1 = user poniter, 2 = mem handle
 * @num_resources:      number of the resources to be acquired
 * @resources_hdl:      resource handle that refers to the actual
 *                             resource array. Each item in this
 *                             array is device specific resource structure
 *
 */
struct cam_acquire_dev_cmd {
	int32_t         session_handle;
	int32_t         dev_handle;
	uint32_t        handle_type;
	uint32_t        num_resources;
	uint64_t        resource_hdl;
};

#endif /* __UAPI_CAM_DEFS_H__ */
+12 −22
Original line number Diff line number Diff line
@@ -75,17 +75,24 @@
#define CAM_ISP_PACKET_META_CSID                8
#define CAM_ISP_PACKET_META_MAX                 9

/* DSP mode */
#define CAM_ISP_DSP_MODE_NONE                   0
#define CAM_ISP_DSP_MODE_ONE_WAY                1
#define CAM_ISP_DSP_MODE_ROUND                  2


/* Query devices */
/**
 * struct cam_isp_dev_cap_info - A cap info for particular hw type
 *
 * @hw_type:            Hardware type for the cap info
 * @reserved:           reserved field for alignment
 * @hw_version:         Hardware version
 *
 */
struct cam_isp_dev_cap_info {
	uint32_t              hw_type;
	uint32_t              reserved;
	struct cam_hw_version hw_version;
};

@@ -161,7 +168,9 @@ struct cam_isp_out_port_info {
 * @height:                     input height in lines
 * @pixel_clk;                  sensor output clock
 * @batch_size:                 batch size for HFR mode
 * @reserved:                   reserved field for alignment
 * @dsp_mode:                   DSP stream mode (Defines as CAM_ISP_DSP_MODE_*)
 * @hbi_cnt:                    HBI count for the camif input
 * @reserved:                   Reserved field for alignment
 * @num_out_res:                number of the output resource associated
 * @data:                       payload that contains the output resources
 *
@@ -187,6 +196,8 @@ struct cam_isp_in_port_info {
	uint32_t                        height;
	uint32_t                        pixel_clk;
	uint32_t                        batch_size;
	uint32_t                        dsp_mode;
	uint32_t                        hbi_cnt;
	uint32_t                        reserved;
	uint32_t                        num_out_res;
	struct cam_isp_out_port_info    data[1];
@@ -211,25 +222,4 @@ struct cam_isp_resource {
	uint64_t                       res_hdl;
};

/**
 * struct cam_isp_acquire_dev_cmd - control payload for acquire devices
 *
 * @session_handle:             session handle for the acquire command
 * @dev_handle:                 device handle to be returned
 * @num_resources:              number of the resources to be acquired
 * @handle_type:                resource handle type:
 *                                      1 = user poniter, 2 = mem handle
 * @resources_hdl:              resource handle that refers to the actual
 *                                      resource array. Each item in this
 *                                      array is struct cam_isp_resource
 *
 */
struct cam_isp_acquire_dev_cmd {
	int32_t                 session_handle;
	int32_t                 dev_handle;
	uint32_t                num_resources;
	uint32_t                handle_type;
	uint64_t                resource_hdl;
};

#endif /* __UAPI_CAM_ISP_H__ */