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

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*/
#ifndef SDE_DBG_H_
@@ -317,6 +317,14 @@ void sde_dbg_reg_register_dump_range(const char *base_name,
const char *range_name, u32 offset_start, u32 offset_end,
uint32_t xin_id);
/**
* sde_dbg_dsi_ctrl_register - register a dsi ctrl for debugbus dumping
* @base: iomem base address for dsi controller
* @name: name of the dsi controller
* Returns: 0 or -ERROR
*/
int sde_dbg_dsi_ctrl_register(void __iomem *base, const char *name);
/**
* sde_dbg_set_sde_top_offset - set the target specific offset from mdss base
* address of the top registers. Used for accessing debug bus controls.
@@ -354,13 +362,6 @@ static inline void sde_rsc_debug_dump(u32 mux_sel)
void sde_rsc_debug_dump(u32 mux_sel);
#endif
/**
* dsi_ctrl_debug_dump - dump dsi debug dump status
* @entries: array of debug bus control values
* @size: size of the debug bus control array
*/
void dsi_ctrl_debug_dump(u32 *entries, u32 size);
#else
static inline struct sde_dbg_evtlog *sde_evtlog_init(void)
{
@@ -433,6 +434,11 @@ static inline void sde_dbg_reg_register_dump_range(const char *base_name,
{
}
int sde_dbg_register_dsi_ctrl(void __iomem *base, const char *name)
{
return 0;
}
void sde_dbg_set_sde_top_offset(u32 blk_off)
{
}
@@ -452,10 +458,6 @@ static inline void sde_rsc_debug_dump(u32 mux_sel)
{
}
static inline void dsi_ctrl_debug_dump(u32 entries, u32 size)
{
}
#endif /* defined(CONFIG_DEBUG_FS) */