msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence

when provider crash occurred, there was a CSID lane overflow
observed due to shutdown sequence from CRM(sensor, csid, csiphy).
To fix the issue need to change the shutdown sequence
(csid, sensor, csiphy).

This change will update the devices sequence in order while registering
and close the sequence accordingly.

CRs-Fixed: 2852076
Change-Id: Ia6d8022e995823bf031400c33528eb8544dc2e29
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
This commit is contained in:
Alok Chauhan
2020-10-15 20:32:53 +05:30
committed by Gerrit - the friendly Code Review server
parent 2c537f74d5
commit 2ebae4fabe
38 changed files with 867 additions and 178 deletions

View File

@@ -1604,6 +1604,19 @@ static int __cam_custom_ctx_apply_default_req(
return rc;
}
static int __cam_custom_ctx_shutdown_dev(
struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{
int rc = -EINVAL;
if (!sd || !fh) {
CAM_ERR(CAM_CUSTOM, "Invalid input pointer");
return rc;
}
return cam_custom_subdev_close_internal(sd, fh);
}
/* top state machine */
static struct cam_ctx_ops
cam_custom_dev_ctx_top_state_machine[CAM_CTX_STATE_MAX] = {
@@ -1618,6 +1631,7 @@ static struct cam_ctx_ops
.ioctl_ops = {
.acquire_dev =
__cam_custom_ctx_acquire_dev_in_available,
.shutdown_dev = __cam_custom_ctx_shutdown_dev,
},
.crm_ops = {},
.irq_ops = NULL,
@@ -1629,6 +1643,7 @@ static struct cam_ctx_ops
.release_dev = __cam_custom_release_dev_in_acquired,
.config_dev = __cam_custom_ctx_config_dev_in_acquired,
.release_hw = __cam_custom_ctx_release_hw_in_top_state,
.shutdown_dev = __cam_custom_ctx_shutdown_dev,
},
.crm_ops = {
.link = __cam_custom_ctx_link_in_acquired,
@@ -1647,6 +1662,7 @@ static struct cam_ctx_ops
.release_dev = __cam_custom_release_dev_in_acquired,
.config_dev = __cam_custom_ctx_config_dev,
.release_hw = __cam_custom_ctx_release_hw_in_top_state,
.shutdown_dev = __cam_custom_ctx_shutdown_dev,
},
.crm_ops = {
.unlink = __cam_custom_ctx_unlink_in_ready,
@@ -1664,6 +1680,7 @@ static struct cam_ctx_ops
.config_dev = __cam_custom_ctx_config_dev_in_flushed,
.release_hw =
__cam_custom_ctx_release_hw_in_activated_state,
.shutdown_dev = __cam_custom_ctx_shutdown_dev,
},
.crm_ops = {
.unlink = __cam_custom_ctx_unlink_in_ready,
@@ -1680,6 +1697,7 @@ static struct cam_ctx_ops
.config_dev = __cam_custom_ctx_config_dev,
.release_hw =
__cam_custom_ctx_release_hw_in_activated_state,
.shutdown_dev = __cam_custom_ctx_shutdown_dev,
},
.crm_ops = {
.unlink = __cam_custom_ctx_unlink_in_activated,