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

Commit 30055d60 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/shd: add display-type support in shared display"

parents f0de7ad6 5478828c
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -3648,7 +3648,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);
@@ -5271,7 +5271,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);
@@ -5280,16 +5279,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;
@@ -5319,6 +5308,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);

@@ -5545,7 +5535,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
@@ -146,6 +146,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
@@ -196,6 +197,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;
+8 −0
Original line number Diff line number Diff line
@@ -688,6 +688,9 @@ static int shd_conn_set_info_blob(struct drm_connector *connector,
	sde_kms_info_add_keyint(info, "max_blendstages",
				shd_display->stage_range.size);

	sde_kms_info_add_keystr(info, "display type",
				shd_display->display_type);

	return 0;
}

@@ -1121,6 +1124,11 @@ static int shd_parse_display(struct shd_display *display)
		display->stage_range.start,
		display->stage_range.size);

	display->display_type = of_get_property(of_node,
		"qcom,display-type", NULL);
	if (!display->display_type)
		display->display_type = "unknown";

error:
	return rc;
}
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ struct shd_display_base {
struct shd_display {
	struct drm_device *drm_dev;
	const char *name;
	const char *display_type;

	struct shd_display_base *base;
	struct drm_bridge *bridge;