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

Commit 0adca3fb authored by Xiaowen Wu's avatar Xiaowen Wu
Browse files

drm/msm/dsi-staging: decouple label and display type for DSI



DSI driver requires label and display type to be the same,
which introduces the limitation that only DSI display can be the
primary display. This change will decouple the label and display
type to allow other display to set to primary.

Change-Id: Ibff404ddc9927c239420861af6bce025ced340cc
Signed-off-by: default avatarXiaowen Wu <wxiaowen@codeaurora.org>
parent 3ebf72a4
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -3647,7 +3647,7 @@ static int dsi_display_res_init(struct dsi_display *display)
	display->panel = dsi_panel_get(&display->pdev->dev,
				display->panel_of,
				display->parser_node,
				display->display_type,
				display->dsi_type,
				display->cmdline_topology);
	if (IS_ERR_OR_NULL(display->panel)) {
		rc = PTR_ERR(display->panel);
@@ -5265,7 +5265,6 @@ int dsi_display_dev_probe(struct platform_device *pdev)

	for (i = 0; i < count; i++) {
		struct device_node *np;
		const char *disp_type = NULL;

		np = of_parse_phandle(node, disp_list, i);
		name = of_get_property(np, "label", NULL);
@@ -5274,16 +5273,6 @@ int dsi_display_dev_probe(struct platform_device *pdev)
			continue;
		}

		disp_type = of_get_property(np, "qcom,display-type", NULL);
		if (!disp_type) {
			pr_err("display type not defined for %s\n", name);
			continue;
		}

		/* primary/secondary display should match with current dsi */
		if (strcmp(dsi_type, disp_type))
			continue;

		if (boot_disp->boot_disp_en) {
			if (!strcmp(boot_disp->name, name)) {
				disp_node = np;
@@ -5313,6 +5302,7 @@ int dsi_display_dev_probe(struct platform_device *pdev)
	display->name = name;
	display->pdev = pdev;
	display->boot_disp = boot_disp;
	display->dsi_type = dsi_type;

	dsi_display_parse_cmdline_topology(display, index);

@@ -5539,7 +5529,7 @@ static int dsi_display_ext_get_info(struct drm_connector *connector,

	info->is_connected = connector->status != connector_status_disconnected;

	if (!strcmp(display->display_type, "primary"))
	if (!strcmp(display->dsi_type, "primary"))
		info->is_primary = true;
	else
		info->is_primary = false;
@@ -5901,7 +5891,7 @@ int dsi_display_get_info(struct drm_connector *connector,
	info->is_connected = true;
	info->is_primary = false;

	if (!strcmp(display->display_type, "primary"))
	if (!strcmp(display->dsi_type, "primary"))
		info->is_primary = true;

	info->width_mm = phy_props.panel_width_mm;
+2 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ struct dsi_display_ext_bridge {
 * @ext_conn:         Pointer to external connector attached to DSI connector
 * @name:             Name of the display.
 * @display_type:     Display type as defined in device tree.
 * @dsi_type:         Display label as defined in device tree.
 * @list:             List pointer.
 * @is_active:        Is display active.
 * @is_cont_splash_enabled:  Is continuous splash enabled
@@ -198,6 +199,7 @@ struct dsi_display {

	const char *name;
	const char *display_type;
	const char *dsi_type;
	struct list_head list;
	bool is_cont_splash_enabled;
	bool sw_te_using_wd;