@@ -1856,6 +1856,7 @@ static const struct rkisp1_ext_params_handler {
size_t size;
rkisp1_block_handler handler;
unsigned int group;
+ unsigned int features;
} rkisp1_ext_params_handlers[] = {
[RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS] = {
.size = sizeof(struct rkisp1_ext_params_bls_config),
@@ -1962,11 +1963,18 @@ static void rkisp1_ext_params_config(struct rkisp1_params *params,
&cfg->data[block_offset];
block_offset += block->header.size;
- /* Make sure the block is in the list of groups to configure. */
+ /*
+ * Make sure the block is supported by the platform and in the
+ * list of groups to configure.
+ */
block_handler = &rkisp1_ext_params_handlers[block->header.type];
if (!(block_handler->group & block_group_mask))
continue;
+ if ((params->rkisp1->info->features & block_handler->features) !=
+ block_handler->features)
+ continue;
+
block_handler->handler(params, block);
if (block->header.flags & RKISP1_EXT_PARAMS_BLOCK_DISABLE)