summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-28 17:15:47 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-29 03:53:55 +0200
commitbd542ae775710298cf9ed90fb0a2694c2a41b906 (patch)
tree2738dbd494d5ef8d830fb7716b3ed3952ed892c6 /src
parent3baedef8cea6db37af6a730acffe6632fc2fd269 (diff)
include: linux: Update rkisp1 header
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 <niklas.soderlund@ragnatech.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp20
1 files changed, 10 insertions, 10 deletions
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<rkisp1_isp_params_cfg *>(buffersMemory_[bufferId]);
+ rkisp1_params_cfg *params =
+ static_cast<rkisp1_params_cfg *>(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 = &params->ae;
+ if (stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP) {
+ const rkisp1_cif_isp_ae_stat *ae = &params->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;