Loading drivers/cam_cpas/cam_cpas_hw.c +19 −22 Original line number Diff line number Diff line Loading @@ -2025,30 +2025,29 @@ static int cam_cpas_util_get_internal_ops(struct platform_device *pdev, return rc; } static int cam_cpas_util_create_debugfs( struct cam_cpas *cpas_core) static int cam_cpas_util_create_debugfs(struct cam_cpas *cpas_core) { int rc = 0; struct dentry *dbgfileptr = NULL; cpas_core->dentry = debugfs_create_dir("camera_cpas", NULL); if (!cpas_core->dentry) return -ENOMEM; if (!debugfs_create_bool("ahb_bus_scaling_disable", 0644, cpas_core->dentry, &cpas_core->ahb_bus_scaling_disable)) { CAM_ERR(CAM_CPAS, "failed to create ahb_bus_scaling_disable entry"); rc = -ENOMEM; goto err; dbgfileptr = debugfs_create_dir("camera_cpas", NULL); if (!dbgfileptr) { CAM_ERR(CAM_CPAS,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ cpas_core->dentry = dbgfileptr; return 0; err: debugfs_remove_recursive(cpas_core->dentry); cpas_core->dentry = NULL; dbgfileptr = debugfs_create_bool("ahb_bus_scaling_disable", 0644, cpas_core->dentry, &cpas_core->ahb_bus_scaling_disable); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_CPAS, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: return rc; } Loading Loading @@ -2196,8 +2195,6 @@ int cam_cpas_hw_probe(struct platform_device *pdev, goto axi_cleanup; rc = cam_cpas_util_create_debugfs(cpas_core); if (rc) CAM_WARN(CAM_CPAS, "Failed to create dentry"); *hw_intf = cpas_hw_intf; return 0; Loading drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +30 −67 Original line number Diff line number Diff line Loading @@ -1885,83 +1885,47 @@ DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fw_dump, cam_icp_get_a5_fw_dump_lvl, static int cam_icp_hw_mgr_create_debugfs_entry(void) { int rc = 0; struct dentry *dbgfileptr = NULL; icp_hw_mgr.dentry = debugfs_create_dir("camera_icp", NULL); if (IS_ERR_OR_NULL(icp_hw_mgr.dentry)) { CAM_ERR(CAM_ICP, "Debugfs entry dir: %s failed", "camrea_icp"); return -ENOMEM; dbgfileptr = debugfs_create_dir("camera_icp", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ICP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ icp_hw_mgr.dentry = dbgfileptr; if (!debugfs_create_bool("icp_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.icp_pc_flag)) { CAM_ERR(CAM_ICP, "failed to create icp_pc entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("icp_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.icp_pc_flag); if (!debugfs_create_bool("ipe_bps_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.ipe_bps_pc_flag)) { CAM_ERR(CAM_ICP, "failed to create ipe_bps_pc entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("ipe_bps_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.ipe_bps_pc_flag); if (!debugfs_create_file("icp_debug_clk", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_default_clk)) { CAM_ERR(CAM_ICP, "failed to create icp_debug_clk entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("icp_debug_clk", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_default_clk); if (!debugfs_create_bool("a5_jtag_debug", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.a5_jtag_debug)) { rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("a5_jtag_debug", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.a5_jtag_debug); if (!debugfs_create_file("a5_debug_type", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_type_fs)) { CAM_ERR(CAM_ICP, "failed to create a5_debug_type"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("a5_debug_type", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_type_fs); if (!debugfs_create_file("a5_debug_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fs)) { CAM_ERR(CAM_ICP, "failed to create a5_dbg_lvl"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("a5_debug_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fs); if (!debugfs_create_file("a5_fw_dump_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fw_dump)) { CAM_ERR(CAM_ICP, "failed to create a5_fw_dump_lvl"); rc = -ENOMEM; goto err; dbgfileptr = debugfs_create_file("a5_fw_dump_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fw_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ICP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: /* Set default hang dump lvl */ icp_hw_mgr.a5_fw_dump_lvl = HFI_FW_DUMP_ON_FAILURE; return rc; err: debugfs_remove_recursive(icp_hw_mgr.dentry); icp_hw_mgr.dentry = NULL; return rc; } static int cam_icp_mgr_process_cmd(void *priv, void *data) Loading Loading @@ -6025,10 +5989,9 @@ static int cam_icp_mgr_create_wq(void) } rc = cam_icp_hw_mgr_create_debugfs_entry(); if (rc) { CAM_ERR(CAM_ICP, "create_debugfs_entry fail= rc: %d", rc); if (rc) goto debugfs_create_failed; } for (i = 0; i < ICP_WORKQ_NUM_TASK; i++) icp_hw_mgr.msg_work->task.pool[i].payload = &icp_hw_mgr.msg_work_data[i]; Loading drivers/cam_isp/cam_isp_context.c +18 −17 Original line number Diff line number Diff line Loading @@ -5306,27 +5306,28 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova, static int cam_isp_context_debug_register(void) { isp_ctx_debug.dentry = debugfs_create_dir("camera_isp_ctx", NULL); int rc = 0; struct dentry *dbgfileptr = NULL; if (IS_ERR_OR_NULL(isp_ctx_debug.dentry)) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; dbgfileptr = debugfs_create_dir("camera_isp_ctx", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ICP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ isp_ctx_debug.dentry = dbgfileptr; if (!debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_state_monitor_dump"); goto err; dbgfileptr = debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ICP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } return 0; err: debugfs_remove_recursive(isp_ctx_debug.dentry); return -ENOMEM; end: return rc; } int cam_isp_context_init(struct cam_isp_context *ctx, Loading drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +26 −49 Original line number Diff line number Diff line Loading @@ -7819,61 +7819,40 @@ DEFINE_SIMPLE_ATTRIBUTE(cam_ife_camif_debug, static int cam_ife_hw_mgr_debug_register(void) { g_ife_hw_mgr.debug_cfg.dentry = debugfs_create_dir("camera_ife", NULL); if (!g_ife_hw_mgr.debug_cfg.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } int rc = 0; struct dentry *dbgfileptr = NULL; if (!debugfs_create_file("ife_csid_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_csid_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_ife_csid_debug"); goto err; dbgfileptr = debugfs_create_dir("camera_ife", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ g_ife_hw_mgr.debug_cfg.dentry = dbgfileptr; if (!debugfs_create_u32("enable_recovery", 0644, dbgfileptr = debugfs_create_file("ife_csid_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_csid_debug); dbgfileptr = debugfs_create_u32("enable_recovery", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_recovery"); goto err; } if (!debugfs_create_bool("enable_req_dump", 0644, &g_ife_hw_mgr.debug_cfg.enable_recovery); dbgfileptr = debugfs_create_bool("enable_req_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_req_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_req_dump"); goto err; } if (!debugfs_create_file("ife_camif_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_camif_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_ife_camif_debug"); goto err; } if (!debugfs_create_bool("per_req_reg_dump", 0644, &g_ife_hw_mgr.debug_cfg.enable_req_dump); dbgfileptr = debugfs_create_file("ife_camif_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_camif_debug); dbgfileptr = debugfs_create_bool("per_req_reg_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.per_req_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create per_req_reg_dump entry"); goto err; &g_ife_hw_mgr.debug_cfg.per_req_reg_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: g_ife_hw_mgr.debug_cfg.enable_recovery = 0; return 0; err: debugfs_remove_recursive(g_ife_hw_mgr.debug_cfg.dentry); return -ENOMEM; return rc; } static void cam_req_mgr_process_workq_cam_ife_worker(struct work_struct *w) Loading @@ -7889,8 +7868,6 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl) struct cam_ife_hw_mgr_ctx *ctx_pool; struct cam_isp_hw_mgr_res *res_list_ife_out; CAM_DBG(CAM_ISP, "Enter"); memset(&g_ife_hw_mgr, 0, sizeof(g_ife_hw_mgr)); mutex_init(&g_ife_hw_mgr.ctx_mutex); Loading drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +34 −47 Original line number Diff line number Diff line Loading @@ -5263,65 +5263,52 @@ DEFINE_DEBUGFS_ATTRIBUTE(cam_tfe_camif_debug, cam_tfe_get_camif_debug, cam_tfe_set_camif_debug, "%16llu"); #if IS_ENABLED(CONFIG_DEBUG_FS) static int cam_tfe_hw_mgr_debug_register(void) { g_tfe_hw_mgr.debug_cfg.dentry = debugfs_create_dir("camera_tfe", NULL); if (!g_tfe_hw_mgr.debug_cfg.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } int rc = 0; struct dentry *dbgfileptr = NULL; if (!debugfs_create_file("tfe_csid_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_csid_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_tfe_csid_debug"); goto err; dbgfileptr = debugfs_create_dir("camera_ife", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ g_tfe_hw_mgr.debug_cfg.dentry = dbgfileptr; if (!debugfs_create_u32("enable_recovery", 0644, dbgfileptr = debugfs_create_file("tfe_csid_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_csid_debug); dbgfileptr = debugfs_create_u32("enable_recovery", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_recovery"); goto err; } if (!debugfs_create_u32("enable_reg_dump", 0644, &g_tfe_hw_mgr.debug_cfg.enable_recovery); dbgfileptr = debugfs_create_u32("enable_reg_dump", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_reg_dump"); goto err; } if (!debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_tfe_camif_debug"); goto err; } if (!debugfs_create_u32("per_req_reg_dump", 0644, &g_tfe_hw_mgr.debug_cfg.enable_reg_dump); dbgfileptr = debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug); dbgfileptr = debugfs_create_u32("per_req_reg_dump", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.per_req_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create per_req_reg_dump entry"); goto err; &g_tfe_hw_mgr.debug_cfg.per_req_reg_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: g_tfe_hw_mgr.debug_cfg.enable_recovery = 0; return rc; } #else static inline int cam_tfe_hw_mgr_debug_register(void) { g_tfe_hw_mgr.debug_cfg.enable_recovery = 0; CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel"); return 0; err: debugfs_remove_recursive(g_tfe_hw_mgr.debug_cfg.dentry); return -ENOMEM; } #endif static void cam_req_mgr_process_tfe_worker(struct work_struct *w) { Loading Loading
drivers/cam_cpas/cam_cpas_hw.c +19 −22 Original line number Diff line number Diff line Loading @@ -2025,30 +2025,29 @@ static int cam_cpas_util_get_internal_ops(struct platform_device *pdev, return rc; } static int cam_cpas_util_create_debugfs( struct cam_cpas *cpas_core) static int cam_cpas_util_create_debugfs(struct cam_cpas *cpas_core) { int rc = 0; struct dentry *dbgfileptr = NULL; cpas_core->dentry = debugfs_create_dir("camera_cpas", NULL); if (!cpas_core->dentry) return -ENOMEM; if (!debugfs_create_bool("ahb_bus_scaling_disable", 0644, cpas_core->dentry, &cpas_core->ahb_bus_scaling_disable)) { CAM_ERR(CAM_CPAS, "failed to create ahb_bus_scaling_disable entry"); rc = -ENOMEM; goto err; dbgfileptr = debugfs_create_dir("camera_cpas", NULL); if (!dbgfileptr) { CAM_ERR(CAM_CPAS,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ cpas_core->dentry = dbgfileptr; return 0; err: debugfs_remove_recursive(cpas_core->dentry); cpas_core->dentry = NULL; dbgfileptr = debugfs_create_bool("ahb_bus_scaling_disable", 0644, cpas_core->dentry, &cpas_core->ahb_bus_scaling_disable); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_CPAS, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: return rc; } Loading Loading @@ -2196,8 +2195,6 @@ int cam_cpas_hw_probe(struct platform_device *pdev, goto axi_cleanup; rc = cam_cpas_util_create_debugfs(cpas_core); if (rc) CAM_WARN(CAM_CPAS, "Failed to create dentry"); *hw_intf = cpas_hw_intf; return 0; Loading
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +30 −67 Original line number Diff line number Diff line Loading @@ -1885,83 +1885,47 @@ DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fw_dump, cam_icp_get_a5_fw_dump_lvl, static int cam_icp_hw_mgr_create_debugfs_entry(void) { int rc = 0; struct dentry *dbgfileptr = NULL; icp_hw_mgr.dentry = debugfs_create_dir("camera_icp", NULL); if (IS_ERR_OR_NULL(icp_hw_mgr.dentry)) { CAM_ERR(CAM_ICP, "Debugfs entry dir: %s failed", "camrea_icp"); return -ENOMEM; dbgfileptr = debugfs_create_dir("camera_icp", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ICP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ icp_hw_mgr.dentry = dbgfileptr; if (!debugfs_create_bool("icp_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.icp_pc_flag)) { CAM_ERR(CAM_ICP, "failed to create icp_pc entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("icp_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.icp_pc_flag); if (!debugfs_create_bool("ipe_bps_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.ipe_bps_pc_flag)) { CAM_ERR(CAM_ICP, "failed to create ipe_bps_pc entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("ipe_bps_pc", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.ipe_bps_pc_flag); if (!debugfs_create_file("icp_debug_clk", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_default_clk)) { CAM_ERR(CAM_ICP, "failed to create icp_debug_clk entry"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("icp_debug_clk", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_default_clk); if (!debugfs_create_bool("a5_jtag_debug", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.a5_jtag_debug)) { rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_bool("a5_jtag_debug", 0644, icp_hw_mgr.dentry, &icp_hw_mgr.a5_jtag_debug); if (!debugfs_create_file("a5_debug_type", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_type_fs)) { CAM_ERR(CAM_ICP, "failed to create a5_debug_type"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("a5_debug_type", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_type_fs); if (!debugfs_create_file("a5_debug_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fs)) { CAM_ERR(CAM_ICP, "failed to create a5_dbg_lvl"); rc = -ENOMEM; goto err; } dbgfileptr = debugfs_create_file("a5_debug_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fs); if (!debugfs_create_file("a5_fw_dump_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fw_dump)) { CAM_ERR(CAM_ICP, "failed to create a5_fw_dump_lvl"); rc = -ENOMEM; goto err; dbgfileptr = debugfs_create_file("a5_fw_dump_lvl", 0644, icp_hw_mgr.dentry, NULL, &cam_icp_debug_fw_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ICP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: /* Set default hang dump lvl */ icp_hw_mgr.a5_fw_dump_lvl = HFI_FW_DUMP_ON_FAILURE; return rc; err: debugfs_remove_recursive(icp_hw_mgr.dentry); icp_hw_mgr.dentry = NULL; return rc; } static int cam_icp_mgr_process_cmd(void *priv, void *data) Loading Loading @@ -6025,10 +5989,9 @@ static int cam_icp_mgr_create_wq(void) } rc = cam_icp_hw_mgr_create_debugfs_entry(); if (rc) { CAM_ERR(CAM_ICP, "create_debugfs_entry fail= rc: %d", rc); if (rc) goto debugfs_create_failed; } for (i = 0; i < ICP_WORKQ_NUM_TASK; i++) icp_hw_mgr.msg_work->task.pool[i].payload = &icp_hw_mgr.msg_work_data[i]; Loading
drivers/cam_isp/cam_isp_context.c +18 −17 Original line number Diff line number Diff line Loading @@ -5306,27 +5306,28 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova, static int cam_isp_context_debug_register(void) { isp_ctx_debug.dentry = debugfs_create_dir("camera_isp_ctx", NULL); int rc = 0; struct dentry *dbgfileptr = NULL; if (IS_ERR_OR_NULL(isp_ctx_debug.dentry)) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; dbgfileptr = debugfs_create_dir("camera_isp_ctx", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ICP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ isp_ctx_debug.dentry = dbgfileptr; if (!debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_state_monitor_dump"); goto err; dbgfileptr = debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ICP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } return 0; err: debugfs_remove_recursive(isp_ctx_debug.dentry); return -ENOMEM; end: return rc; } int cam_isp_context_init(struct cam_isp_context *ctx, Loading
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +26 −49 Original line number Diff line number Diff line Loading @@ -7819,61 +7819,40 @@ DEFINE_SIMPLE_ATTRIBUTE(cam_ife_camif_debug, static int cam_ife_hw_mgr_debug_register(void) { g_ife_hw_mgr.debug_cfg.dentry = debugfs_create_dir("camera_ife", NULL); if (!g_ife_hw_mgr.debug_cfg.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } int rc = 0; struct dentry *dbgfileptr = NULL; if (!debugfs_create_file("ife_csid_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_csid_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_ife_csid_debug"); goto err; dbgfileptr = debugfs_create_dir("camera_ife", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ g_ife_hw_mgr.debug_cfg.dentry = dbgfileptr; if (!debugfs_create_u32("enable_recovery", 0644, dbgfileptr = debugfs_create_file("ife_csid_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_csid_debug); dbgfileptr = debugfs_create_u32("enable_recovery", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_recovery"); goto err; } if (!debugfs_create_bool("enable_req_dump", 0644, &g_ife_hw_mgr.debug_cfg.enable_recovery); dbgfileptr = debugfs_create_bool("enable_req_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.enable_req_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_req_dump"); goto err; } if (!debugfs_create_file("ife_camif_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_camif_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_ife_camif_debug"); goto err; } if (!debugfs_create_bool("per_req_reg_dump", 0644, &g_ife_hw_mgr.debug_cfg.enable_req_dump); dbgfileptr = debugfs_create_file("ife_camif_debug", 0644, g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_camif_debug); dbgfileptr = debugfs_create_bool("per_req_reg_dump", 0644, g_ife_hw_mgr.debug_cfg.dentry, &g_ife_hw_mgr.debug_cfg.per_req_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create per_req_reg_dump entry"); goto err; &g_ife_hw_mgr.debug_cfg.per_req_reg_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: g_ife_hw_mgr.debug_cfg.enable_recovery = 0; return 0; err: debugfs_remove_recursive(g_ife_hw_mgr.debug_cfg.dentry); return -ENOMEM; return rc; } static void cam_req_mgr_process_workq_cam_ife_worker(struct work_struct *w) Loading @@ -7889,8 +7868,6 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl) struct cam_ife_hw_mgr_ctx *ctx_pool; struct cam_isp_hw_mgr_res *res_list_ife_out; CAM_DBG(CAM_ISP, "Enter"); memset(&g_ife_hw_mgr, 0, sizeof(g_ife_hw_mgr)); mutex_init(&g_ife_hw_mgr.ctx_mutex); Loading
drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +34 −47 Original line number Diff line number Diff line Loading @@ -5263,65 +5263,52 @@ DEFINE_DEBUGFS_ATTRIBUTE(cam_tfe_camif_debug, cam_tfe_get_camif_debug, cam_tfe_set_camif_debug, "%16llu"); #if IS_ENABLED(CONFIG_DEBUG_FS) static int cam_tfe_hw_mgr_debug_register(void) { g_tfe_hw_mgr.debug_cfg.dentry = debugfs_create_dir("camera_tfe", NULL); if (!g_tfe_hw_mgr.debug_cfg.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } int rc = 0; struct dentry *dbgfileptr = NULL; if (!debugfs_create_file("tfe_csid_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_csid_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_tfe_csid_debug"); goto err; dbgfileptr = debugfs_create_dir("camera_ife", NULL); if (!dbgfileptr) { CAM_ERR(CAM_ISP,"DebugFS could not create directory!"); rc = -ENOENT; goto end; } /* Store parent inode for cleanup in caller */ g_tfe_hw_mgr.debug_cfg.dentry = dbgfileptr; if (!debugfs_create_u32("enable_recovery", 0644, dbgfileptr = debugfs_create_file("tfe_csid_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_csid_debug); dbgfileptr = debugfs_create_u32("enable_recovery", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_recovery)) { CAM_ERR(CAM_ISP, "failed to create enable_recovery"); goto err; } if (!debugfs_create_u32("enable_reg_dump", 0644, &g_tfe_hw_mgr.debug_cfg.enable_recovery); dbgfileptr = debugfs_create_u32("enable_reg_dump", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.enable_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_reg_dump"); goto err; } if (!debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug)) { CAM_ERR(CAM_ISP, "failed to create cam_tfe_camif_debug"); goto err; } if (!debugfs_create_u32("per_req_reg_dump", 0644, &g_tfe_hw_mgr.debug_cfg.enable_reg_dump); dbgfileptr = debugfs_create_file("tfe_camif_debug", 0644, g_tfe_hw_mgr.debug_cfg.dentry, NULL, &cam_tfe_camif_debug); dbgfileptr = debugfs_create_u32("per_req_reg_dump", 0644, g_tfe_hw_mgr.debug_cfg.dentry, &g_tfe_hw_mgr.debug_cfg.per_req_reg_dump)) { CAM_ERR(CAM_ISP, "failed to create per_req_reg_dump entry"); goto err; &g_tfe_hw_mgr.debug_cfg.per_req_reg_dump); if (IS_ERR(dbgfileptr)) { if (PTR_ERR(dbgfileptr) == -ENODEV) CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel!"); else rc = PTR_ERR(dbgfileptr); } end: g_tfe_hw_mgr.debug_cfg.enable_recovery = 0; return rc; } #else static inline int cam_tfe_hw_mgr_debug_register(void) { g_tfe_hw_mgr.debug_cfg.enable_recovery = 0; CAM_WARN(CAM_ISP, "DebugFS not enabled in kernel"); return 0; err: debugfs_remove_recursive(g_tfe_hw_mgr.debug_cfg.dentry); return -ENOMEM; } #endif static void cam_req_mgr_process_tfe_worker(struct work_struct *w) { Loading