浏览代码

disp: msm: sde: update check flags to handle CONFIG_DEBUG_FS

Add support to handle disabling of CONFIG_DEBUG_FS.

Change-Id: I8c07434afc36edfae9bd9bc7880d07264eca7650
Signed-off-by: Krishna Manikandan <[email protected]>
Signed-off-by: Samantha Tran <[email protected]>
Samantha Tran 5 年之前
父节点
当前提交
18d29a5b7b
共有 4 个文件被更改,包括 13 次插入7 次删除
  1. 3 2
      msm/Makefile
  2. 2 0
      msm/sde/sde_crtc.c
  3. 3 4
      msm/sde_dbg.h
  4. 5 1
      msm/sde_rsc.c

+ 3 - 2
msm/Makefile

@@ -45,8 +45,6 @@ msm_drm-$(CONFIG_DRM_MSM_SDE) += sde/sde_crtc.o \
 	sde/sde_connector.o \
 	sde/sde_color_processing.o \
 	sde/sde_vbif.o \
-	sde_dbg.o \
-	sde_dbg_evtlog.o \
 	sde_io_util.o \
 	sde/sde_hw_reg_dma_v1_color_proc.o \
 	sde/sde_hw_color_proc_v4.o \
@@ -82,6 +80,9 @@ msm_drm-$(CONFIG_DRM_MSM_SDE) += sde/sde_crtc.o \
 	sde_vdc_helper.o \
 	sde/sde_hw_rc.o \
 
+msm_drm-$(CONFIG_DEBUG_FS) += sde_dbg.o \
+	sde_dbg_evtlog.o \
+
 msm_drm-$(CONFIG_DRM_SDE_WB) += sde/sde_wb.o \
 	sde/sde_encoder_phys_wb.o \
 

+ 2 - 0
msm/sde/sde_crtc.c

@@ -166,6 +166,7 @@ static void _sde_crtc_deinit_events(struct sde_crtc *sde_crtc)
 		return;
 }
 
+#ifdef CONFIG_DEBUG_FS
 static int _sde_debugfs_fps_status_show(struct seq_file *s, void *data)
 {
 	struct sde_crtc *sde_crtc;
@@ -212,6 +213,7 @@ static int _sde_debugfs_fps_status(struct inode *inode, struct file *file)
 	return single_open(file, _sde_debugfs_fps_status_show,
 			inode->i_private);
 }
+#endif
 
 static ssize_t fps_periodicity_ms_store(struct device *device,
 		struct device_attribute *attr, const char *buf, size_t count)

+ 3 - 4
msm/sde_dbg.h

@@ -414,8 +414,7 @@ static inline void sde_dbg_init_dbg_buses(u32 hwversion)
 {
 }
 
-static inline int sde_dbg_init(struct device *dev,
-		struct sde_dbg_power_ctrl *power_ctrl)
+static inline int sde_dbg_init(struct device *dev)
 {
 	return 0;
 }
@@ -429,7 +428,7 @@ static inline void sde_dbg_destroy(void)
 {
 }
 
-static inline void sde_dbg_dump(enum sde_dbg_dump_context,
+static inline void sde_dbg_dump(enum sde_dbg_dump_context mode,
 	const char *name, ...)
 {
 }
@@ -455,7 +454,7 @@ int sde_dbg_register_dsi_ctrl(void __iomem *base, const char *name)
 	return 0;
 }
 
-void sde_dbg_set_sde_top_offset(u32 blk_off)
+static inline void sde_dbg_set_sde_top_offset(u32 blk_off)
 {
 }
 

+ 5 - 1
msm/sde_rsc.c

@@ -1132,7 +1132,6 @@ void sde_rsc_debug_dump(u32 mux_sel)
 	if (rsc->hw_ops.debug_dump)
 		rsc->hw_ops.debug_dump(rsc, mux_sel);
 }
-#endif /* defined(CONFIG_DEBUG_FS) */
 
 static int _sde_debugfs_status_show(struct seq_file *s, void *data)
 {
@@ -1581,6 +1580,11 @@ static void _sde_rsc_init_debugfs(struct sde_rsc_priv *rsc, char *name)
 	debugfs_create_x32("debug_mode", 0600, rsc->debugfs_root,
 							&rsc->debug_mode);
 }
+#else
+static void _sde_rsc_init_debugfs(struct sde_rsc_priv *rsc, char *name)
+{
+}
+#endif /* defined(CONFIG_DEBUG_FS) */
 
 static void sde_rsc_deinit(struct platform_device *pdev,
 					struct sde_rsc_priv *rsc)