diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index 435f460bbf8c..8453c8668542 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -248,11 +248,10 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
 		 * to the user request.
 		 */
 
-		BayerFormat cfgBayer = BayerFormat::fromPixelFormat(rawStream->pixelFormat);
-		cfgBayer.cfa = data_->sensor_->bayerOrder(combinedTransform_);
+		ColorFilterArray cfa = data_->sensor_->bayerOrder(combinedTransform_);
 
-		if (rawStream->pixelFormat != cfgBayer.toPixelFormat()) {
-			rawStream->pixelFormat = cfgBayer.toPixelFormat();
+		if (!rawStream->bayerOrder || rawStream->bayerOrder.value() != cfa) {
+			rawStream->bayerOrder = cfa;
 			status = Adjusted;
 		}
 	}
@@ -500,6 +499,16 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, std::span<const Strea
 		cfg.pixelFormat = *pixelFormat;
 		cfg.colorSpace = colorSpace;
 		cfg.bufferCount = bufferCount;
+
+		/*
+		 * Colour order of the raw data is only relevant for raw
+		 * streams. Populate the sensor's native (untransformed) color
+		 * filter array order; validate() will update it with the
+		 * order resulting from the transform applied to the sensor.
+		 */
+		if (role == StreamRole::Raw)
+			cfg.bayerOrder = data->sensor_->bayerOrder(Transform::Identity);
+
 		config->addConfiguration(cfg);
 	}
 
