msm: camera: uapi: Support for UAPI_HEADER_TEST config

Aligns the uapi header types and includes to be in-line with upstream
kernel formatting. The errors are given by enabling the UAPI_HEADER_TEST
config, which is now enabled in GKI builds.

CRs-Fixed: 2679250
Change-Id: I195fb2aab9251043fc63d79dd31f2db53b1228f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
This commit is contained in:
Karthik Jayakumar
2020-05-05 12:55:22 -07:00
parent beb3ea37bb
commit c6096c4e35
13 changed files with 899 additions and 899 deletions

View File

@@ -10,7 +10,7 @@
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/media.h>
#include <media/cam_defs.h>
#include <camera/media/cam_defs.h>
#define CAM_REQ_MGR_VNODE_NAME "cam-req-mgr-devnode"
@@ -96,13 +96,13 @@
* @tv_usec: timestamp in micro seconds
*/
struct cam_req_mgr_event_data {
int32_t session_hdl;
int32_t link_hdl;
int32_t frame_id;
int32_t reserved;
int64_t req_id;
uint64_t tv_sec;
uint64_t tv_usec;
__s32 session_hdl;
__s32 link_hdl;
__s32 frame_id;
__s32 reserved;
__s64 req_id;
__u64 tv_sec;
__u64 tv_usec;
};
/**
@@ -112,8 +112,8 @@ struct cam_req_mgr_event_data {
* @opcode2: CAM_REQ_MGR_DESTROY_SESSION
*/
struct cam_req_mgr_session_info {
int32_t session_hdl;
int32_t reserved;
__s32 session_hdl;
__s32 reserved;
};
/**
@@ -125,21 +125,21 @@ struct cam_req_mgr_session_info {
* @opcode: CAM_REQ_MGR_LINK
*/
struct cam_req_mgr_link_info {
int32_t session_hdl;
uint32_t num_devices;
int32_t dev_hdls[CAM_REQ_MGR_MAX_HANDLES];
int32_t link_hdl;
__s32 session_hdl;
__u32 num_devices;
__s32 dev_hdls[CAM_REQ_MGR_MAX_HANDLES];
__s32 link_hdl;
};
struct cam_req_mgr_link_info_v2 {
int32_t session_hdl;
uint32_t num_devices;
int32_t dev_hdls[CAM_REQ_MGR_MAX_HANDLES_V2];
int32_t link_hdl;
__s32 session_hdl;
__u32 num_devices;
__s32 dev_hdls[CAM_REQ_MGR_MAX_HANDLES_V2];
__s32 link_hdl;
};
struct cam_req_mgr_ver_info {
uint32_t version;
__u32 version;
union {
struct cam_req_mgr_link_info link_info_v1;
struct cam_req_mgr_link_info_v2 link_info_v2;
@@ -152,8 +152,8 @@ struct cam_req_mgr_ver_info {
* @opcode: CAM_REQ_MGR_UNLINK
*/
struct cam_req_mgr_unlink_info {
int32_t session_hdl;
int32_t link_hdl;
__s32 session_hdl;
__s32 link_hdl;
};
/**
@@ -172,11 +172,11 @@ struct cam_req_mgr_unlink_info {
* @opcode: CAM_REQ_MGR_FLUSH_REQ
*/
struct cam_req_mgr_flush_info {
int32_t session_hdl;
int32_t link_hdl;
uint32_t flush_type;
uint32_t reserved;
int64_t req_id;
__s32 session_hdl;
__s32 link_hdl;
__u32 flush_type;
__u32 reserved;
__s64 req_id;
};
/** struct cam_req_mgr_sched_info
@@ -194,13 +194,13 @@ struct cam_req_mgr_flush_info {
* @req_id: Input Param - Request Id from which all requests will be flushed
*/
struct cam_req_mgr_sched_request {
int32_t session_hdl;
int32_t link_hdl;
int32_t bubble_enable;
int32_t sync_mode;
int32_t additional_timeout;
int32_t reserved;
int64_t req_id;
__s32 session_hdl;
__s32 link_hdl;
__s32 bubble_enable;
__s32 sync_mode;
__s32 additional_timeout;
__s32 reserved;
__s64 req_id;
};
/**
@@ -219,12 +219,12 @@ struct cam_req_mgr_sched_request {
* @opcode: CAM_REQ_MGR_SYNC_MODE
*/
struct cam_req_mgr_sync_mode {
int32_t session_hdl;
int32_t sync_mode;
int32_t num_links;
int32_t link_hdls[MAX_LINKS_PER_SESSION];
int32_t master_link_hdl;
int32_t reserved;
__s32 session_hdl;
__s32 sync_mode;
__s32 num_links;
__s32 link_hdls[MAX_LINKS_PER_SESSION];
__s32 master_link_hdl;
__s32 reserved;
};
/**
@@ -238,11 +238,11 @@ struct cam_req_mgr_sync_mode {
* @opcode: CAM_REQ_MGR_LINK_CONTROL
*/
struct cam_req_mgr_link_control {
int32_t ops;
int32_t session_hdl;
int32_t num_links;
int32_t reserved;
int32_t link_hdls[MAX_LINKS_PER_SESSION];
__s32 ops;
__s32 session_hdl;
__s32 num_links;
__s32 reserved;
__s32 link_hdls[MAX_LINKS_PER_SESSION];
};
/**
@@ -335,9 +335,9 @@ struct cam_req_mgr_link_control {
* @vaddr: virtual address pointer
*/
struct cam_mem_alloc_out_params {
uint32_t buf_handle;
int32_t fd;
uint64_t vaddr;
__u32 buf_handle;
__s32 fd;
__u64 vaddr;
};
/**
@@ -347,9 +347,9 @@ struct cam_mem_alloc_out_params {
* @vaddr: virtual address pointer
*/
struct cam_mem_map_out_params {
uint32_t buf_handle;
uint32_t reserved;
uint64_t vaddr;
__u32 buf_handle;
__u32 reserved;
__u64 vaddr;
};
/**
@@ -363,11 +363,11 @@ struct cam_mem_map_out_params {
*/
/* CAM_REQ_MGR_ALLOC_BUF */
struct cam_mem_mgr_alloc_cmd {
uint64_t len;
uint64_t align;
int32_t mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
uint32_t num_hdl;
uint32_t flags;
__u64 len;
__u64 align;
__s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
__u32 num_hdl;
__u32 flags;
struct cam_mem_alloc_out_params out;
};
@@ -383,11 +383,11 @@ struct cam_mem_mgr_alloc_cmd {
/* CAM_REQ_MGR_MAP_BUF */
struct cam_mem_mgr_map_cmd {
int32_t mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
uint32_t num_hdl;
uint32_t flags;
int32_t fd;
uint32_t reserved;
__s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
__u32 num_hdl;
__u32 flags;
__s32 fd;
__u32 reserved;
struct cam_mem_map_out_params out;
};
@@ -398,8 +398,8 @@ struct cam_mem_mgr_map_cmd {
*/
/* CAM_REQ_MGR_RELEASE_BUF */
struct cam_mem_mgr_release_cmd {
int32_t buf_handle;
uint32_t reserved;
__s32 buf_handle;
__u32 reserved;
};
/**
@@ -409,8 +409,8 @@ struct cam_mem_mgr_release_cmd {
*/
/* CAM_REQ_MGR_CACHE_OPS */
struct cam_mem_cache_ops_cmd {
int32_t buf_handle;
uint32_t mem_cache_ops;
__s32 buf_handle;
__u32 mem_cache_ops;
};
/**
@@ -436,11 +436,11 @@ struct cam_mem_cache_ops_cmd {
* @resource_size: size of the resource
*/
struct cam_req_mgr_error_msg {
uint32_t error_type;
uint32_t request_id;
int32_t device_hdl;
int32_t link_hdl;
uint64_t resource_size;
__u32 error_type;
__u32 request_id;
__s32 device_hdl;
__s32 link_hdl;
__u64 resource_size;
};
/**
@@ -455,13 +455,13 @@ struct cam_req_mgr_error_msg {
* @reserved: reserved
*/
struct cam_req_mgr_frame_msg {
uint64_t request_id;
uint64_t frame_id;
uint64_t timestamp;
int32_t link_hdl;
uint32_t sof_status;
uint32_t frame_id_meta;
uint32_t reserved;
__u64 request_id;
__u64 frame_id;
__u64 timestamp;
__s32 link_hdl;
__u32 sof_status;
__u32 frame_id_meta;
__u32 reserved;
};
/**
@@ -474,12 +474,12 @@ struct cam_req_mgr_frame_msg {
* @custom_data: custom data
*/
struct cam_req_mgr_custom_msg {
uint32_t custom_type;
uint64_t request_id;
uint64_t frame_id;
uint64_t timestamp;
int32_t link_hdl;
uint64_t custom_data;
__u32 custom_type;
__u64 request_id;
__u64 frame_id;
__u64 timestamp;
__s32 link_hdl;
__u64 custom_data;
};
/**
@@ -489,8 +489,8 @@ struct cam_req_mgr_custom_msg {
* @u: union which can either be error/frame/custom message
*/
struct cam_req_mgr_message {
int32_t session_hdl;
int32_t reserved;
__s32 session_hdl;
__s32 reserved;
union {
struct cam_req_mgr_error_msg err_msg;
struct cam_req_mgr_frame_msg frame_msg;