瀏覽代碼

msm: camera: isp: Reset sync object if signaled

Reset sync obj in isp request structure to -1 if signaled.

CRs-Fixed: 2967520
Change-Id: Ie8e163785a88e9cd88f8423f2e7dad5c6f72c4de
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 4 年之前
父節點
當前提交
3f4b6558c1
共有 1 個文件被更改,包括 11 次插入10 次删除
  1. 11 10
      drivers/cam_isp/cam_isp_context.c

+ 11 - 10
drivers/cam_isp/cam_isp_context.c

@@ -1202,6 +1202,7 @@ static int __cam_isp_handle_deferred_buf_done(
 						status, rc);
 				} else {
 					req_isp->num_acked++;
+					req_isp->fence_map_out[j].sync_id = -1;
 				}
 			}
 		} else {
@@ -1328,8 +1329,8 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
 					CAM_SYNC_COMMON_EVENT_SUCCESS);
 			}
 			if (rc) {
-				CAM_DBG(CAM_ISP, "Sync failed with rc = %d",
-					 rc);
+				CAM_ERR(CAM_ISP, "Sync = %u for req = %llu failed with rc = %d",
+					 req_isp->fence_map_out[j].sync_id, req->request_id, rc);
 			} else if (req_isp->num_deferred_acks) {
 				/* Process deferred buf_done acks */
 				__cam_isp_handle_deferred_buf_done(ctx_isp,
@@ -1337,6 +1338,9 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
 					CAM_SYNC_STATE_SIGNALED_SUCCESS,
 					CAM_SYNC_COMMON_EVENT_SUCCESS);
 			}
+			/* Reset fence */
+			if (!req_isp->is_sync_mode)
+				req_isp->fence_map_out[j].sync_id = -1;
 		} else if (!req_isp->bubble_report) {
 			CAM_DBG(CAM_ISP,
 				"Sync with failure: req %lld res 0x%x fd 0x%x, ctx %u",
@@ -1349,8 +1353,8 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
 				CAM_SYNC_STATE_SIGNALED_ERROR,
 				CAM_SYNC_ISP_EVENT_BUBBLE);
 			if (rc) {
-				CAM_ERR(CAM_ISP, "Sync failed with rc = %d",
-					rc);
+				CAM_ERR(CAM_ISP, "Sync = %u for req = %llu failed with rc = %d",
+					req_isp->fence_map_out[j].sync_id, req->request_id, rc);
 			} else if (req_isp->num_deferred_acks) {
 				/* Process deferred buf_done acks */
 				__cam_isp_handle_deferred_buf_done(ctx_isp, req,
@@ -1358,6 +1362,8 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
 					CAM_SYNC_STATE_SIGNALED_ERROR,
 					CAM_SYNC_ISP_EVENT_BUBBLE);
 			}
+			/* Reset fence */
+			req_isp->fence_map_out[j].sync_id = -1;
 		} else {
 			/*
 			 * Ignore the buffer done if bubble detect is on
@@ -1380,12 +1386,7 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
 			continue;
 		}
 
-		CAM_DBG(CAM_ISP, "req %lld, reset sync id 0x%x ctx %u",
-			req->request_id,
-			req_isp->fence_map_out[j].sync_id, ctx->ctx_id);
-		if (!rc) {
-			req_isp->num_acked++;
-		}
+		req_isp->num_acked++;
 
 		if ((ctx_isp->use_frame_header_ts) &&
 			(req_isp->hw_update_data.frame_header_res_id ==