|
@@ -271,7 +271,6 @@ static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
|
|
|
{
|
|
|
int rc = 0;
|
|
|
struct dentry *dir, *state_file, *reg_dump, *cmd_dma_logs;
|
|
|
- char dbg_name[DSI_DEBUG_NAME_LEN];
|
|
|
|
|
|
if (!dsi_ctrl || !parent) {
|
|
|
DSI_CTRL_ERR(dsi_ctrl, "Invalid params\n");
|
|
@@ -334,10 +333,6 @@ static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
|
|
|
|
|
|
dsi_ctrl->debugfs_root = dir;
|
|
|
|
|
|
- snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl", dsi_ctrl->cell_index);
|
|
|
- sde_dbg_reg_register_base(dbg_name, dsi_ctrl->hw.base,
|
|
|
- msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"),
|
|
|
- msm_get_phys_addr(dsi_ctrl->pdev, "dsi_ctrl"), SDE_DBG_DSI);
|
|
|
error_remove_dir:
|
|
|
debugfs_remove(dir);
|
|
|
error:
|
|
@@ -350,16 +345,8 @@ static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
|
|
|
return 0;
|
|
|
}
|
|
|
#else
|
|
|
-static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl,
|
|
|
- struct dentry *parent)
|
|
|
+static int dsi_ctrl_debugfs_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
|
|
|
{
|
|
|
- char dbg_name[DSI_DEBUG_NAME_LEN];
|
|
|
-
|
|
|
- snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl", dsi_ctrl->cell_index);
|
|
|
- sde_dbg_reg_register_base(dbg_name, dsi_ctrl->hw.base,
|
|
|
- msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"),
|
|
|
- msm_get_phys_addr(dsi_ctrl->pdev, "dsi_ctrl"), SDE_DBG_DSI);
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
|
|
@@ -2316,6 +2303,7 @@ void dsi_ctrl_put(struct dsi_ctrl *dsi_ctrl)
|
|
|
*/
|
|
|
int dsi_ctrl_drv_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
|
|
|
{
|
|
|
+ char dbg_name[DSI_DEBUG_NAME_LEN];
|
|
|
int rc = 0;
|
|
|
|
|
|
if (!dsi_ctrl) {
|
|
@@ -2337,6 +2325,11 @@ int dsi_ctrl_drv_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent)
|
|
|
goto error;
|
|
|
}
|
|
|
|
|
|
+ snprintf(dbg_name, DSI_DEBUG_NAME_LEN, "dsi%d_ctrl", dsi_ctrl->cell_index);
|
|
|
+ sde_dbg_reg_register_base(dbg_name, dsi_ctrl->hw.base,
|
|
|
+ msm_iomap_size(dsi_ctrl->pdev, "dsi_ctrl"),
|
|
|
+ msm_get_phys_addr(dsi_ctrl->pdev, "dsi_ctrl"), SDE_DBG_DSI);
|
|
|
+
|
|
|
error:
|
|
|
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
|
|
return rc;
|