msm: camera: common: Change shutdown sequence for subdevices
In subdev close call if CRM is still active wait for shutdown from CRM [media device]. Remove subdevice check for active handles, shutdown to happen irrespective of any active context. If CRM is not active, subdevice shutdown should ensure there is no access to kernel allocated buffers since at this point memmgr is de-initialized. As part of ICP close, remove usage of HFI queues, trigger PIL to transfer FW memory ownership back to HLOS and power off ICP. CRs-Fixed: 2976107 Change-Id: Ib05b3fbdcc33f4072da7ef77cf0118a807860e8c Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
This commit is contained in:
@@ -1605,19 +1605,6 @@ 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] = {
|
||||
@@ -1632,7 +1619,6 @@ 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,
|
||||
@@ -1644,7 +1630,6 @@ 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,
|
||||
@@ -1663,7 +1648,6 @@ 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,
|
||||
@@ -1681,7 +1665,6 @@ 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,
|
||||
@@ -1698,7 +1681,6 @@ 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,
|
||||
|
Reference in New Issue
Block a user