From bd542ae775710298cf9ed90fb0a2694c2a41b906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 28 Sep 2020 17:15:47 +0200 Subject: include: linux: Update rkisp1 header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refresh the RkISP1 user-space header to match the latest state in the media-tree [1]. This requires update of symbol names in the RkISP1 IPA but there is no functional change. Unfortunately the upstream header has a few problems that needs to be fixed before it can be used. 1. The SPDX header does not satisfy the Linux scripts/headers_install.sh so the installation step have to be done manually (dropping _UAPI prefix from header include guard). Issue is reported upstream. 2. The BIT() macro is used in the header but unfortunately this macro is not accessible in user-space headers. Fix this by reverting back to open code setting the bit without macro. Fix submitted upstream and acked by maintainer. 1. d7a81a5b07313535 ("media: staging: rkisp1: uapi: remove __packed") 2. [PATCH v2] staging: rkisp1: uapi: Do not use BIT() macro Signed-off-by: Niklas Söderlund Acked-by: Laurent Pinchart Acked-by: Jacopo Mondi --- src/ipa/rkisp1/rkisp1.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/ipa') diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 0f5f8a8b..07d7f1b2 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -50,7 +50,7 @@ public: void processEvent(const IPAOperationData &event) override; private: - void queueRequest(unsigned int frame, rkisp1_isp_params_cfg *params, + void queueRequest(unsigned int frame, rkisp1_params_cfg *params, const ControlList &controls); void updateStatistics(unsigned int frame, const rkisp1_stat_buffer *stats); @@ -176,8 +176,8 @@ void IPARkISP1::processEvent(const IPAOperationData &event) unsigned int frame = event.data[0]; unsigned int bufferId = event.data[1]; - rkisp1_isp_params_cfg *params = - static_cast(buffersMemory_[bufferId]); + rkisp1_params_cfg *params = + static_cast(buffersMemory_[bufferId]); queueRequest(frame, params, event.controls[0]); break; @@ -188,7 +188,7 @@ void IPARkISP1::processEvent(const IPAOperationData &event) } } -void IPARkISP1::queueRequest(unsigned int frame, rkisp1_isp_params_cfg *params, +void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params, const ControlList &controls) { /* Prepare parameters buffer. */ @@ -198,9 +198,9 @@ void IPARkISP1::queueRequest(unsigned int frame, rkisp1_isp_params_cfg *params, if (controls.contains(controls::AeEnable)) { autoExposure_ = controls.get(controls::AeEnable); if (autoExposure_) - params->module_ens = CIFISP_MODULE_AEC; + params->module_ens = RKISP1_CIF_ISP_MODULE_AEC; - params->module_en_update = CIFISP_MODULE_AEC; + params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC; } IPAOperationData op; @@ -212,17 +212,17 @@ void IPARkISP1::queueRequest(unsigned int frame, rkisp1_isp_params_cfg *params, void IPARkISP1::updateStatistics(unsigned int frame, const rkisp1_stat_buffer *stats) { - const cifisp_stat *params = &stats->params; + const rkisp1_cif_isp_stat *params = &stats->params; unsigned int aeState = 0; - if (stats->meas_type & CIFISP_STAT_AUTOEXP) { - const cifisp_ae_stat *ae = ¶ms->ae; + if (stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP) { + const rkisp1_cif_isp_ae_stat *ae = ¶ms->ae; const unsigned int target = 60; unsigned int value = 0; unsigned int num = 0; - for (int i = 0; i < CIFISP_AE_MEAN_MAX; i++) { + for (int i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX; i++) { if (ae->exp_mean[i] <= 15) continue; -- cgit v1.2.1