disp: msm: refactor DSI debugbus dumping

Move DSI debugbus dumping logic from DSI driver to sde_dbg
in order to utilize the framework in place for debugbuses.

This allows for more control over the dumping logic, such
as where the dump data is stored(memory/console), via nodes
populated in debugfs.

Change-Id: Iff507fdaa02d26af26743e81f6048aec57c09a76
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This commit is contained in:
Steve Cohen
2020-01-29 18:20:53 -05:00
parent 5e1d3e5869
commit b5acfe1e42
7 changed files with 278 additions and 110 deletions

View File

@@ -1887,6 +1887,7 @@ static int dsi_ctrl_dev_probe(struct platform_device *pdev)
}
item->ctrl = dsi_ctrl;
sde_dbg_dsi_ctrl_register(dsi_ctrl->hw.base, dsi_ctrl->name);
mutex_lock(&dsi_ctrl_list_lock);
list_add(&item->list, &dsi_ctrl_list);
@@ -1962,29 +1963,6 @@ static struct platform_driver dsi_ctrl_driver = {
},
};
#if defined(CONFIG_DEBUG_FS)
void dsi_ctrl_debug_dump(u32 *entries, u32 size)
{
struct list_head *pos, *tmp;
struct dsi_ctrl *ctrl = NULL;
if (!entries || !size)
return;
mutex_lock(&dsi_ctrl_list_lock);
list_for_each_safe(pos, tmp, &dsi_ctrl_list) {
struct dsi_ctrl_list_item *n;
n = list_entry(pos, struct dsi_ctrl_list_item, list);
ctrl = n->ctrl;
DSI_ERR("dsi ctrl:%d\n", ctrl->cell_index);
ctrl->hw.ops.debug_bus(&ctrl->hw, entries, size);
}
mutex_unlock(&dsi_ctrl_list_lock);
}
#endif
/**
* dsi_ctrl_get() - get a dsi_ctrl handle from an of_node
* @of_node: of_node of the DSI controller.