浏览代码

msm: camera: isp: Apply scratch only on SOF trigger

It's possible that CRM triggers frame skip call at SOF
and EOF. For IFE ignore the call on EOF. Only use
SOF trigger to apply default settings [scratch buffers],
for fetch engine use-cases.

CRs-Fixed: 3055035
Change-Id: Ic0b59e5beb6dff70bb1b515117f0b641d8e09308
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 3 年之前
父节点
当前提交
498012e556
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 11 0
      drivers/cam_isp/cam_isp_context.c
  2. 2 2
      drivers/cam_req_mgr/cam_req_mgr_core.c

+ 11 - 0
drivers/cam_isp/cam_isp_context.c

@@ -6238,6 +6238,17 @@ static int __cam_isp_ctx_apply_default_settings(
 	if (!ctx_isp->use_default_apply)
 		return 0;
 
+	if (!(apply->trigger_point & ctx_isp->subscribe_event)) {
+		CAM_WARN(CAM_ISP,
+			"Trigger: %u not subscribed for: %u",
+			apply->trigger_point, ctx_isp->subscribe_event);
+		return 0;
+	}
+
+	/* Allow apply default settings for IFE only at SOF */
+	if (apply->trigger_point != CAM_TRIGGER_POINT_SOF)
+		return 0;
+
 	CAM_DBG(CAM_ISP,
 		"Enter: apply req in Substate %d request _id:%lld",
 		 ctx_isp->substate_activated, apply->request_id);

+ 2 - 2
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -922,7 +922,7 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
 			apply_req.dev_hdl = dev->dev_hdl;
 			apply_req.request_id =
 				link->req.prev_apply_data[pd].req_id;
-			apply_req.trigger_point = 0;
+			apply_req.trigger_point = trigger;
 			apply_req.report_if_bubble = 0;
 			if ((dev->ops) && (dev->ops->notify_frame_skip))
 				dev->ops->notify_frame_skip(&apply_req);
@@ -1002,7 +1002,7 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
 				apply_req.dev_hdl = dev->dev_hdl;
 				apply_req.request_id =
 					link->req.prev_apply_data[pd].req_id;
-				apply_req.trigger_point = 0;
+				apply_req.trigger_point = trigger;
 				apply_req.report_if_bubble = 0;
 				if ((dev->ops) && (dev->ops->notify_frame_skip))
 					dev->ops->notify_frame_skip(&apply_req);