mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
Merge "msm: camera: req_mgr: Link state check before process trigger workq" into camera-kernel.lnx.4.0
This commit is contained in:
commit
4bc14156bb
1 changed files with 11 additions and 1 deletions
|
|
@ -681,8 +681,10 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
|
|||
apply_req.trigger_point = trigger;
|
||||
if (dev->ops && dev->ops->apply_req) {
|
||||
rc = dev->ops->apply_req(&apply_req);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
*failed_dev = dev;
|
||||
return rc;
|
||||
}
|
||||
CAM_DBG(CAM_REQ,
|
||||
"SEND: link_hdl: %x pd: %d req_id %lld",
|
||||
link->link_hdl, pd, apply_req.request_id);
|
||||
|
|
@ -2456,6 +2458,14 @@ static int cam_req_mgr_process_trigger(void *priv, void *data)
|
|||
link->link_hdl, in_q->rd_idx, in_q->slot[in_q->rd_idx].status);
|
||||
|
||||
spin_lock_bh(&link->link_state_spin_lock);
|
||||
|
||||
if (link->state < CAM_CRM_LINK_STATE_READY) {
|
||||
CAM_WARN(CAM_CRM, "invalid link state:%d", link->state);
|
||||
spin_unlock_bh(&link->link_state_spin_lock);
|
||||
rc = -EPERM;
|
||||
goto release_lock;
|
||||
}
|
||||
|
||||
if (link->state == CAM_CRM_LINK_STATE_ERR)
|
||||
CAM_WARN(CAM_CRM, "Error recovery idx %d status %d",
|
||||
in_q->rd_idx,
|
||||
|
|
|
|||
Loading…
Reference in a new issue