Loading drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_core.c +19 −14 Original line number Diff line number Diff line Loading @@ -521,8 +521,14 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, "Flash off failed %d", rc); goto apply_setting_err; } } else if (flash_data->opcode == CAM_PKT_NOP_OPCODE) { flash_data->opcode = 0; CAM_DBG(CAM_FLASH, "NOP Packet"); } else { CAM_DBG(CAM_FLASH, "NOP opcode: req_id: %u", req_id); rc = -EINVAL; CAM_ERR(CAM_FLASH, "Invalid opcode: %d req_id: %llu", flash_data->opcode, req_id); goto apply_setting_err; } } Loading Loading @@ -807,17 +813,20 @@ int cam_flash_parser(struct cam_flash_ctrl *fctrl, void *arg) break; } case CAM_PKT_NOP_OPCODE: { frm_offset = csl_packet->header.request_id % MAX_PER_FRAME_ARRAY; if ((fctrl->flash_state == CAM_FLASH_STATE_INIT) || (fctrl->flash_state == CAM_FLASH_STATE_ACQUIRE)) { CAM_WARN(CAM_FLASH, "Rxed NOP packets without linking"); frm_offset = csl_packet->header.request_id % MAX_PER_FRAME_ARRAY; fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid = false; return 0; } fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid = false; fctrl->per_frame[frm_offset].cmn_attr.request_id = 0; fctrl->per_frame[frm_offset].opcode = CAM_PKT_NOP_OPCODE; CAM_DBG(CAM_FLASH, "NOP Packet is Received: req_id: %u", csl_packet->header.request_id); goto update_req_mgr; Loading Loading @@ -967,19 +976,15 @@ int cam_flash_apply_request(struct cam_req_mgr_apply_request *apply) fctrl = (struct cam_flash_ctrl *) cam_get_device_priv(apply->dev_hdl); if (!fctrl) { CAM_ERR(CAM_FLASH, "Device data is NULL"); rc = -EINVAL; goto free_resource; return -EINVAL; } if (!(apply->report_if_bubble)) { mutex_lock(&fctrl->flash_wq_mutex); rc = cam_flash_apply_setting(fctrl, apply->request_id); if (rc) CAM_ERR(CAM_FLASH, "apply_setting failed with rc=%d", rc); mutex_unlock(&fctrl->flash_wq_mutex); } free_resource: return rc; } drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_dev.h +4 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ struct cam_flash_intf_params { */ struct cam_flash_common_attr { bool is_settings_valid; int32_t request_id; uint64_t request_id; uint16_t count; uint8_t cmd_type; }; Loading Loading
drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_core.c +19 −14 Original line number Diff line number Diff line Loading @@ -521,8 +521,14 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl, "Flash off failed %d", rc); goto apply_setting_err; } } else if (flash_data->opcode == CAM_PKT_NOP_OPCODE) { flash_data->opcode = 0; CAM_DBG(CAM_FLASH, "NOP Packet"); } else { CAM_DBG(CAM_FLASH, "NOP opcode: req_id: %u", req_id); rc = -EINVAL; CAM_ERR(CAM_FLASH, "Invalid opcode: %d req_id: %llu", flash_data->opcode, req_id); goto apply_setting_err; } } Loading Loading @@ -807,17 +813,20 @@ int cam_flash_parser(struct cam_flash_ctrl *fctrl, void *arg) break; } case CAM_PKT_NOP_OPCODE: { frm_offset = csl_packet->header.request_id % MAX_PER_FRAME_ARRAY; if ((fctrl->flash_state == CAM_FLASH_STATE_INIT) || (fctrl->flash_state == CAM_FLASH_STATE_ACQUIRE)) { CAM_WARN(CAM_FLASH, "Rxed NOP packets without linking"); frm_offset = csl_packet->header.request_id % MAX_PER_FRAME_ARRAY; fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid = false; return 0; } fctrl->per_frame[frm_offset].cmn_attr.is_settings_valid = false; fctrl->per_frame[frm_offset].cmn_attr.request_id = 0; fctrl->per_frame[frm_offset].opcode = CAM_PKT_NOP_OPCODE; CAM_DBG(CAM_FLASH, "NOP Packet is Received: req_id: %u", csl_packet->header.request_id); goto update_req_mgr; Loading Loading @@ -967,19 +976,15 @@ int cam_flash_apply_request(struct cam_req_mgr_apply_request *apply) fctrl = (struct cam_flash_ctrl *) cam_get_device_priv(apply->dev_hdl); if (!fctrl) { CAM_ERR(CAM_FLASH, "Device data is NULL"); rc = -EINVAL; goto free_resource; return -EINVAL; } if (!(apply->report_if_bubble)) { mutex_lock(&fctrl->flash_wq_mutex); rc = cam_flash_apply_setting(fctrl, apply->request_id); if (rc) CAM_ERR(CAM_FLASH, "apply_setting failed with rc=%d", rc); mutex_unlock(&fctrl->flash_wq_mutex); } free_resource: return rc; }
drivers/media/platform/msm/camera/cam_sensor_module/cam_flash/cam_flash_dev.h +4 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ struct cam_flash_intf_params { */ struct cam_flash_common_attr { bool is_settings_valid; int32_t request_id; uint64_t request_id; uint16_t count; uint8_t cmd_type; }; Loading