ソースを参照

msm: camera: uapi: Add interface for DRV config

Add interface to configure DRV settings and vote levels.

CRs-Fixed: 3065551
Change-Id: I07ff6f25bffcfb11671436d64f917fc49cb73cc2
Signed-off-by: Mukund Madhusudan Atre <[email protected]>
Mukund Madhusudan Atre 3 年 前
コミット
9dcca711f8
2 ファイル変更80 行追加0 行削除
  1. 35 0
      include/uapi/camera/media/cam_cpas.h
  2. 45 0
      include/uapi/camera/media/cam_isp.h

+ 35 - 0
include/uapi/camera/media/cam_cpas.h

@@ -74,6 +74,10 @@
 #define CAM_AXI_PATH_DATA_ALL  256
 #define CAM_CPAS_FUSES_MAX     32
 
+/* DRV Vote level */
+#define CAM_CPAS_VOTE_LEVEL_HIGH   1
+#define CAM_CPAS_VOTE_LEVEL_LOW    2
+
 /**
  * struct cam_cpas_fuse_value - CPAS fuse value
  *
@@ -130,6 +134,37 @@ struct cam_cpas_query_cap_v2 {
 	struct cam_cpas_fuse_info fuse_info;
 };
 
+/**
+ * struct cam_axi_per_path_bw_vote_v2 - Per path bandwidth vote information
+ *
+ * @usage_data:              client usage data (left/right/rdi)
+ * @transac_type:            Transaction type on the path (read/write)
+ * @path_data_type:          Path for which vote is given (video, display, rdi)
+ * @vote_level:              Vote level for this path
+ * @camnoc_bw:               CAMNOC bw for this path
+ * @mnoc_ab_bw:              MNOC AB bw for this path
+ * @mnoc_ib_bw:              MNOC IB bw for this path
+ * @ddr_ab_bw:               DDR AB bw for this path
+ * @ddr_ib_bw:               DDR IB bw for this path
+ * @num_valid_params:        Number of valid params
+ * @valid_param_mask:        Valid param mask
+ * @params:                  params
+ */
+struct cam_axi_per_path_bw_vote_v2 {
+	__u32                      usage_data;
+	__u32                      transac_type;
+	__u32                      path_data_type;
+	__u32                      vote_level;
+	__u64                      camnoc_bw;
+	__u64                      mnoc_ab_bw;
+	__u64                      mnoc_ib_bw;
+	__u64                      ddr_ab_bw;
+	__u64                      ddr_ib_bw;
+	__u32                      num_valid_params;
+	__u32                      valid_param_mask;
+	__u32                      params[4];
+};
+
 /**
  * struct cam_axi_per_path_bw_vote - Per path bandwidth vote information
  *

+ 45 - 0
include/uapi/camera/media/cam_isp.h

@@ -133,6 +133,8 @@
 #define CAM_ISP_GENERIC_BLOB_TYPE_SFE_FE_CONFIG             25
 #define CAM_ISP_GENERIC_BLOB_TYPE_SFE_SCRATCH_BUF_CFG       26
 #define CAM_ISP_GENERIC_BLOB_TYPE_SFE_EXP_ORDER_CFG         27
+#define CAM_ISP_GENERIC_BLOB_TYPE_DRV_CONFIG                28
+#define CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG_V3              29
 
 #define CAM_ISP_VC_DT_CFG    4
 
@@ -196,6 +198,30 @@
 #define CAM_IFE_DECODE_FORMAT_MASK      0xFF
 #define CAM_IFE_DECODE_FORMAT_SHIFT_VAL 8
 
+/**
+ * struct cam_isp_drv_config - CSID config for DRV
+ *        Enables DRV and provides worst case timeout value in INIT packet,
+ *        provides path_idle_en and timeout updates (if any) in UPDATE packet
+ *
+ * @drv_en            : Enables DRV block
+ * @timeout_val       : Timeout value from SOF to trigger vote up,
+ *                      given in number of Global Counter cycles.
+ * @path_idle_en      : Mask for paths to be considered for consolidated IDLE signal.
+ *                      When paths matching the mask go idle, BW is voted down.
+ * @num_valid_params  : Number of valid params
+ * @valid_param_mask  : Valid param mask
+ * @params            : params
+ */
+struct cam_isp_drv_config {
+	__u32    drv_en;
+	__u32    timeout_val;
+	__u32    path_idle_en;
+	__u32    num_valid_params;
+	__u32    valid_param_mask;
+	__u32    params[5];
+} __attribute__((packed));
+
+
 /* Query devices */
 /**
  * struct cam_isp_dev_cap_info - A cap info for particular hw type
@@ -626,6 +652,25 @@ struct cam_isp_bw_config_v2 {
 	struct cam_axi_per_path_bw_vote   axi_path[1];
 } __attribute__((packed));
 
+/**
+ * struct cam_isp_bw_config_v3 - Bandwidth configuration
+ *
+ * @usage_type:                 Usage type (Single/Dual)
+ * @num_paths:                  Number of axi data paths
+ * @num_valid_params:           Number of valid params
+ * @valid_param_mask:           Valid param mask
+ * @params:                     params
+ * @axi_path:                   Per path vote info v2
+ */
+struct cam_isp_bw_config_v3 {
+	__u32                                usage_type;
+	__u32                                num_paths;
+	__u32                                num_valid_params;
+	__u32                                valid_param_mask;
+	__u32                                params[4];
+	struct cam_axi_per_path_bw_vote_v2   axi_path[1];
+} __attribute__((packed));
+
 /**
  * struct cam_fe_config - Fetch Engine configuration
  *