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

Commit 52f1d807 authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dp: disable mainlink clocks when controller is turned off



Disable the mainlink clocks when the controller is turned off
via the HPD-off path. This will ensure that the mainlink clocks
are disabled only if the HPD-on path has been successfully
triggered. Attempting to disable the mainlink clocks otherwise
will result in a failure since the clock unprepare will be
called without corresponding clock prepare.

CRs-Fixed: 2101790
Change-Id: Iedb12f9ca3f2842ecf1992ad1c1076b839fd4eda
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 138d7bb7
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -1086,7 +1086,6 @@ static int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl, bool flip)
	catalog = ctrl->catalog;

	catalog->usb_reset(ctrl->catalog, flip);
	catalog->reset(ctrl->catalog);
	catalog->phy_reset(ctrl->catalog);
	catalog->enable_irq(ctrl->catalog, true);

@@ -1112,12 +1111,6 @@ static void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
	ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);

	ctrl->catalog->enable_irq(ctrl->catalog, false);
	ctrl->catalog->reset(ctrl->catalog);

	/* Make sure DP is disabled before clk disable */
	wmb();

	dp_ctrl_disable_mainlink_clocks(ctrl);

	pr_debug("Host deinitialized successfully\n");
}
@@ -1390,8 +1383,14 @@ static void dp_ctrl_off(struct dp_ctrl *dp_ctrl)
	ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);

	ctrl->catalog->mainlink_ctrl(ctrl->catalog, false);
	pr_debug("DP off done\n");
	ctrl->catalog->reset(ctrl->catalog);

	/* Make sure DP is disabled before clk disable */
	wmb();

	dp_ctrl_disable_mainlink_clocks(ctrl);

	pr_debug("DP off done\n");
}

static void dp_ctrl_isr(struct dp_ctrl *dp_ctrl)