From ebe733ed985eaea8f74dcfdd3cea860501b10763 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Fri, 28 Jan 2022 20:13:23 +0900 Subject: [WIP] ipa: rkisp1: Support the i.MX8MP ISP Handle the i.MX8MP version of the ISP. This matches the current versioning scheme of the driver, but doesn't seem to scale very well. --- src/ipa/rkisp1/algorithms/agc.cpp | 8 ++++---- src/ipa/rkisp1/rkisp1.cpp | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp index 22f70aba..4c702576 100644 --- a/src/ipa/rkisp1/algorithms/agc.cpp +++ b/src/ipa/rkisp1/algorithms/agc.cpp @@ -94,12 +94,12 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo) * - versions < V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, * - versions >= V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. */ - if (context.configuration.hw.revision < RKISP1_V12) { - numCells_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10; - numHistBins_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10; - } else { + if (context.configuration.hw.revision == RKISP1_V12) { numCells_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V12; numHistBins_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12; + } else { + numCells_ = RKISP1_CIF_ISP_AE_MEAN_MAX_V10; + numHistBins_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10; } /* diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 6544c925..aa73b7db 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -128,6 +128,7 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, /* \todo Add support for other revisions */ switch (hwRevision) { case RKISP1_V10: + case IMX8MP_V10: hwHistBinNMax_ = RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10; hwGammaOutMaxSamples_ = RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10; hwHistogramWeightGridsSize_ = RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10; -- cgit v1.2.1