[libcamera-devel,1/4] ipa: ipu3: af: Introduce AWB and AE lock when AF scanning
diff mbox series

Message ID 20220322024155.6528-2-hpa@redhat.com
State Superseded
Headers show
Series
  • ipa: ipu3: af: Temporarily suspend AWB and AE during AF scanning
Related show

Commit Message

Kate Hsuan March 22, 2022, 2:41 a.m. UTC
The floating AWB and AE results significantly impact the AF performance since the
focus value is determined by the image contrast. This lock is used to suspend
the AWB and AE during AF scanning.

Signed-off-by: Kate Hsuan <hpa@redhat.com>
---
 src/ipa/ipu3/algorithms/af.cpp | 3 +++
 src/ipa/ipu3/ipa_context.h     | 1 +
 2 files changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index 0170a372..40a8ddae 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -170,6 +170,9 @@  int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)
 	grid.block_height_log2 = kAfMinGridBlockHeight;
 	grid.height_per_slice = kAfDefaultHeightPerSlice;
 
+	/* Initial AE and AWB lock */
+	context.configuration.af.requireAeAwbLock = false;
+
 	/* x_start and y start are default to BDS center */
 	grid.x_start = (configInfo.bdsOutputSize.width / 2) -
 		       (((grid.width << grid.block_width_log2) / 2));
diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h
index 6b7a512e..8cc64c3e 100644
--- a/src/ipa/ipu3/ipa_context.h
+++ b/src/ipa/ipu3/ipa_context.h
@@ -27,6 +27,7 @@  struct IPASessionConfiguration {
 
 	struct {
 		ipu3_uapi_grid_config afGrid;
+		bool requireAeAwbLock;
 	} af;
 
 	struct {