Browse Source

msm: camera: reqmgr: Update log for shutdown

Add warn log to indicate shutdown has occurred.
Also decrement the open req count after successfully applying
a request.

Change-Id: I1b420dff52e016f52e19c5572824e4ed6f53744b
Signed-off-by: Karthik Anantha Ram <[email protected]>
Signed-off-by: Mukund Madhusudan Atre <[email protected]>
Karthik Anantha Ram 6 years ago
parent
commit
9712baaea9
2 changed files with 3 additions and 3 deletions
  1. 1 3
      drivers/cam_req_mgr/cam_req_mgr_core.c
  2. 2 0
      drivers/cam_req_mgr/cam_req_mgr_dev.c

+ 1 - 3
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -625,9 +625,6 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
 					*failed_dev = dev;
 					*failed_dev = dev;
 					break;
 					break;
 				}
 				}
-
-				if (pd == link->max_delay)
-					link->open_req_cnt--;
 			}
 			}
 			trace_cam_req_mgr_apply_request(link, &apply_req, dev);
 			trace_cam_req_mgr_apply_request(link, &apply_req, dev);
 		}
 		}
@@ -1260,6 +1257,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link,
 				&idx, reset_step + 1,
 				&idx, reset_step + 1,
 				in_q->num_slots);
 				in_q->num_slots);
 			__cam_req_mgr_reset_req_slot(link, idx);
 			__cam_req_mgr_reset_req_slot(link, idx);
+			link->open_req_cnt--;
 		}
 		}
 	}
 	}
 
 

+ 2 - 0
drivers/cam_req_mgr/cam_req_mgr_dev.c

@@ -151,6 +151,8 @@ static int cam_req_mgr_close(struct file *filep)
 	struct v4l2_fh *vfh = filep->private_data;
 	struct v4l2_fh *vfh = filep->private_data;
 	struct v4l2_subdev_fh *subdev_fh = to_v4l2_subdev_fh(vfh);
 	struct v4l2_subdev_fh *subdev_fh = to_v4l2_subdev_fh(vfh);
 
 
+	CAM_WARN(CAM_CRM,
+		"release invoked associated userspace process has died");
 	mutex_lock(&g_dev.cam_lock);
 	mutex_lock(&g_dev.cam_lock);
 
 
 	if (g_dev.open_cnt <= 0) {
 	if (g_dev.open_cnt <= 0) {