diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h
index 0f72263f2536..137eb65e0c52 100644
--- a/include/libcamera/internal/matrix.h
+++ b/include/libcamera/internal/matrix.h
@@ -188,10 +188,8 @@ constexpr Matrix<T, Rows, Cols> operator+(const Matrix<T, Rows, Cols> &m1, const
 }
 
 #ifndef __DOXYGEN__
-bool matrixValidateYaml(const ValueNode &obj, unsigned int size);
-#endif /* __DOXYGEN__ */
+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size);
 
-#ifndef __DOXYGEN__
 template<typename T, unsigned int Rows, unsigned int Cols>
 std::ostream &operator<<(std::ostream &out, const Matrix<T, Rows, Cols> &m)
 {
@@ -203,7 +201,7 @@ template<typename T, unsigned int Rows, unsigned int Cols>
 struct ValueNode::Accessor<Matrix<T, Rows, Cols>> {
 	std::optional<Matrix<T, Rows, Cols>> get(const ValueNode &obj) const
 	{
-		if (!matrixValidateYaml(obj, Rows * Cols))
+		if (!matrixValidateValueNode(obj, Rows * Cols))
 			return std::nullopt;
 
 		Matrix<T, Rows, Cols> matrix;
diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp
index 4fe210830421..e4fb8d35314d 100644
--- a/src/libcamera/matrix.cpp
+++ b/src/libcamera/matrix.cpp
@@ -314,7 +314,7 @@ template bool matrixInvert<double>(Span<const double> data, Span<double> dataOut
  * to the product of the number of rows and columns of the matrix (Rows x
  * Cols). The values shall be stored in row-major order.
  */
-bool matrixValidateYaml(const ValueNode &obj, unsigned int size)
+bool matrixValidateValueNode(const ValueNode &obj, unsigned int size)
 {
 	if (!obj.isList())
 		return false;
