[libcamera-devel] [RFC PATCH 5/7] libcamera: software_isp: introduce getStatsFD()

Andrey Konovalov andrey.konovalov at linaro.org
Mon Dec 4 01:10:11 CET 2023


The shared memory for passing the statistics to the Soft IPA is
allocated inside the Soft ISP. The FD of this memory needs to
be passed to the IPA.

Signed-off-by: Andrey Konovalov <andrey.konovalov at linaro.org>
---
 include/libcamera/internal/software_isp.h              | 4 ++++
 include/libcamera/internal/software_isp/swisp_linaro.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/include/libcamera/internal/software_isp.h b/include/libcamera/internal/software_isp.h
index 556203d9..2ce3c68a 100644
--- a/include/libcamera/internal/software_isp.h
+++ b/include/libcamera/internal/software_isp.h
@@ -16,6 +16,7 @@
 #include <vector>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/shared_fd.h>
 #include <libcamera/base/signal.h>
 
 #include <libcamera/geometry.h>
@@ -53,6 +54,9 @@ public:
 	virtual int queueBuffers(FrameBuffer *input,
 				 const std::map<unsigned int, FrameBuffer *> &outputs) = 0;
 
+	/* A hack to pass the FD from Soft ISP to Soft IPA */
+	virtual const SharedFD &getStatsFD() = 0;
+
 	Signal<FrameBuffer *> inputBufferReady;
 	Signal<FrameBuffer *> outputBufferReady;
 
diff --git a/include/libcamera/internal/software_isp/swisp_linaro.h b/include/libcamera/internal/software_isp/swisp_linaro.h
index 0d8a31a6..157898a8 100644
--- a/include/libcamera/internal/software_isp/swisp_linaro.h
+++ b/include/libcamera/internal/software_isp/swisp_linaro.h
@@ -44,6 +44,8 @@ public:
 	int queueBuffers(FrameBuffer *input,
 			 const std::map<unsigned int, FrameBuffer *> &outputs);
 
+	const SharedFD &getStatsFD() { return sharedStats_.fd(); }
+
 	void process(FrameBuffer *input, FrameBuffer *output);
 
 private:
-- 
2.34.1



More information about the libcamera-devel mailing list