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

Commit 577fc074 authored by Krishna Manikandan's avatar Krishna Manikandan
Browse files

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: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
parent f02c5113
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -37,8 +37,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 \
@@ -71,6 +69,9 @@ msm_drm-$(CONFIG_DRM_MSM_SDE) += sde/sde_crtc.o \
	sde/sde_fence.o \
	sde/sde_hw_qdss.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 \

+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -165,6 +165,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;
@@ -211,6 +212,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)
+4 −5
Original line number Diff line number Diff line
@@ -407,8 +407,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;
}
@@ -422,7 +421,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, ...)
{
}
@@ -443,7 +442,7 @@ static inline void sde_dbg_reg_register_dump_range(const char *base_name,
{
}

void sde_dbg_set_sde_top_offset(u32 blk_off)
static inline void sde_dbg_set_sde_top_offset(u32 blk_off)
{
}

@@ -462,7 +461,7 @@ static inline void sde_rsc_debug_dump(u32 mux_sel)
{
}

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

+6 −2
Original line number Diff line number Diff line
// 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.
 */

#define pr_fmt(fmt)	"[sde_rsc:%s:%d]: " fmt, __func__, __LINE__
@@ -1089,7 +1089,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)
{
@@ -1376,6 +1375,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)