summaryrefslogtreecommitdiff
path: root/include/linux/rkisp1-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rkisp1-config.h')
-rw-r--r--include/linux/rkisp1-config.h49
1 files changed, 27 insertions, 22 deletions
diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h
index 848c7f72..4f4e8afe 100644
--- a/include/linux/rkisp1-config.h
+++ b/include/linux/rkisp1-config.h
@@ -1084,15 +1084,14 @@ enum rkisp1_ext_params_block_type {
};
/**
- * enum rkisp1_ext_params_block_enable - RkISP1 extensible parameter block
- * enable flags
+ * enum rkisp1_ext_params_block_flags - RkISP1 extensible parameter block flags
*
- * @RKISP1_EXT_PARAMS_BLOCK_DISABLE: Disable the HW block
- * @RKISP1_EXT_PARAMS_BLOCK_ENABLE: Enable the HW block
+ * @RKISP1_EXT_PARAMS_BLOCK_DISABLE: Disable the HW block.
+ * @RKISP1_EXT_PARAMS_BLOCK_ENABLE: Enable the HW block.
*/
-enum rkisp1_ext_params_block_enable {
- RKISP1_EXT_PARAMS_BLOCK_DISABLE,
- RKISP1_EXT_PARAMS_BLOCK_ENABLE,
+enum rkisp1_ext_params_block_flags {
+ RKISP1_EXT_PARAMS_BLOCK_DISABLE = 0x1,
+ RKISP1_EXT_PARAMS_BLOCK_ENABLE = 0x2,
};
/**
@@ -1111,18 +1110,24 @@ enum rkisp1_ext_params_block_enable {
* interpreted by the driver. The @size field specifies the size of the
* parameters block and is used by the driver for validation purposes.
*
- * The @enable field specifies the ISP block enablement state. The possible
- * enablement states are enumerated by :c:type:`rkisp1_ext_params_block_enable`.
+ * The @flags field is a bitmaks of per-block flags, enumerated by
+ * :c:type:`rkisp1_ext_params_block_enable`.
+ *
* When userspace needs to configure and enable an ISP block it shall fully
- * populate the block configuration and the @enable flag shall be set to
- * RKISP1_EXT_PARAMS_BLOCK_ENABLE. When userspace simply wants to disable the
- * ISP block the @enable flag shall be set to RKISP1_EXT_PARAMS_BLOCK_DISABLE.
- * The driver ignores the rest of the block configuration structure in this
- * case.
+ * populate the block configuration and set in the
+ * RKISP1_EXT_PARAMS_BLOCK_ENABLE bit in the @flags field.
+ *
+ * When userspace simply wants to disable an ISP block the
+ * RKISP1_EXT_PARAMS_BLOCK_DISABLE bit should be set in @flags field. The
+ * driver ignores the rest of the block configuration structure in this case.
*
* If a new configuration of an ISP block has to be applied userspace shall
- * fully populate the ISP block configuration and set the @enable flag to
- * RKISP1_EXT_PARAMS_BLOCK_ENABLE.
+ * fully populate the ISP block configuration and omit setting the
+ * RKISP1_EXT_PARAMS_BLOCK_ENABLE bit in the @flags field.
+ *
+ * Userspace shall never set both the RKISP1_EXT_PARAMS_BLOCK_ENABLE and
+ * RKISP1_EXT_PARAMS_BLOCK_DISABLE bits in the @flags field. The driver
+ * behaviour is undefined in this case.
*
* Userspace is responsible for correctly populating the parameters block header
* fields (@type, @enable and @size) and the block-specific parameters.
@@ -1136,7 +1141,7 @@ enum rkisp1_ext_params_block_enable {
* (struct rkisp1_ext_params_bls_config *)block;
*
* bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;
- * bls->header.enable = RKISP1_EXT_PARAMS_BLOCK_ENABLE;
+ * bls->header.flags |= RKISP1_EXT_PARAMS_BLOCK_ENABLE;
* bls->header.size = sizeof(*bls);
*
* bls->config.enable_auto = 0;
@@ -1148,14 +1153,14 @@ enum rkisp1_ext_params_block_enable {
*
* @type: The parameters block type, see
* :c:type:`rkisp1_ext_params_block_type`
- * @enable: The block enable flag, see
- * :c:type:`rkisp1_ext_params_block_enable`
+ * @flags: A bitmask of block header flags, see
+ * :c:type:`rkisp1_ext_params_block_flags`
* @size: Size (in bytes) of the parameters block, including this header
*/
struct rkisp1_ext_params_block_header {
__u16 type;
- __u16 enable;
- __u16 size;
+ __u16 flags;
+ __u32 size;
} __attribute__((aligned(8)));
/**
@@ -1451,7 +1456,7 @@ struct rkisp1_ext_params_compand_bls_config {
*
* RkISP1 extensible parameters Companding configuration block (expand and
* compression curves). Identified by
- * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND`or
+ * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND` or
* :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS`.
*
* @header: The RkISP1 extensible parameters header, see