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:
@@ -31,7 +31,7 @@ static int cam_actuator_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_actuator_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_ACTUATOR);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_ACTUATOR,
|
||||
|
@@ -113,7 +113,7 @@ static int cam_csiphy_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_csiphy_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_CSIPHY);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_CSIPHY, "CRM is ACTIVE, close should be from CRM");
|
||||
|
@@ -31,7 +31,7 @@ static int cam_eeprom_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_eeprom_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_EEPROM);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_EEPROM, "CRM is ACTIVE, close should be from CRM");
|
||||
|
@@ -257,7 +257,7 @@ static int cam_flash_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_flash_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_FLASH);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_FLASH, "CRM is ACTIVE, close should be from CRM");
|
||||
|
@@ -31,7 +31,7 @@ static int cam_ois_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_ois_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_OIS);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_OIS, "CRM is ACTIVE, close should be from CRM");
|
||||
|
@@ -30,7 +30,7 @@ static int cam_sensor_subdev_close_internal(struct v4l2_subdev *sd,
|
||||
static int cam_sensor_subdev_close(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_fh *fh)
|
||||
{
|
||||
bool crm_active = cam_req_mgr_is_open(CAM_SENSOR);
|
||||
bool crm_active = cam_req_mgr_is_open();
|
||||
|
||||
if (crm_active) {
|
||||
CAM_DBG(CAM_SENSOR, "CRM is ACTIVE, close should be from CRM");
|
||||
|
Reference in New Issue
Block a user