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

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

Merge "disp: msm: dsi: Add support for secondary display using firmware approach"

parents 245f9d3c b74bd825
Loading
Loading
Loading
Loading
+20 −7
Original line number Diff line number Diff line
@@ -4772,7 +4772,7 @@ static int _dsi_display_dev_init(struct dsi_display *display)
		return -EINVAL;
	}

	if (!display->panel_node)
	if (!display->panel_node && !display->fw)
		return 0;

	mutex_lock(&display->display_lock);
@@ -5023,7 +5023,7 @@ static int dsi_display_bind(struct device *dev,
				drm, display);
		return -EINVAL;
	}
	if (!display->panel_node)
	if (!display->panel_node && !display->fw)
		return 0;

	if (!display->fw)
@@ -5320,7 +5320,13 @@ static void dsi_display_firmware_display(const struct firmware *fw,
			fw->size);

		display->fw = fw;

		if (!strcmp(display->display_type, "primary"))
			display->name = "dsi_firmware_display";

		else if (!strcmp(display->display_type, "secondary"))
			display->name = "dsi_firmware_display_secondary";

	} else {
		DSI_INFO("no firmware available, fallback to device node\n");
	}
@@ -5401,10 +5407,17 @@ int dsi_display_dev_probe(struct platform_device *pdev)

	/* initialize display in firmware callback */
	if (!boot_disp->boot_disp_en && IS_ENABLED(CONFIG_DSI_PARSER)) {
		if (!strcmp(display->display_type, "primary"))
			firm_req = !request_firmware_nowait(
				THIS_MODULE, 1, "dsi_prop",
				&pdev->dev, GFP_KERNEL, display,
				dsi_display_firmware_display);

		else if (!strcmp(display->display_type, "secondary"))
			firm_req = !request_firmware_nowait(
				THIS_MODULE, 1, "dsi_prop_sec",
				&pdev->dev, GFP_KERNEL, display,
				dsi_display_firmware_display);
	}

	if (!firm_req) {