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

Commit 1f90bf11 authored by Govinda Rajulu Chenna's avatar Govinda Rajulu Chenna
Browse files

drm/msm/dp: config aux switch only on configure/disconnect



Avoid aux switch config during stream on/off as it moves mst
branch device into wrong state. Perform the aux switch config
only on receiving real configure/disconnect events.

CRs-Fixed: 2327801
Change-Id: I2a22a830387f5da71f9a2341274de7b1b0e1e99a
Signed-off-by: default avatarGovinda Rajulu Chenna <gchenna@codeaurora.org>
parent 47426df5
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -598,9 +598,6 @@ static void dp_display_host_init(struct dp_display_private *dp)
	if (dp->core_initialized)
		return;

	if (!dp->debug->sim_mode && !dp->parser->no_aux_switch)
		dp->aux->aux_switch(dp->aux, true, dp->hpd->orientation);

	if (dp->hpd->orientation == ORIENTATION_CC2)
		flip = true;

@@ -626,9 +623,6 @@ static void dp_display_host_deinit(struct dp_display_private *dp)
		return;
	}

	if (!dp->debug->sim_mode && !dp->parser->no_aux_switch)
		dp->aux->aux_switch(dp->aux, false, ORIENTATION_NONE);

	dp->aux->deinit(dp->aux);
	dp->ctrl->deinit(dp->ctrl);
	dp->power->deinit(dp->power);
@@ -759,6 +753,12 @@ static int dp_display_usbpd_configure_cb(struct device *dev)
		goto end;
	}

	if (!dp->debug->sim_mode && !dp->parser->no_aux_switch) {
		rc = dp->aux->aux_switch(dp->aux, true, dp->hpd->orientation);
		if (rc)
			goto end;
	}

	dp_display_host_init(dp);

	/* check for hpd high and framework ready */
@@ -860,6 +860,9 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)
	atomic_set(&dp->aborted, 0);

	dp->dp_display.post_open = NULL;

	if (!dp->debug->sim_mode && !dp->parser->no_aux_switch)
		dp->aux->aux_switch(dp->aux, false, ORIENTATION_NONE);
end:
	return rc;
}