disp: msm: fix dsi debugbus in-mem logging
Update the dump_mem pointer offset while storing the debugbus data for the second DSI to avoid overwriting to same memory. As part of the change, register the DSI ctrl with sde_dbg from ctrl_init directly, instead of debugfs_init to avoid code replication. Change-Id: I4089f3038ffa89136eaea956d27270f638a99043 Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
此提交包含在:
@@ -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;
|
||||
|
新增問題並參考
封鎖使用者