Loading drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_core.c +27 −2 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -51,6 +51,7 @@ void cam_req_mgr_core_link_reset(struct cam_req_mgr_core_link *link) link->initial_skip = true; link->sof_timestamp = 0; link->prev_sof_timestamp = 0; link->num_sof_src = 0; } void cam_req_mgr_handle_core_shutdown(void) Loading Loading @@ -2475,7 +2476,8 @@ static int cam_req_mgr_cb_notify_trigger( struct cam_req_mgr_core_link *link = NULL; struct cam_req_mgr_trigger_notify *notify_trigger; struct crm_task_payload *task_data; bool send_sof = true; int i = 0; if (!trigger_data) { CAM_ERR(CAM_CRM, "sof_data is NULL"); rc = -EINVAL; Loading @@ -2489,6 +2491,23 @@ static int cam_req_mgr_cb_notify_trigger( rc = -EINVAL; goto end; } for (i = 0; i < link->num_sof_src; i++) { if (link->dev_sof_evt[i].dev_hdl == trigger_data->dev_hdl) { if (link->dev_sof_evt[i].sof_done == false) link->dev_sof_evt[i].sof_done = true; else CAM_DBG(CAM_CRM, "Received Surious SOF"); } else if (link->dev_sof_evt[i].sof_done == false) { send_sof = false; } } if (!send_sof) return 0; for (i = 0; i < link->num_sof_src; i++) link->dev_sof_evt[i].sof_done = false; spin_lock_bh(&link->link_state_spin_lock); if (link->state < CAM_CRM_LINK_STATE_READY) { Loading Loading @@ -2637,6 +2656,12 @@ static int __cam_req_mgr_setup_link_info(struct cam_req_mgr_core_link *link, subscribe_event |= (uint32_t)dev->dev_info.trigger; } if (dev->dev_info.dev_id == CAM_REQ_MGR_DEVICE_IFE) { link->dev_sof_evt[link->num_sof_src].dev_hdl = dev->dev_hdl; link->dev_sof_evt[link->num_sof_src].sof_done = false; link->num_sof_src++; } } link->subscribe_event = subscribe_event; Loading drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_core.h +13 −1 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -286,6 +286,16 @@ struct cam_req_mgr_connected_device { void *parent; }; /** * struct cam_req_mgr_ife_sof_evt * - Track SOF Events from IFE * @ dev_hdl : device handle * @ sof_done : tracks sof for individual IFE */ struct cam_req_mgr_dev_sof_evt { int32_t dev_hdl; bool sof_done; }; /** * struct cam_req_mgr_core_link * - Link Properties Loading Loading @@ -358,6 +368,8 @@ struct cam_req_mgr_core_link { int64_t initial_sync_req; uint64_t sof_timestamp; uint64_t prev_sof_timestamp; int32_t num_sof_src; struct cam_req_mgr_dev_sof_evt dev_sof_evt[3]; }; /** Loading Loading
drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_core.c +27 −2 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -51,6 +51,7 @@ void cam_req_mgr_core_link_reset(struct cam_req_mgr_core_link *link) link->initial_skip = true; link->sof_timestamp = 0; link->prev_sof_timestamp = 0; link->num_sof_src = 0; } void cam_req_mgr_handle_core_shutdown(void) Loading Loading @@ -2475,7 +2476,8 @@ static int cam_req_mgr_cb_notify_trigger( struct cam_req_mgr_core_link *link = NULL; struct cam_req_mgr_trigger_notify *notify_trigger; struct crm_task_payload *task_data; bool send_sof = true; int i = 0; if (!trigger_data) { CAM_ERR(CAM_CRM, "sof_data is NULL"); rc = -EINVAL; Loading @@ -2489,6 +2491,23 @@ static int cam_req_mgr_cb_notify_trigger( rc = -EINVAL; goto end; } for (i = 0; i < link->num_sof_src; i++) { if (link->dev_sof_evt[i].dev_hdl == trigger_data->dev_hdl) { if (link->dev_sof_evt[i].sof_done == false) link->dev_sof_evt[i].sof_done = true; else CAM_DBG(CAM_CRM, "Received Surious SOF"); } else if (link->dev_sof_evt[i].sof_done == false) { send_sof = false; } } if (!send_sof) return 0; for (i = 0; i < link->num_sof_src; i++) link->dev_sof_evt[i].sof_done = false; spin_lock_bh(&link->link_state_spin_lock); if (link->state < CAM_CRM_LINK_STATE_READY) { Loading Loading @@ -2637,6 +2656,12 @@ static int __cam_req_mgr_setup_link_info(struct cam_req_mgr_core_link *link, subscribe_event |= (uint32_t)dev->dev_info.trigger; } if (dev->dev_info.dev_id == CAM_REQ_MGR_DEVICE_IFE) { link->dev_sof_evt[link->num_sof_src].dev_hdl = dev->dev_hdl; link->dev_sof_evt[link->num_sof_src].sof_done = false; link->num_sof_src++; } } link->subscribe_event = subscribe_event; Loading
drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_core.h +13 −1 Original line number Diff line number Diff line /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -286,6 +286,16 @@ struct cam_req_mgr_connected_device { void *parent; }; /** * struct cam_req_mgr_ife_sof_evt * - Track SOF Events from IFE * @ dev_hdl : device handle * @ sof_done : tracks sof for individual IFE */ struct cam_req_mgr_dev_sof_evt { int32_t dev_hdl; bool sof_done; }; /** * struct cam_req_mgr_core_link * - Link Properties Loading Loading @@ -358,6 +368,8 @@ struct cam_req_mgr_core_link { int64_t initial_sync_req; uint64_t sof_timestamp; uint64_t prev_sof_timestamp; int32_t num_sof_src; struct cam_req_mgr_dev_sof_evt dev_sof_evt[3]; }; /** Loading