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>
This commit is contained in:
+10
-10
@@ -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 = ¶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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user