Explorar o código

msm: camera: reqmgr: Reset the sync mode of sync link

Sometimes current link has reset the slot, but the corresponding
sync slot hasn't been processed, then sync link won't get the
corresponding slot. This change reset the sync mode of sync slot.

CRs-Fixed: 3305718
Change-Id: I6f826fe32edfabe74986fc0586a29e2060412b82
Signed-off-by: Depeng Shao <[email protected]>
Depeng Shao %!s(int64=2) %!d(string=hai) anos
pai
achega
bdab75eba2
Modificáronse 1 ficheiros con 7 adicións e 4 borrados
  1. 7 4
      drivers/cam_req_mgr/cam_req_mgr_core.c

+ 7 - 4
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -690,14 +690,14 @@ static int32_t __cam_req_mgr_find_slot_for_req(
 }
 
 /**
- * __cam_req_mgr_disconnect_flushed_req_on_sync_link()
+ * __cam_req_mgr_disconnect_req_on_sync_link()
  *
  * @brief    : Disconnect link and sync link
  * @link     : pointer to link
  * @slot     : poniter to slot
  *
  */
-static void __cam_req_mgr_disconnect_flushed_req_on_sync_link(
+static void __cam_req_mgr_disconnect_req_on_sync_link(
 	struct cam_req_mgr_core_link *link,
 	struct cam_req_mgr_slot      *slot)
 {
@@ -760,7 +760,7 @@ static void __cam_req_mgr_flush_req_slot(
 			idx, slot->req_id, slot->status);
 
 		if ((slot->req_id > 0) && slot->num_sync_links)
-			__cam_req_mgr_disconnect_flushed_req_on_sync_link(link, slot);
+			__cam_req_mgr_disconnect_req_on_sync_link(link, slot);
 
 		/* Reset input queue slot */
 		slot->req_id = -1;
@@ -821,6 +821,9 @@ static void __cam_req_mgr_reset_req_slot(struct cam_req_mgr_core_link *link,
 		idx < 0)
 		return;
 
+	if ((slot->req_id > 0) && slot->num_sync_links)
+		__cam_req_mgr_disconnect_req_on_sync_link(link, slot);
+
 	/* Reset input queue slot */
 	slot->req_id = -1;
 	slot->skip_idx = 0;
@@ -2838,7 +2841,7 @@ static int __cam_req_mgr_try_cancel_req(struct cam_req_mgr_core_link *link,
 
 	slot = &in_q->slot[idx];
 	if ((slot->req_id > 0) && slot->num_sync_links)
-		__cam_req_mgr_disconnect_flushed_req_on_sync_link(link, slot);
+		__cam_req_mgr_disconnect_req_on_sync_link(link, slot);
 
 	switch (slot->status) {
 	case CRM_SLOT_STATUS_REQ_PENDING: