diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index 6c25d02ec7f0..abfaad6164f1 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -139,6 +139,22 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)
 	grid.height = kAfMinGridHeight;
 	grid.block_width_log2 = kAfMinGridBlockWidth;
 	grid.block_height_log2 = kAfMinGridBlockHeight;
+
+	/*
+	 * \todo - while this clamping code is effectively a no-op, it satisfies
+	 * the compiler that the definitions regarding the hardware restrictions
+	 * are used, and paves the way to support dynamic grid sizing in the
+	 * future. While the block_{width,height}_log2 remain assigned to the
+	 * minimum, this code should be optimized out by the compiler.
+	 */
+	grid.block_width_log2 = std::clamp(grid.block_width_log2,
+					   kAfMinGridBlockWidth,
+					   kAfMaxGridBlockWidth);
+
+	grid.block_height_log2 = std::clamp(grid.block_height_log2,
+					    kAfMinGridBlockHeight,
+					    kAfMaxGridBlockHeight);
+
 	grid.height_per_slice = kAfDefaultHeightPerSlice;
 
 	/* Position the AF grid in the center of the BDS output. */
