diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 6a46e6bc89fa..49af56edc1f9 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1382,6 +1382,14 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)
 			 * minimise frame drops.
 			 */
 			numBuffers = std::max<int>(2, minBuffers - numRawBuffers);
+		} else if (stream == &data->isp_[Isp::Input]) {
+			/*
+			 * ISP input buffers are imported from Unicam, so follow
+			 * similar logic as above to count all the RAW buffers
+			 * available.
+			 */
+			numBuffers = numRawBuffers + std::max<int>(2, minBuffers - numRawBuffers);
+
 		} else if (stream == &data->unicam_[Unicam::Embedded]) {
 			/*
 			 * Embedded data buffers are (currently) for internal use,
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
index a4159e20b068..a421ad09ba50 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
@@ -111,11 +111,12 @@ int Stream::prepareBuffers(unsigned int count)
 	 * If this is an external stream, we must allocate slots for buffers that
 	 * might be externally allocated. We have no indication of how many buffers
 	 * may be used, so this might overallocate slots in the buffer cache.
+	 * Similarly, if this stream is only importing buffers, we do the same.
 	 *
 	 * \todo Find a better heuristic, or, even better, an exact solution to
 	 * this issue.
 	 */
-	if (isExternal())
+	if (isExternal() || importOnly_)
 		count = count * 2;
 
 	return dev_->importBuffers(count);
