msm: camera: reqmgr: Add support for dual trigger

Currently CRM waits for a single trigger to apply settings
for all the devices on a given link. This change provides
provision for CRM to wait on two triggers prior to applying
a given setting.

CRs-Fixed: 2627065
Change-Id: If6e4c9281cfd1bf1a8ffa369daee060d79f3c39e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Tento commit je obsažen v:
Karthik Anantha Ram
2020-03-11 15:44:46 -07:00
rodič 5619d4e93e
revize b7a494a130
5 změnil soubory, kde provedl 95 přidání a 3 odebrání

Zobrazit soubor

@@ -1313,6 +1313,7 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
notify.trigger = CAM_TRIGGER_POINT_SOF;
notify.req_id = ctx_isp->req_info.last_bufdone_req_id;
notify.sof_timestamp_val = ctx_isp->sof_timestamp_val;
notify.trigger_id = ctx_isp->trigger_id;
ctx->ctx_crm_intf->notify_trigger(&notify);
CAM_DBG(CAM_ISP, "Notify CRM SOF frame %lld ctx %u",
@@ -4517,6 +4518,7 @@ static int __cam_isp_ctx_link_in_acquired(struct cam_context *ctx,
ctx->link_hdl = link->link_hdl;
ctx->ctx_crm_intf = link->crm_cb;
ctx_isp->subscribe_event = link->subscribe_event;
ctx_isp->trigger_id = link->trigger_id;
/* change state only if we had the init config */
if (ctx_isp->init_received) {
@@ -4533,9 +4535,12 @@ static int __cam_isp_ctx_unlink_in_acquired(struct cam_context *ctx,
struct cam_req_mgr_core_dev_link_setup *unlink)
{
int rc = 0;
struct cam_isp_context *ctx_isp =
(struct cam_isp_context *) ctx->ctx_priv;
ctx->link_hdl = -1;
ctx->ctx_crm_intf = NULL;
ctx_isp->trigger_id = -1;
return rc;
}
@@ -4550,6 +4555,7 @@ static int __cam_isp_ctx_get_dev_info_in_acquired(struct cam_context *ctx,
dev_info->dev_id = CAM_REQ_MGR_DEVICE_IFE;
dev_info->p_delay = 1;
dev_info->trigger = CAM_TRIGGER_POINT_SOF;
dev_info->trigger_on = true;
return rc;
}