diff options
| author | Aravind Venkateswaran <aravindh@codeaurora.org> | 2015-07-01 18:05:22 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:43:43 -0700 |
| commit | 8b9bb877e89098de5df73fb4bca9f417aa6cb283 (patch) | |
| tree | c7bc20de71764ac8dcde47fe924c80eccd85b04d | |
| parent | 96007ec277d79b84abcdac7bdc6334dbb92f9b2d (diff) | |
msm: mdss: specify unique name for panel debugfs directory
For dual DSI board configurations with independent displays,
the debugfs directory needs to be created for both panels. Use
unique directory names for the debugfs node. After this change,
the debugfs directory will have the following structure:
For Split-DSI:
/sys/kernel/debug/mdss_panel_fb0/intf0 (assuming fb0 device node)
/sys/kernel/debug/mdss_panel_fb0/intf1 (assuming fb0 device node)
For Dual-DSI with independent displays:
/sys/kernel/debug/mdss_panel_fb0/intf0 (assuming fb0 device node)
/sys/kernel/debug/mdss_panel_fb1/intf0 (assuming fb1 device node)
For Single-DSI:
/sys/kernel/debug/mdss_panel_fb0/intf0 (assuming fb0 device node)
Change-Id: Ic98d0d662932223828c41511c51cb4a0dda42bb2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 5 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_panel.c | 21 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_panel.h | 3 |
3 files changed, 17 insertions, 12 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 1a4927c21f0c..02e6dac7a259 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -2041,6 +2041,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd) { int ret = -ENODEV; int bpp; + char panel_name[20]; struct mdss_panel_info *panel_info = mfd->panel_info; struct fb_info *fbi = mfd->fbi; struct fb_fix_screeninfo *fix; @@ -2263,7 +2264,9 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd) return -EPERM; } - mdss_panel_debugfs_init(panel_info); + snprintf(panel_name, ARRAY_SIZE(panel_name), "mdss_panel_fb%d", + mfd->index); + mdss_panel_debugfs_init(panel_info, panel_name); pr_info("FrameBuffer[%d] %dx%d registered successfully!\n", mfd->index, fbi->var.xres, fbi->var.yres); diff --git a/drivers/video/fbdev/msm/mdss_panel.c b/drivers/video/fbdev/msm/mdss_panel.c index 3ee449afad87..e2671fa34024 100644 --- a/drivers/video/fbdev/msm/mdss_panel.c +++ b/drivers/video/fbdev/msm/mdss_panel.c @@ -21,7 +21,7 @@ #include "mdss_panel.h" -#define NUM_DSI_INTF 2 +#define NUM_INTF 2 int mdss_panel_debugfs_fbc_setup(struct mdss_panel_debugfs_info *debugfs_info, struct mdss_panel_info *panel_info, struct dentry *parent) @@ -425,7 +425,7 @@ int mdss_panel_debugfs_panel_setup(struct mdss_panel_debugfs_info *debugfs_info, } int mdss_panel_debugfs_setup(struct mdss_panel_info *panel_info, struct dentry - *parent, char *dsi_str) + *parent, char *intf_str) { struct mdss_panel_debugfs_info *debugfs_info; debugfs_info = kzalloc(sizeof(*debugfs_info), GFP_KERNEL); @@ -434,7 +434,7 @@ int mdss_panel_debugfs_setup(struct mdss_panel_info *panel_info, struct dentry return -ENOMEM; } - debugfs_info->root = debugfs_create_dir(dsi_str, parent); + debugfs_info->root = debugfs_create_dir(intf_str, parent); if (IS_ERR_OR_NULL(debugfs_info->root)) { pr_err("Debugfs create dir failed with error: %ld\n", PTR_ERR(debugfs_info->root)); @@ -455,12 +455,13 @@ int mdss_panel_debugfs_setup(struct mdss_panel_info *panel_info, struct dentry return 0; } -int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info) +int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info, + char const *panel_name) { struct mdss_panel_data *pdata; struct dentry *parent; - char dsi_str[10]; - int dsi_index = 0; + char intf_str[10]; + int intf_index = 0; int rc = 0; if (panel_info->type != MIPI_VIDEO_PANEL @@ -468,7 +469,7 @@ int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info) return -ENOTSUPP; pdata = container_of(panel_info, struct mdss_panel_data, panel_info); - parent = debugfs_create_dir("mdss_panel", NULL); + parent = debugfs_create_dir(panel_name, NULL); if (IS_ERR_OR_NULL(parent)) { pr_err("Debugfs create dir failed with error: %ld\n", PTR_ERR(parent)); @@ -476,15 +477,15 @@ int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info) } do { - snprintf(dsi_str, sizeof(dsi_str), "dsi%d", dsi_index++); + snprintf(intf_str, sizeof(intf_str), "intf%d", intf_index++); rc = mdss_panel_debugfs_setup(&pdata->panel_info, parent, - dsi_str); + intf_str); if (rc) { pr_err("error in initilizing panel debugfs\n"); return rc; } pdata = pdata->next; - } while (pdata && dsi_index < NUM_DSI_INTF); + } while (pdata && intf_index < NUM_INTF); pr_debug("Initilized mdss_panel_debugfs_info\n"); return 0; diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h index a2069218d1e5..370452e49cb1 100644 --- a/drivers/video/fbdev/msm/mdss_panel.h +++ b/drivers/video/fbdev/msm/mdss_panel.h @@ -788,7 +788,8 @@ int mdss_rect_cmp(struct mdss_rect *rect1, struct mdss_rect *rect2); void mdss_panel_override_te_params(struct mdss_panel_info *pinfo); #ifdef CONFIG_FB_MSM_MDSS -int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info); +int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info, + char const *panel_name); void mdss_panel_debugfs_cleanup(struct mdss_panel_info *panel_info); void mdss_panel_debugfsinfo_to_panelinfo(struct mdss_panel_info *panel_info); #else |
