diff --git a/msm/dsi/dsi_ctrl.c b/msm/dsi/dsi_ctrl.c index 9dbc8efcaa..94cd3d96de 100644 --- a/msm/dsi/dsi_ctrl.c +++ b/msm/dsi/dsi_ctrl.c @@ -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; diff --git a/msm/sde_dbg.c b/msm/sde_dbg.c index 3374955e5d..72f43446ae 100755 --- a/msm/sde_dbg.c +++ b/msm/sde_dbg.c @@ -959,6 +959,8 @@ static void _sde_dbg_dump_dsi_dbg_bus(struct sde_dbg_sde_debug_bus *bus, u32 ena _sde_dbg_dump_bus_entry(bus, entries, bus_size, ctl_entry->base, dump_addr, enable_mask); + if (dump_addr) + dump_addr += list_size / (sizeof(u32) * dsi_count); } mutex_unlock(&sde_dbg_dsi_mutex);