disp: msm: dsi: modify handling of debugfs initialization
Add support to allow creation of debugfs node only if CONFIG_DEBUG_FS is enabled. Change-Id: I1ae2c4188a99e3ed88f59fc021efc01407bf942d Signed-off-by: Harigovindan P <harigovi@codeaurora.org> Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:

committed by
Satya Rama Aditya Pinapala

szülő
a1143d12be
commit
1b9802c099
@@ -476,23 +476,6 @@ error:
|
||||
display->panel->esd_config.esd_enabled = false;
|
||||
}
|
||||
|
||||
static bool dsi_display_is_te_based_esd(struct dsi_display *display)
|
||||
{
|
||||
u32 status_mode = 0;
|
||||
|
||||
if (!display->panel) {
|
||||
DSI_ERR("Invalid panel data\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
status_mode = display->panel->esd_config.status_mode;
|
||||
|
||||
if (status_mode == ESD_MODE_PANEL_TE &&
|
||||
gpio_is_valid(display->disp_te_gpio))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Allocate memory for cmd dma tx buffer */
|
||||
static int dsi_host_alloc_cmd_tx_buffer(struct dsi_display *display)
|
||||
{
|
||||
@@ -1081,6 +1064,24 @@ int dsi_display_set_power(struct drm_connector *connector,
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static bool dsi_display_is_te_based_esd(struct dsi_display *display)
|
||||
{
|
||||
u32 status_mode = 0;
|
||||
|
||||
if (!display->panel) {
|
||||
DSI_ERR("Invalid panel data\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
status_mode = display->panel->esd_config.status_mode;
|
||||
|
||||
if (status_mode == ESD_MODE_PANEL_TE &&
|
||||
gpio_is_valid(display->disp_te_gpio))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static ssize_t debugfs_dump_info_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t user_len,
|
||||
@@ -1649,6 +1650,16 @@ static int dsi_display_debugfs_deinit(struct dsi_display *display)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int dsi_display_debugfs_init(struct dsi_display *display)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static int dsi_display_debugfs_deinit(struct dsi_display *display)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
||||
static void adjust_timing_by_ctrl_count(const struct dsi_display *display,
|
||||
struct dsi_display_mode *mode)
|
||||
|
Reference in New Issue
Block a user