summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-08-07 22:50:11 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-08-07 22:50:11 +0200
commit57ea6b6455005f335525debfd416927eba5d0082 (patch)
tree4438f060dd35aed11410a54deb7beed14bda9011
parent43312f026e857771485276676e82dacad95bdcf2 (diff)
include: rkisp1-config: Update to v9
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
-rw-r--r--include/linux/rkisp1-config.h47
1 files changed, 19 insertions, 28 deletions
diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h
index 4f4e8afe..a160234f 100644
--- a/include/linux/rkisp1-config.h
+++ b/include/linux/rkisp1-config.h
@@ -1083,19 +1083,11 @@ enum rkisp1_ext_params_block_type {
RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,
};
-/**
- * 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.
- */
-enum rkisp1_ext_params_block_flags {
- RKISP1_EXT_PARAMS_BLOCK_DISABLE = 0x1,
- RKISP1_EXT_PARAMS_BLOCK_ENABLE = 0x2,
-};
+#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)
+#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)
/**
- * struct rkisp1_ext_params_block_header - RkISP1 extensible parameter block
+ * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block
* header
*
* This structure represents the common part of all the ISP configuration
@@ -1110,27 +1102,27 @@ enum rkisp1_ext_params_block_flags {
* interpreted by the driver. The @size field specifies the size of the
* parameters block and is used by the driver for validation purposes.
*
- * The @flags field is a bitmaks of per-block flags, enumerated by
- * :c:type:`rkisp1_ext_params_block_enable`.
+ * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*.
*
- * When userspace needs to configure and enable an ISP block it shall fully
- * populate the block configuration and set in the
- * RKISP1_EXT_PARAMS_BLOCK_ENABLE bit in the @flags field.
+ * When userspace wants to configure and enable an ISP block it shall fully
+ * populate the block configuration and set the
+ * RKISP1_EXT_PARAMS_FL_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
+ * RKISP1_EXT_PARAMS_FL_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 omit setting the
- * RKISP1_EXT_PARAMS_BLOCK_ENABLE bit in the @flags field.
+ * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits
+ * 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.
+ * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and
+ * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed
+ * and not accepted by the driver.
*
* Userspace is responsible for correctly populating the parameters block header
- * fields (@type, @enable and @size) and the block-specific parameters.
+ * fields (@type, @flags and @size) and the block-specific parameters.
*
* For example:
*
@@ -1141,7 +1133,7 @@ enum rkisp1_ext_params_block_flags {
* (struct rkisp1_ext_params_bls_config *)block;
*
* bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS;
- * bls->header.flags |= RKISP1_EXT_PARAMS_BLOCK_ENABLE;
+ * bls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE;
* bls->header.size = sizeof(*bls);
*
* bls->config.enable_auto = 0;
@@ -1153,15 +1145,14 @@ enum rkisp1_ext_params_block_flags {
*
* @type: The parameters block type, see
* :c:type:`rkisp1_ext_params_block_type`
- * @flags: A bitmask of block header flags, see
- * :c:type:`rkisp1_ext_params_block_flags`
+ * @flags: A bitmask of block flags
* @size: Size (in bytes) of the parameters block, including this header
*/
struct rkisp1_ext_params_block_header {
__u16 type;
__u16 flags;
__u32 size;
-} __attribute__((aligned(8)));
+};
/**
* struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config
@@ -1538,7 +1529,7 @@ enum rksip1_ext_param_buffer_version {
* | | +------------- struct rkisp1_ext_params_bls_config -----------+ | |
* | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | |
* | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS; | | | |
- * | | | | enable = RKISP1_EXT_PARAMS_BLOCK_ENABLE; | | | |
+ * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | |
* | | | | size = sizeof(struct rkisp1_ext_params_bls_config); | | | |
* | | | +---------------------------------------------------------+ | | |
* | | | +---------- struct rkisp1_cif_isp_bls_config -------------+ | | |
@@ -1551,7 +1542,7 @@ enum rksip1_ext_param_buffer_version {
* | | +------------ struct rkisp1_ext_params_dpcc_config -----------+ | |
* | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | |
* | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC; | | | |
- * | | | | enable = RKISP1_EXT_PARAMS_BLOCK_ENABLE; | | | |
+ * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | |
* | | | | size = sizeof(struct rkisp1_ext_params_dpcc_config); | | | |
* | | | +---------------------------------------------------------+ | | |
* | | | +---------- struct rkisp1_cif_isp_dpcc_config ------------+ | | |