msm: camera: sensor: Configuring sensor pd to 1 for hfr usecase
Configuring sensor pd to 1 for hfr usecase, then the setting of sensor can reflect on next batch. CRs-Fixed: 3376953 Change-Id: I4a78e087aec0e46f78f40ae8c37f1086125558de Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

부모
b2cd962ac2
커밋
305683fb02
@@ -185,6 +185,9 @@ static int cam_sensor_handle_res_info(struct cam_sensor_res_info *res_info,
|
||||
if (res_info->valid_param_mask & CAM_SENSOR_FEATURE_MASK)
|
||||
s_ctrl->sensor_res[idx].feature_mask =
|
||||
res_info->params[0];
|
||||
|
||||
if (res_info->valid_param_mask & CAM_SENSOR_NUM_BATCHED_FRAMES)
|
||||
s_ctrl->num_batched_frames = res_info->params[1];
|
||||
}
|
||||
|
||||
s_ctrl->is_res_info_updated = true;
|
||||
@@ -1265,6 +1268,7 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl,
|
||||
s_ctrl->is_stopped_by_user = false;
|
||||
s_ctrl->last_updated_req = 0;
|
||||
s_ctrl->last_applied_req = 0;
|
||||
s_ctrl->num_batched_frames = 0;
|
||||
memset(s_ctrl->sensor_res, 0, sizeof(s_ctrl->sensor_res));
|
||||
CAM_INFO(CAM_SENSOR,
|
||||
"CAM_ACQUIRE_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x",
|
||||
@@ -1394,11 +1398,12 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl,
|
||||
CAM_CONVERT_TIMESTAMP_FORMAT(ts, hrs, min, sec, ms);
|
||||
|
||||
CAM_INFO(CAM_SENSOR,
|
||||
"%llu:%llu:%llu.%llu CAM_START_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x",
|
||||
"%llu:%llu:%llu.%llu CAM_START_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x num_batched_frames:%d",
|
||||
hrs, min, sec, ms,
|
||||
s_ctrl->sensor_name,
|
||||
s_ctrl->sensordata->slave_info.sensor_id,
|
||||
s_ctrl->sensordata->slave_info.sensor_slave_addr);
|
||||
s_ctrl->sensordata->slave_info.sensor_slave_addr,
|
||||
s_ctrl->num_batched_frames);
|
||||
}
|
||||
break;
|
||||
case CAM_STOP_DEV: {
|
||||
@@ -1558,7 +1563,10 @@ int cam_sensor_publish_dev_info(struct cam_req_mgr_device_info *info)
|
||||
|
||||
info->dev_id = CAM_REQ_MGR_DEVICE_SENSOR;
|
||||
strlcpy(info->name, CAM_SENSOR_NAME, sizeof(info->name));
|
||||
if (s_ctrl->pipeline_delay >= 1 && s_ctrl->pipeline_delay <= 3) {
|
||||
if (s_ctrl->num_batched_frames >= 2) {
|
||||
info->p_delay = 1;
|
||||
info->m_delay = s_ctrl->modeswitch_delay;
|
||||
} else if (s_ctrl->pipeline_delay >= 1 && s_ctrl->pipeline_delay <= 3) {
|
||||
info->p_delay = s_ctrl->pipeline_delay;
|
||||
info->m_delay = s_ctrl->modeswitch_delay;
|
||||
} else {
|
||||
@@ -1567,6 +1575,9 @@ int cam_sensor_publish_dev_info(struct cam_req_mgr_device_info *info)
|
||||
}
|
||||
info->trigger = CAM_TRIGGER_POINT_SOF;
|
||||
|
||||
CAM_DBG(CAM_REQ, "num batched frames %d p_delay is %d",
|
||||
s_ctrl->num_batched_frames, info->p_delay);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -111,6 +111,7 @@ struct cam_sensor_dev_res_info {
|
||||
* @aon_camera_id: AON Camera ID associated with this sensor
|
||||
* @last_applied_req: Last updated request id
|
||||
* @last_applied_req: Last applied request id
|
||||
* @num_batched_frames: Number batched frames
|
||||
* @is_stopped_by_user: Indicate if sensor has been stopped by userland
|
||||
* @stream_off_after_eof: Indicates if sensor needs to stream off after eof
|
||||
* @is_res_info_updated: Indicate if resolution info is updated
|
||||
@@ -147,6 +148,7 @@ struct cam_sensor_ctrl_t {
|
||||
uint32_t aon_camera_id;
|
||||
int64_t last_updated_req;
|
||||
int64_t last_applied_req;
|
||||
uint32_t num_batched_frames;
|
||||
bool is_stopped_by_user;
|
||||
bool stream_off_after_eof;
|
||||
bool is_res_info_updated;
|
||||
|
Reference in New Issue
Block a user