@@ -55,4 +55,12 @@ namespace libcamera::ipa::rkisp1 {
* are run. This needs to be turned into real per-frame data storage.
*/
+/**
+ * \var IPASessionConfiguration::hw
+ * \brief RkISP1-specific hardware information
+ *
+ * \var IPASessionConfiguration::hw.revision
+ * \brief Hardware revision of the ISP
+ */
+
} /* namespace libcamera::ipa::rkisp1 */
@@ -7,11 +7,16 @@
*/
#pragma once
+#include <linux/rkisp1-config.h>
+
namespace libcamera {
namespace ipa::rkisp1 {
struct IPASessionConfiguration {
+ struct {
+ rkisp1_cif_isp_version revision;
+ } hw;
};
struct IPAFrameContext {
@@ -74,6 +74,7 @@ private:
uint32_t maxGain_;
/* revision-specific data */
+ rkisp1_cif_isp_version hwRevision_;
unsigned int hwAeMeanMax_;
unsigned int hwHistBinNMax_;
unsigned int hwGammaOutMaxSamples_;
@@ -114,6 +115,9 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)
LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision;
+ /* Cache the value to set it in configure. */
+ hwRevision_ = static_cast<rkisp1_cif_isp_version>(hwRevision);
+
camHelper_ = CameraSensorHelperFactory::create(settings.sensorModel);
if (!camHelper_) {
LOG(IPARkISP1, Error)
@@ -176,6 +180,9 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,
/* Clean context at configuration */
context_ = {};
+ /* Set the hardware revision for the algorithms. */
+ context_.configuration.hw.revision = hwRevision_;
+
return 0;
}