--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -207,7 +207,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
        std::sort(outStreams.begin(), outStreams.end(),
                  [](auto &l, auto &r) { return l.cfg->size > r.cfg->size; });

-       /* Do any platform specific fixups. */
+       /* Compute the sensor configuration. */
        unsigned int bitDepth = defaultRawBitDepth;
        if (!rawStreams.empty()) {
                BayerFormat bayerFormat = BayerFormat::fromPixelFormat(rawStreams[0].cfg->pixelFormat);
@@ -218,6 +218,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
                                                                 : rawStreams[0].cfg->size,
                                              bitDepth);

+       /* Do any platform specific fixups. */
        status = data_->platformValidate(rawStreams, outStreams);
        if (status == Invalid)
                return Invalid;
@@ -227,9 +228,6 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
                StreamConfiguration &cfg = config_.at(raw.index);
                V4L2DeviceFormat rawFormat;

-               const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);
-               bitDepth = info.isValid() ? info.bitsPerPixel : defaultRawBitDepth;
-
                BayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;
                rawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat_, packing);

