Browse Source

msm: camera: isp: Add fuse support for QCFA binning

- Add fuse support for QCFA binning. If fuse bit is set then QCFA is
  enabled then we should proceed for acquire otherwise we should fail.
- Add dt-bindings entry for CAM_CPAS_IPE_VID_OUT_8BPP_LIMIT_ENABLE
  feature.

CRs-Fixed: 3081144
Change-Id: Iaf6f1c9d9fd442ff24c36d90758aa8ee146d461f
Signed-off-by: Wyes Karny <[email protected]>
Wyes Karny 3 năm trước cách đây
mục cha
commit
99805a9e51

+ 10 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_csid_hw/cam_tfe_csid_core.c

@@ -21,6 +21,7 @@
 #include "cam_tasklet_util.h"
 #include "cam_common_util.h"
 #include "cam_tfe_csid_hw_intf.h"
+#include <dt-bindings/msm-camera.h>
 
 /* Timeout value in msec */
 #define TFE_CSID_TIMEOUT                               1000
@@ -893,6 +894,15 @@ static int cam_tfe_csid_path_reserve(struct cam_tfe_csid_hw *csid_hw,
 	csid_hw->event_cb = reserve->event_cb;
 	csid_hw->event_cb_priv = reserve->event_cb_prv;
 
+	if (path_data->qcfa_bin) {
+		if (!cam_cpas_is_feature_supported(CAM_CPAS_QCFA_BINNING_ENABLE,
+			CAM_CPAS_HW_IDX_ANY, NULL)) {
+			CAM_ERR(CAM_ISP, "QCFA bin not supported!");
+			rc = -EINVAL;
+			goto end;
+		}
+	}
+
 	/* Enable crop only for ipp */
 	if (reserve->res_id == CAM_TFE_CSID_PATH_RES_IPP)
 		path_data->crop_enable = true;

+ 2 - 1
dt-bindings/msm-camera.h

@@ -92,7 +92,8 @@
 #define CAM_CPAS_ISP_PIX_FUSE  5
 #define CAM_CPAS_ISP_LITE_FUSE 6
 #define CAM_CPAS_CSIPHY_FUSE   7
-#define CAM_CPAS_FUSE_FEATURE_MAX 8
+#define CAM_CPAS_IPE_VID_OUT_8BPP_LIMIT_ENABLE 8
+#define CAM_CPAS_FUSE_FEATURE_MAX 9
 
 #define CCI_MASTER_0         0
 #define CCI_MASTER_1         1