disp: msm: enable event log and disp ramdump without DEBUG_FS

This patch allows event log and display ramdump
module compilation when DEBUG_FS config is in disabled
state.

Change-Id: Ibe1ff7d9d4a4f3c64091df757caba2450295e7ec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel
2020-10-21 16:57:10 -07:00
parent b267a4e5a2
commit 4a21b7b6d8
3 changed files with 12 additions and 105 deletions

View File

@@ -82,14 +82,13 @@ msm_drm-$(CONFIG_DRM_MSM_SDE) += sde/sde_crtc.o \
sde_dsc_helper.o \ sde_dsc_helper.o \
sde_vdc_helper.o \ sde_vdc_helper.o \
sde/sde_hw_rc.o \ sde/sde_hw_rc.o \
sde_dbg.o \
sde_dbg_evtlog.o \
msm_drm-$(CONFIG_DRM_SDE_VM) += sde/sde_vm_common.o \ msm_drm-$(CONFIG_DRM_SDE_VM) += sde/sde_vm_common.o \
sde/sde_vm_primary.o \ sde/sde_vm_primary.o \
sde/sde_vm_trusted.o sde/sde_vm_trusted.o
msm_drm-$(CONFIG_DEBUG_FS) += sde_dbg.o \
sde_dbg_evtlog.o \
msm_drm-$(CONFIG_DRM_SDE_WB) += sde/sde_wb.o \ msm_drm-$(CONFIG_DRM_SDE_WB) += sde/sde_wb.o \
sde/sde_encoder_phys_wb.o sde/sde_encoder_phys_wb.o

View File

@@ -5287,7 +5287,7 @@ void sde_dbg_ctrl(const char *name, ...)
va_end(args); va_end(args);
} }
#ifdef CONFIG_DEBUG_FS
/* /*
* sde_dbg_debugfs_open - debugfs open handler for evtlog dump * sde_dbg_debugfs_open - debugfs open handler for evtlog dump
* @inode: debugfs inode * @inode: debugfs inode
@@ -6249,6 +6249,15 @@ int sde_dbg_debugfs_register(struct device *dev)
return 0; return 0;
} }
#else
int sde_dbg_debugfs_register(struct device *dev)
{
return 0;
}
#endif
static void _sde_dbg_debugfs_destroy(void) static void _sde_dbg_debugfs_destroy(void)
{ {
} }

View File

@@ -175,8 +175,6 @@ extern struct sde_dbg_evtlog *sde_dbg_base_evtlog;
#define SDE_DBG_CTRL(...) sde_dbg_ctrl(__func__, ##__VA_ARGS__, \ #define SDE_DBG_CTRL(...) sde_dbg_ctrl(__func__, ##__VA_ARGS__, \
SDE_DBG_DUMP_DATA_LIMITER) SDE_DBG_DUMP_DATA_LIMITER)
#if defined(CONFIG_DEBUG_FS)
/** /**
* sde_evtlog_init - allocate a new event log object * sde_evtlog_init - allocate a new event log object
* Returns: evtlog or -ERROR * Returns: evtlog or -ERROR
@@ -372,103 +370,4 @@ static inline void sde_rsc_debug_dump(u32 mux_sel)
void sde_rsc_debug_dump(u32 mux_sel); void sde_rsc_debug_dump(u32 mux_sel);
#endif #endif
#else
static inline struct sde_dbg_evtlog *sde_evtlog_init(void)
{
return NULL;
}
static inline void sde_evtlog_destroy(struct sde_dbg_evtlog *evtlog)
{
}
static inline void sde_evtlog_log(struct sde_dbg_evtlog *evtlog,
const char *name, int line, int flag, ...)
{
}
static inline void sde_evtlog_dump_all(struct sde_dbg_evtlog *evtlog)
{
}
static inline bool sde_evtlog_is_enabled(struct sde_dbg_evtlog *evtlog,
u32 flag)
{
return false;
}
static inline ssize_t sde_evtlog_dump_to_buffer(struct sde_dbg_evtlog *evtlog,
char *evtlog_buf, ssize_t evtlog_buf_size,
bool update_last_entry)
{
return 0;
}
static inline int sde_dbg_dsi_ctrl_register(void __iomem *base,
const char *name)
{
return 0;
}
static inline void sde_dbg_init_dbg_buses(u32 hwversion)
{
}
static inline int sde_dbg_init(struct device *dev)
{
return 0;
}
static inline int sde_dbg_debugfs_register(struct device *dev)
{
return 0;
}
static inline void sde_dbg_destroy(void)
{
}
static inline void sde_dbg_dump(enum sde_dbg_dump_context mode,
const char *name, ...)
{
}
static inline void sde_dbg_ctrl(const char *name, ...)
{
}
static inline int sde_dbg_reg_register_base(const char *name,
void __iomem *base, size_t max_offset)
{
return 0;
}
static inline 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)
{
}
static inline void sde_dbg_set_sde_top_offset(u32 blk_off)
{
}
static inline void sde_evtlog_set_filter(
struct sde_dbg_evtlog *evtlog, char *filter)
{
}
static inline int sde_evtlog_get_filter(struct sde_dbg_evtlog *evtlog,
int index, char *buf, size_t bufsz)
{
return -EINVAL;
}
static inline void sde_rsc_debug_dump(u32 mux_sel)
{
}
#endif /* defined(CONFIG_DEBUG_FS) */
#endif /* SDE_DBG_H_ */ #endif /* SDE_DBG_H_ */