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

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

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

parents 196c2bae 1f90bf11
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -616,9 +616,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;

@@ -644,9 +641,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);
@@ -777,6 +771,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 */
@@ -912,6 +912,9 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)

	dp_display_disconnect_sync(dp);
	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;
}