summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-01-28 20:13:23 +0900
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-03-08 13:18:10 +0100
commitebe733ed985eaea8f74dcfdd3cea860501b10763 (patch)
tree14cbc2d715f560387e5164d2c37645517bf3b493
parentcde9293cf9899b0fc4ce9cf89dd29f26be77f35c (diff)
[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.
-rw-r--r--include/linux/rkisp1-config.h1
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp8
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp1
3 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h
index ec7cde8c..0ed3dca8 100644
--- a/include/linux/rkisp1-config.h
+++ b/include/linux/rkisp1-config.h
@@ -185,6 +185,7 @@ enum rkisp1_cif_isp_version {
RKISP1_V11,
RKISP1_V12,
RKISP1_V13,
+ IMX8MP_V10,
};
enum rkisp1_cif_isp_histogram_mode {
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;