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

Commit 4af597e1 authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru Committed by Ajay Singh Parmar
Browse files

drm/msm/dp: perform USB3_DP_COM_PHY reset only when needed



The USB3_DP_COM_PHY reset needs to be performed in Display
Port driver when all 4 lanes are needed for Display Port. Avoid
this when the DP adapter supports USB3/DP concurrency.

Change-Id: Id16731fc8278fda532883b01b76046bd61df8cf7
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent db14789c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1072,7 +1072,8 @@ static int dp_ctrl_disable_mainlink_clocks(struct dp_ctrl_private *ctrl)
	return ctrl->power->clk_enable(ctrl->power, DP_CTRL_PM, false);
}

static int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl, bool flip)
static int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl,
	bool flip, bool multi_func)
{
	struct dp_ctrl_private *ctrl;
	struct dp_catalog_ctrl *catalog;
@@ -1087,8 +1088,10 @@ static int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl, bool flip)
	ctrl->orientation = flip;
	catalog = ctrl->catalog;

	if (!multi_func) {
		catalog->usb_reset(ctrl->catalog, flip);
		catalog->phy_reset(ctrl->catalog);
	}
	catalog->enable_irq(ctrl->catalog, true);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include "dp_catalog.h"

struct dp_ctrl {
	int (*init)(struct dp_ctrl *dp_ctrl, bool flip);
	int (*init)(struct dp_ctrl *dp_ctrl, bool flip, bool multi_func);
	void (*deinit)(struct dp_ctrl *dp_ctrl);
	int (*on)(struct dp_ctrl *dp_ctrl);
	void (*off)(struct dp_ctrl *dp_ctrl);
+1 −1
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ static void dp_display_host_init(struct dp_display_private *dp)
		flip = true;

	dp->power->init(dp->power, flip);
	dp->ctrl->init(dp->ctrl, flip);
	dp->ctrl->init(dp->ctrl, flip, dp->usbpd->multi_func);
	enable_irq(dp->irq);
	dp->core_initialized = true;
}