msm: camera: sensor: Use bubble packet for request reapply

Use bubble packet for request reapply for all scenarios
irrespective of mode switch. Bubble packet carries exposure
updates as well.

CRs-Fixed: 3689201
Change-Id: If2170fd77ea7fe88155ed7101fc053d13bd592a8
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit c0b8a1bad215c6ba71851897ad642611f085dfb3)
This commit is contained in:
Karthik Anantha Ram
2023-12-18 14:32:03 -08:00
committed by Sridhar Gujje
parent 1d217d4df2
commit 6d725cc619

View File

@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/module.h>
@@ -1965,18 +1965,12 @@ int32_t cam_sensor_apply_request(struct cam_req_mgr_apply_request *apply)
}
if ((apply->recovery) && (apply->request_id > 0)) {
curr_idx = apply->request_id % MAX_PER_FRAME_ARRAY;
last_applied_idx = s_ctrl->last_applied_req % MAX_PER_FRAME_ARRAY;
/*
* If the sensor resolution index in current req isn't same with
* last applied index, we should apply bubble update.
*/
if ((s_ctrl->sensor_res[curr_idx].res_index !=
s_ctrl->sensor_res[last_applied_idx].res_index) ||
(s_ctrl->sensor_res[curr_idx].feature_mask !=
s_ctrl->sensor_res[last_applied_idx].feature_mask)) {
if (apply->request_id <= s_ctrl->last_applied_req) {
/*
* Use bubble update for request reapply
*/
curr_idx = apply->request_id % MAX_PER_FRAME_ARRAY;
last_applied_idx = s_ctrl->last_applied_req % MAX_PER_FRAME_ARRAY;
opcode = CAM_SENSOR_PACKET_OPCODE_SENSOR_BUBBLE_UPDATE;
CAM_INFO(CAM_REQ,
"Sensor[%d] update req id: %lld [last_applied: %lld] with opcode:%d recovery: %d last_applied_res_idx: %u current_res_idx: %u",