From 0eaa2bd1520157a4b6dc81bd5928034db46d46ca Mon Sep 17 00:00:00 2001 From: Karthik Jayakumar Date: Mon, 27 Jan 2020 13:53:04 -0800 Subject: [PATCH] msm: camera: req_mgr: Header file comment fixes Update header files to reflect changes in functions that are being documented. CRs-Fixed: 2584631 Change-Id: I45e2c7830a685b43f25bfc1fb4db6800a2de6150 Signed-off-by: Karthik Jayakumar --- drivers/cam_req_mgr/cam_mem_mgr_api.h | 7 ++-- drivers/cam_req_mgr/cam_req_mgr_core.h | 18 ++++------- drivers/cam_req_mgr/cam_req_mgr_dev.h | 4 +-- drivers/cam_req_mgr/cam_req_mgr_interface.h | 36 +++++++++------------ drivers/cam_req_mgr/cam_req_mgr_timer.h | 7 ++-- drivers/cam_req_mgr/cam_req_mgr_workq.h | 24 +++++++------- drivers/cam_req_mgr/cam_subdev.h | 3 +- 7 files changed, 46 insertions(+), 53 deletions(-) diff --git a/drivers/cam_req_mgr/cam_mem_mgr_api.h b/drivers/cam_req_mgr/cam_mem_mgr_api.h index e216a46a3a6f..e3f741e80828 100644 --- a/drivers/cam_req_mgr/cam_mem_mgr_api.h +++ b/drivers/cam_req_mgr/cam_mem_mgr_api.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_MEM_MGR_API_H_ @@ -15,8 +15,7 @@ * @size : Size of memory requested for allocation * @align : Alignment of requested memory * @smmu_hdl: SMMU handle to identify context bank where memory will be mapped - * @flags : Flags to indicate cached/uncached property - * @region : Region where memory should be allocated + * @flags: Flags to indicate cached/uncached property */ struct cam_mem_mgr_request_desc { uint64_t size; @@ -83,7 +82,7 @@ int cam_mem_get_io_buf(int32_t buf_handle, int32_t mmu_handle, * * @buf_handle: Handle for the buffer * @vaddr_ptr : pointer to kernel virtual address - * @len_ptr : Length of the buffer + * @len : Length of the buffer * * @return Status of operation. Negative in case of error. Zero otherwise. */ diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.h b/drivers/cam_req_mgr/cam_req_mgr_core.h index 14cf4ff06a36..56669d9569e3 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.h +++ b/drivers/cam_req_mgr/cam_req_mgr_core.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_CORE_H_ #define _CAM_REQ_MGR_CORE_H_ @@ -63,7 +63,6 @@ enum crm_workq_task_type { * @flush_info : contains info of cancelled reqest * @dev_req : contains tracking info of available req id at device * @send_req : contains info of apply settings to be sent to devs in link - * @apply_req : contains info of which request is applied at device * @notify_trigger : contains notification from IFE to CRM about trigger * @notify_err : contains error info happened while processing request * - @@ -100,8 +99,8 @@ enum crm_req_state { * State machine for life cycle of request in input queue * NO_REQ : empty slot * REQ_ADDED : new entry in slot - * PENDING : waiting for next trigger to apply - * APPLIED : req is sent to all devices + * REQ_PENDING : waiting for next trigger to apply + * REQ_APPLIED : req is sent to all devices * INVALID : invalid state */ enum crm_slot_status { @@ -206,7 +205,7 @@ struct cam_req_mgr_tbl_slot { * @dev_count : num of devices having same pipeline delay * @dev_mask : mask to track which devices are linked * @skip_traverse : to indicate how many traverses need to be dropped - * by this table especially in the beginning or bubble recovery + * by this table especially in the beginning or bubble recovery * @next : pointer to next pipeline delay request table * @pd_delta : differnce between this table's pipeline delay and next * @num_slots : number of request slots present in the table @@ -268,7 +267,7 @@ struct cam_req_mgr_req_queue { * @in_q : Poiner to Input request queue * @l_tbl : unique pd request tables. * @num_tbl : how many unique pd value devices are present - * @apply_data : Holds information about request id for a request + * @apply_data : Holds information about request id for a request * @lock : mutex lock protecting request data ops. */ struct cam_req_mgr_req_data { @@ -384,7 +383,6 @@ struct cam_req_mgr_core_link { * @num_links : num of active links for current session * - Links of this session * @links : pointer to array of links within session - * @in_q : Input request queue one per session * - Session private data * @entry : pvt data - entry in the list of sessions * @lock : pvt data - spin lock to guard session data @@ -462,8 +460,7 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info); * @brief: Request is scheduled * @sched_req: request id, session and link id info, bubble recovery info */ -int cam_req_mgr_schedule_request( - struct cam_req_mgr_sched_request *sched_req); +int cam_req_mgr_schedule_request(struct cam_req_mgr_sched_request *sched_req); /** * cam_req_mgr_sync_mode_setup() @@ -477,8 +474,7 @@ int cam_req_mgr_sync_config(struct cam_req_mgr_sync_mode *sync_info); * @brief: flush all requests * @flush_info: requests related to link and session */ -int cam_req_mgr_flush_requests( - struct cam_req_mgr_flush_info *flush_info); +int cam_req_mgr_flush_requests(struct cam_req_mgr_flush_info *flush_info); /** * cam_req_mgr_core_device_init() diff --git a/drivers/cam_req_mgr/cam_req_mgr_dev.h b/drivers/cam_req_mgr/cam_req_mgr_dev.h index 86381d90080b..464720efb0a2 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_dev.h +++ b/drivers/cam_req_mgr/cam_req_mgr_dev.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_DEV_H_ @@ -28,7 +28,7 @@ struct cam_req_mgr_device { bool state; int32_t open_cnt; struct mutex cam_lock; - struct v4l2_fh *cam_eventq; + struct v4l2_fh *cam_eventq; spinlock_t cam_eventq_lock; }; diff --git a/drivers/cam_req_mgr/cam_req_mgr_interface.h b/drivers/cam_req_mgr/cam_req_mgr_interface.h index a932d1e52920..383d79c0871b 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_interface.h +++ b/drivers/cam_req_mgr/cam_req_mgr_interface.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_INTERFACE_H @@ -30,11 +30,11 @@ struct cam_req_mgr_link_evt_data; * * @cam_req_mgr_notify_trigger: for device which generates trigger to inform CRM * @cam_req_mgr_notify_err : device use this to inform about different errors - * @cam_req_mgr_add_req : to info CRm about new rqeuest received from + * @cam_req_mgr_add_req : to info CRM about new rqeuest received from * userspace + * @cam_req_mgr_notify_timer : start the timer */ -typedef int (*cam_req_mgr_notify_trigger)( - struct cam_req_mgr_trigger_notify *); +typedef int (*cam_req_mgr_notify_trigger)(struct cam_req_mgr_trigger_notify *); typedef int (*cam_req_mgr_notify_err)(struct cam_req_mgr_error_notify *); typedef int (*cam_req_mgr_add_req)(struct cam_req_mgr_add_request *); typedef int (*cam_req_mgr_notify_timer)(struct cam_req_mgr_timer_notify *); @@ -45,14 +45,12 @@ typedef int (*cam_req_mgr_notify_stop)(struct cam_req_mgr_notify_stop *); * * @cam_req_mgr_get_dev_info: to fetch details about device linked * @cam_req_mgr_link_setup : to establish link with device for a session - * @cam_req_mgr_notify_err : to broadcast error happened on link for request id - * @cam_req_mgr_apply_req : CRM asks device to apply certain request id. + * @cam_req_mgr_apply_req : CRM asks device to apply certain request id * @cam_req_mgr_flush_req : Flush or cancel request * cam_req_mgr_process_evt : generic events */ typedef int (*cam_req_mgr_get_dev_info) (struct cam_req_mgr_device_info *); -typedef int (*cam_req_mgr_link_setup)( - struct cam_req_mgr_core_dev_link_setup *); +typedef int (*cam_req_mgr_link_setup)(struct cam_req_mgr_core_dev_link_setup *); typedef int (*cam_req_mgr_apply_req)(struct cam_req_mgr_apply_request *); typedef int (*cam_req_mgr_flush_req)(struct cam_req_mgr_flush_request *); typedef int (*cam_req_mgr_process_evt)(struct cam_req_mgr_link_evt_data *); @@ -63,6 +61,7 @@ typedef int (*cam_req_mgr_process_evt)(struct cam_req_mgr_link_evt_data *); * @notify_trigger : payload for trigger indication event * @notify_err : payload for different error occurred at device * @add_req : payload to inform which device and what request is received + * @notify_timer : payload for timer start event * @notify_stop : payload to inform stop event */ struct cam_req_mgr_crm_cb { @@ -107,8 +106,8 @@ enum cam_pipeline_delay { }; /** - * @CAM_TRIGGER_POINT_SOF : Trigger point for SOF - * @CAM_TRIGGER_POINT_EOF : Trigger point for EOF + * @CAM_TRIGGER_POINT_SOF : Trigger point for Start Of Frame + * @CAM_TRIGGER_POINT_EOF : Trigger point for End Of Frame */ #define CAM_TRIGGER_POINT_SOF (1 << 0) #define CAM_TRIGGER_POINT_EOF (1 << 1) @@ -203,7 +202,7 @@ enum cam_req_mgr_link_evt_type { * @dev_hdl : device handle which has sent this req id * @frame_id : frame id for internal tracking * @trigger : trigger point of this notification, CRM will send apply - * only to the devices which subscribe to this point. + * only to the devices which subscribe to this point. * @sof_timestamp_val: Captured time stamp value at sof hw event * @req_id : req id which returned buf_done */ @@ -220,7 +219,6 @@ struct cam_req_mgr_trigger_notify { * struct cam_req_mgr_timer_notify * @link_hdl : link identifier * @dev_hdl : device handle which has sent this req id - * @frame_id : frame id for internal tracking * @state : timer state i.e ON or OFF */ struct cam_req_mgr_timer_notify { @@ -255,8 +253,7 @@ struct cam_req_mgr_error_notify { * @dev_hdl : device handle which has sent this req id * @req_id : req id which device is ready to process * @skip_before_applying : before applying req mgr introduce bubble - * by not sending request to device/s. - * ex: IFE and Flash + * by not sending request to devices. ex: IFE and Flash */ struct cam_req_mgr_add_request { int32_t link_hdl; @@ -284,7 +281,6 @@ struct cam_req_mgr_notify_stop { * @dev_id : device id info * @p_delay : delay between time settings applied and take effect * @trigger : Trigger point for the client - * */ struct cam_req_mgr_device_info { int32_t dev_hdl; @@ -296,13 +292,12 @@ struct cam_req_mgr_device_info { /** * struct cam_req_mgr_core_dev_link_setup - * @link_enable : link link or unlink + * @link_enable : link or unlink * @link_hdl : link identifier * @dev_hdl : device handle for reference * @max_delay : max pipeline delay on this link * @crm_cb : callback funcs to communicate with req mgr * @subscribe_event : the mask of trigger points this link subscribes - * */ struct cam_req_mgr_core_dev_link_setup { int32_t link_enable; @@ -335,7 +330,7 @@ struct cam_req_mgr_apply_request { * @link_hdl : link identifier * @dev_hdl : device handle for cross check * @type : cancel request type flush all or a request - * @request_id : request id to cancel + * @req_id : request id to cancel * */ struct cam_req_mgr_flush_request { @@ -349,7 +344,7 @@ struct cam_req_mgr_flush_request { * struct cam_req_mgr_event_data * @link_hdl : link handle * @req_id : request id - * + * @evt_type : link event */ struct cam_req_mgr_link_evt_data { int32_t link_hdl; @@ -365,8 +360,7 @@ struct cam_req_mgr_link_evt_data { /** * struct cam_req_mgr_send_request * @link_hdl : link identifier - * @idx : slot idx - * + * @in_q : input request queue pointer */ struct cam_req_mgr_send_request { int32_t link_hdl; diff --git a/drivers/cam_req_mgr/cam_req_mgr_timer.h b/drivers/cam_req_mgr/cam_req_mgr_timer.h index d2e20498df9a..5517a57d447e 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_timer.h +++ b/drivers/cam_req_mgr/cam_req_mgr_timer.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_TIMER_H_ @@ -11,7 +11,8 @@ #include "cam_req_mgr_core_defs.h" -/** struct cam_req_mgr_timer +/** + * struct cam_req_mgr_timer * @expires : timeout value for timer * @sys_timer : system timer variable * @parent : priv data - link pointer @@ -28,7 +29,7 @@ struct cam_req_mgr_timer { /** * crm_timer_modify() - * @brief : allows ser to modify expiry time. + * @brief : modify expiry time. * @timer : timer which will be reset to expires values */ void crm_timer_modify(struct cam_req_mgr_timer *crm_timer, diff --git a/drivers/cam_req_mgr/cam_req_mgr_workq.h b/drivers/cam_req_mgr/cam_req_mgr_workq.h index f938710b69ae..c09cb5eb64d8 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_workq.h +++ b/drivers/cam_req_mgr/cam_req_mgr_workq.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_REQ_MGR_WORKQ_H_ @@ -65,17 +65,19 @@ struct crm_workq_task { }; /** struct cam_req_mgr_core_workq - * @work : work token used by workqueue - * @job : workqueue internal job struct + * @work : work token used by workqueue + * @job : workqueue internal job struct + * @lock_bh : lock for task structs + * @in_irq : set true if workque can be used in irq context * task - - * @lock_bh : lock for task structs - * @in_irq : set true if workque can be used in irq context - * @free_cnt : num of free/available tasks - * @empty_head : list head of available taska which can be used - * or acquired in order to enqueue a task to workq - * @pool : pool of tasks used for handling events in workq context - * @num_task : size of tasks pool - * - + * @lock : Current task's lock handle + * @pending_cnt : # of tasks left in queue + * @free_cnt : # of free/available tasks + * @process_head: + * @empty_head : list head of available taska which can be used + * or acquired in order to enqueue a task to workq + * @pool : pool of tasks used for handling events in workq context + * @num_task : size of tasks pool */ struct cam_req_mgr_core_workq { struct work_struct work; diff --git a/drivers/cam_req_mgr/cam_subdev.h b/drivers/cam_req_mgr/cam_subdev.h index ef8e9fbac794..08d02a1b0fab 100644 --- a/drivers/cam_req_mgr/cam_subdev.h +++ b/drivers/cam_req_mgr/cam_subdev.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_SUBDEV_H_ @@ -34,6 +34,7 @@ * @ent_function: Media entity function type. Can be: * %CAM_IFE_DEVICE_TYPE - identifies as IFE device. * %CAM_ICP_DEVICE_TYPE - identifies as ICP device. + * @subdev_node_created: Enabled sub-device * * Each instance of a subdev driver should create this struct, either * stand-alone or embedded in a larger struct. This structure should be