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:
@@ -72,7 +72,7 @@ static int cam_lrme_dev_open(struct v4l2_subdev *sd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cam_lrme_dev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_lrme_dev_close_internal(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -109,7 +109,7 @@ end:
|
||||
static int cam_lrme_dev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_LRME);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_LRME, "CRM is ACTIVE, close should be from CRM");
|
||||
@@ -173,6 +173,7 @@ static int cam_lrme_component_bind(struct device *dev,
|
||||
goto deinit_ctx;
|
||||
}
|
||||
|
||||
node->sd_handler = cam_lrme_dev_close_internal;
|
||||
CAM_DBG(CAM_LRME, "Component bound successfully");
|
||||
|
||||
return 0;
|
||||
|
Verwijs in nieuw issue
Block a user