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

Commit 61c3d2b2 authored by Anusha Koduru's avatar Anusha Koduru
Browse files

msm: mdss: support no panel connected scenario for DSI



Add proper bail out and also avoid any commands involving
ACK from the panel.

Change-Id: Id321e1564f32a8b1565d2e735e8af54fb502751e
Signed-off-by: default avatarAnusha Koduru <kanusha@codeaurora.org>
parent 70db5225
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -350,6 +350,9 @@ Optional properties:
					"180" = panel is flipped in both horizontal and vertical directions
					"hflip" = panel is flipped in horizontal direction
					"vflip" = panel is flipped in vertical direction
- qcom,panel-ack-disabled: A boolean property to indicate, whether we need to wait for any ACK from the panel
			   for any commands that we send.

Note, if a given optional qcom,* binding is not present, then the driver will configure
the default values specified.

@@ -465,6 +468,7 @@ Example:
		qcom,video-to-cmd-mode-switch-commands = [15 01 00 00 00 00 02 C2 0B
						15 01 00 00 00 00 02 C2 08];
		qcom,cmd-to-video-mode-switch-commands = [15 01 00 00 00 00 02 C2 03];
		qcom,panel-ack-disabled;
		qcom,mdss-dsi-horizontal-line-idle = <0 40 256>,
						<40 120 128>,
						<128 240 64>;
+5 −0
Original line number Diff line number Diff line
@@ -911,6 +911,11 @@ int mdss_dsi_cmds_rx(struct mdss_dsi_ctrl_pdata *ctrl,
	struct mdss_dsi_ctrl_pdata *mctrl = NULL;


	if (ctrl->panel_data.panel_info.panel_ack_disabled) {
		pr_err("%s: ACK from Client not supported\n", __func__);
		return rlen;
	}

	/*
	 * Turn on cmd mode in order to transmit the commands.
	 * For video mode, do not send cmds more than one pixel line,
+7 −0
Original line number Diff line number Diff line
@@ -1024,6 +1024,13 @@ static int mdss_dsi_parse_panel_features(struct device_node *np,

	pr_info("%s: dynamic switch feature enabled: %d\n", __func__,
		pinfo->mipi.dynamic_switch_enabled);
	pinfo->panel_ack_disabled = of_property_read_bool(np,
				"qcom,panel-ack-disabled");

	if (pinfo->panel_ack_disabled && pinfo->esd_check_enabled) {
		pr_warn("ESD should not be enabled if panel ACK is disabled\n");
		pinfo->esd_check_enabled = false;
	}

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -348,6 +348,7 @@ struct mdss_panel_info {
	int pwm_period;
	bool dynamic_fps;
	bool ulps_feature_enabled;
	bool panel_ack_disabled;
	bool esd_check_enabled;
	char dfps_update;
	int new_fps;