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

Commit c049a981 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: specify unique name for panel debugfs directory"

parents 2a99ec29 38454ef8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2038,6 +2038,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;
@@ -2260,7 +2261,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);

+11 −10
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -785,7 +785,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