msm: camera: isp: IFE and CSID probe based on fuse
Some ISP hardware id instances are disabled on some target skus. Cpas driver has fuse information based on the dtsi entries. ISP hw driver queries the cpas driver whether hw instance is supported or not. If ISP hardware is supported on the target then continue the isp hardware probe. Fix for get HW feature: When feature is enable or disable type and HW mask is not indicating the HW index, do not update the supported. By default it is supported. CRs-Fixed: 2825675 Change-Id: I777e5790060388458562e7a53fea8a7324ffa9d3 Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
16710c7458
commit
5f7956594d
@@ -188,19 +188,14 @@ bool cam_cpas_is_feature_supported(uint32_t flag, uint32_t hw_map,
|
||||
if (soc_private->feature_info[i].feature == flag)
|
||||
break;
|
||||
|
||||
if (i == soc_private->num_feature_info) {
|
||||
CAM_INFO(CAM_CPAS, "Feature not found, no of featues: %d",
|
||||
soc_private->num_feature_info);
|
||||
if (i == soc_private->num_feature_info)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (soc_private->feature_info[i].type == CAM_CPAS_FEATURE_TYPE_DISABLE
|
||||
|| (soc_private->feature_info[i].type ==
|
||||
CAM_CPAS_FEATURE_TYPE_ENABLE)) {
|
||||
if ((soc_private->feature_info[i].hw_map & hw_map) == hw_map)
|
||||
supported = soc_private->feature_info[i].enable;
|
||||
else
|
||||
supported = !soc_private->feature_info[i].enable;
|
||||
} else {
|
||||
if (!fuse_val) {
|
||||
CAM_ERR(CAM_CPAS,
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#include "cam_ife_csid_hw_intf.h"
|
||||
#include "cam_debug_util.h"
|
||||
#include "camera_main.h"
|
||||
#include "cam_cpas_api.h"
|
||||
#include <dt-bindings/msm-camera.h>
|
||||
|
||||
static struct cam_hw_intf *cam_ife_csid_hw_list[CAM_IFE_CSID_HW_NUM_MAX] = {
|
||||
0, 0, 0, 0};
|
||||
@@ -62,6 +64,14 @@ static int cam_ife_csid_component_bind(struct device *dev,
|
||||
|
||||
csid_core_info = (struct cam_ife_csid_core_info *)match_dev->data;
|
||||
|
||||
if (!cam_cpas_is_feature_supported(CAM_CPAS_ISP_FUSE,
|
||||
(1 << hw_intf->hw_idx), NULL) ||
|
||||
!cam_cpas_is_feature_supported(CAM_CPAS_ISP_LITE_FUSE,
|
||||
(1 << hw_intf->hw_idx), NULL)) {
|
||||
CAM_DBG(CAM_ISP, "CSID[%d] not supported based on fuse",
|
||||
csid_dev_idx);
|
||||
goto free_hw_info;
|
||||
}
|
||||
/* call the driver init and fill csid_hw_info->core_info */
|
||||
rc = cam_ife_csid_hw_probe_init(hw_intf, csid_core_info, false);
|
||||
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "cam_vfe_core.h"
|
||||
#include "cam_vfe_soc.h"
|
||||
#include "cam_debug_util.h"
|
||||
#include <dt-bindings/msm-camera.h>
|
||||
|
||||
static struct cam_isp_hw_intf_data cam_vfe_hw_list[CAM_VFE_HW_NUM_MAX];
|
||||
|
||||
@@ -38,6 +39,15 @@ static int cam_vfe_component_bind(struct device *dev,
|
||||
of_property_read_u32(pdev->dev.of_node,
|
||||
"cell-index", &vfe_hw_intf->hw_idx);
|
||||
|
||||
if (!cam_cpas_is_feature_supported(CAM_CPAS_ISP_FUSE,
|
||||
(1 << vfe_hw_intf->hw_idx), 0) ||
|
||||
!cam_cpas_is_feature_supported(CAM_CPAS_ISP_LITE_FUSE,
|
||||
(1 << vfe_hw_intf->hw_idx), 0)) {
|
||||
CAM_DBG(CAM_ISP, "IFE:%d is not supported",
|
||||
vfe_hw_intf->hw_idx);
|
||||
goto free_vfe_hw_intf;
|
||||
}
|
||||
|
||||
vfe_hw = kzalloc(sizeof(struct cam_hw_info), GFP_KERNEL);
|
||||
if (!vfe_hw) {
|
||||
rc = -ENOMEM;
|
||||
|
@@ -88,7 +88,8 @@
|
||||
#define CAM_CPAS_MP_LIMIT_FUSE 3
|
||||
#define CAM_CPAS_ISP_FUSE 4
|
||||
#define CAM_CPAS_ISP_PIX_FUSE 5
|
||||
#define CAM_CPAS_FUSE_FEATURE_MAX 6
|
||||
#define CAM_CPAS_ISP_LITE_FUSE 6
|
||||
#define CAM_CPAS_FUSE_FEATURE_MAX 7
|
||||
|
||||
#define CCI_MASTER_0 0
|
||||
#define CCI_MASTER_1 1
|
||||
|
Reference in New Issue
Block a user