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:
@@ -172,12 +172,6 @@ static int __cam_lrme_ctx_handle_irq_in_activated(void *context,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int __cam_lrme_shutdown_dev(
|
||||
struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
return cam_lrme_dev_close_internal(sd, fh);
|
||||
}
|
||||
|
||||
/* top state machine */
|
||||
static struct cam_ctx_ops
|
||||
cam_lrme_ctx_state_machine[CAM_CTX_STATE_MAX] = {
|
||||
@@ -191,7 +185,6 @@ static struct cam_ctx_ops
|
||||
{
|
||||
.ioctl_ops = {
|
||||
.acquire_dev = __cam_lrme_ctx_acquire_dev_in_available,
|
||||
.shutdown_dev = __cam_lrme_shutdown_dev,
|
||||
},
|
||||
.crm_ops = {},
|
||||
.irq_ops = NULL,
|
||||
@@ -202,24 +195,19 @@ static struct cam_ctx_ops
|
||||
.config_dev = __cam_lrme_ctx_config_dev_in_activated,
|
||||
.release_dev = __cam_lrme_ctx_release_dev_in_acquired,
|
||||
.start_dev = __cam_lrme_ctx_start_dev_in_acquired,
|
||||
.shutdown_dev = __cam_lrme_shutdown_dev,
|
||||
},
|
||||
.crm_ops = {},
|
||||
.irq_ops = NULL,
|
||||
},
|
||||
/* Ready */
|
||||
{
|
||||
.ioctl_ops = {
|
||||
.shutdown_dev = __cam_lrme_shutdown_dev,
|
||||
},
|
||||
.ioctl_ops = {},
|
||||
.crm_ops = {},
|
||||
.irq_ops = NULL,
|
||||
},
|
||||
/* Flushed */
|
||||
{
|
||||
.ioctl_ops = {
|
||||
.shutdown_dev = __cam_lrme_shutdown_dev,
|
||||
},
|
||||
.ioctl_ops = {},
|
||||
},
|
||||
/* Activate */
|
||||
{
|
||||
@@ -229,7 +217,6 @@ static struct cam_ctx_ops
|
||||
.stop_dev = __cam_lrme_ctx_stop_dev_in_activated,
|
||||
.flush_dev = __cam_lrme_ctx_flush_dev_in_activated,
|
||||
.dump_dev = __cam_lrme_ctx_dump_dev_in_activated,
|
||||
.shutdown_dev = __cam_lrme_shutdown_dev,
|
||||
},
|
||||
.crm_ops = {},
|
||||
.irq_ops = __cam_lrme_ctx_handle_irq_in_activated,
|
||||
|
Reference in New Issue
Block a user