Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94eaa869 authored by Mahadevan's avatar Mahadevan
Browse files

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



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

Change-Id: Iae4f695da34aec1eb12581c74a101643e1a36669
Signed-off-by: default avatarMahadevan <mahap@codeaurora.org>
parent a5efd1f0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -68,8 +68,7 @@ msm_drm-$(CONFIG_DRM_MSM_SDE) += sde/sde_crtc.o \
	sde/sde_hw_ds.o \
	sde/sde_fence.o \
	sde/sde_hw_qdss.o \

msm_drm-$(CONFIG_DEBUG_FS) += sde_dbg.o \
	sde_dbg.o \
	sde_dbg_evtlog.o \

msm_drm-$(CONFIG_DRM_SDE_WB) += sde/sde_wb.o \
+7 −2
Original line number Diff line number Diff line
@@ -263,6 +263,13 @@ static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
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"));
	return 0;
}
static int dsi_ctrl_debugfs_deinit(struct dsi_ctrl *dsi_ctrl)
@@ -2063,7 +2070,6 @@ static struct platform_driver dsi_ctrl_driver = {
	},
};

#if defined(CONFIG_DEBUG_FS)

void dsi_ctrl_debug_dump(u32 *entries, u32 size)
{
@@ -2085,7 +2091,6 @@ void dsi_ctrl_debug_dump(u32 *entries, u32 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.
+10 −1
Original line number Diff line number Diff line
@@ -3727,7 +3727,7 @@ void sde_dbg_ctrl(const char *name, ...)
	va_end(args);
}


#ifdef CONFIG_DEBUG_FS
/*
 * sde_dbg_debugfs_open - debugfs open handler for evtlog dump
 * @inode: debugfs inode
@@ -4669,6 +4669,15 @@ int sde_dbg_debugfs_register(struct device *dev)
	return 0;
}

#else

int sde_dbg_debugfs_register(struct device *dev)
{
	return 0;
}

#endif

static void _sde_dbg_debugfs_destroy(void)
{
}
+0 −102
Original line number Diff line number Diff line
@@ -241,7 +241,6 @@ extern struct sde_dbg_reglog *sde_dbg_base_reglog;
#define SDE_DBG_CTRL(...) sde_dbg_ctrl(__func__, ##__VA_ARGS__, \
		SDE_DBG_DUMP_DATA_LIMITER)

#if defined(CONFIG_DEBUG_FS)

/**
 * sde_evtlog_init - allocate a new event log object
@@ -459,105 +458,4 @@ void sde_rsc_debug_dump(u32 mux_sel);
 */
void dsi_ctrl_debug_dump(u32 *entries, u32 size);

#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_reglog_log(u8 blk_id, u32 val, u32 addr)
{
}

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 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)
{
}

static inline void dsi_ctrl_debug_dump(u32 *entries, u32 size)
{
}

#endif /* defined(CONFIG_DEBUG_FS) */


#endif /* SDE_DBG_H_ */