Эх сурвалжийг харах

msm: camera: sensor: Only handle the valid request

CRM may give an invalid request id to sensor when the
first req isn't ready, since we don't have chance to
update prev_apply_data in CRM. This change adds a
protection in sensor side to only handle the valid
request for per frame update.

CRs-Fixed: 2738404
Change-Id: Ic43d68a69c10b7b063b40a0cef17e55e748b8b2a
Signed-off-by: Depeng Shao <[email protected]>
Depeng Shao 5 жил өмнө
parent
commit
ab936609b8

+ 1 - 1
drivers/cam_sensor_module/cam_sensor/cam_sensor_core.c

@@ -1261,7 +1261,7 @@ int cam_sensor_apply_settings(struct cam_sensor_ctrl_t *s_ctrl,
 				}
 			}
 		}
-	} else {
+	} else if (req_id > 0) {
 		offset = req_id % MAX_PER_FRAME_ARRAY;
 
 		if (opcode == CAM_SENSOR_PACKET_OPCODE_SENSOR_FRAME_SKIP_UPDATE)