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

Commit 1c478e75 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: reqmgr: Add uapi for new v4l2 event type



Add event type to be notify custom events from the custom
driver. Also adds a new custom message definition.

CRs-Fixed: 2569823
Change-Id: I2ff701e79949ac3a467cbfe0c704065dbf0dc759
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent 6edca313
Loading
Loading
Loading
Loading
+22 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 */

#ifndef __UAPI_LINUX_CAM_REQ_MGR_H
@@ -51,6 +51,7 @@
#define V4L_EVENT_CAM_REQ_MGR_SOF            0
#define V4L_EVENT_CAM_REQ_MGR_ERROR          1
#define V4L_EVENT_CAM_REQ_MGR_SOF_BOOT_TS    2
#define V4L_EVENT_CAM_REQ_MGR_CUSTOM_EVT     3

/* SOF Event status */
#define CAM_REQ_MGR_SOF_EVENT_SUCCESS           0
@@ -459,11 +460,29 @@ struct cam_req_mgr_frame_msg {
	uint32_t reserved;
};

/**
 * struct cam_req_mgr_custom_msg
 * @custom_type: custom type
 * @request_id: request id of the frame
 * @frame_id: frame id of the frame
 * @timestamp: timestamp of the frame
 * @link_hdl: link handle associated with this message
 * @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;
};

/**
 * struct cam_req_mgr_message
 * @session_hdl: session to which the frame belongs to
 * @reserved: reserved field
 * @u: union which can either be error or frame message
 * @u: union which can either be error/frame/custom message
 */
struct cam_req_mgr_message {
	int32_t session_hdl;
@@ -471,6 +490,7 @@ struct cam_req_mgr_message {
	union {
		struct cam_req_mgr_error_msg err_msg;
		struct cam_req_mgr_frame_msg frame_msg;
		struct cam_req_mgr_custom_msg custom_msg;
	} u;
};
#endif /* __UAPI_LINUX_CAM_REQ_MGR_H */