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

Commit 992cbaf9 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: clock-mdss-8974: Proper hdmi set rate



Do not call set rate if the rate is zero. Reset the flag which sets
the rate on cable disconnect so that next cable connect can set the
rate again.

Change-Id: Ieb8eed3760c4b285182ae47d732352771d13b020
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 001053d2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2428,11 +2428,9 @@ static int hdmi_vco_prepare(struct clk *c)

	pr_debug("%s: rate=%ld\n", __func__, vco->rate);

	if (!vco->rate_set)
	if (!vco->rate_set && vco->rate)
		ret = hdmi_vco_set_rate(c, vco->rate);

	vco->rate_set = false;

	if (!ret)
		ret = clk_prepare(mdss_ahb_clk);

@@ -2441,6 +2439,10 @@ static int hdmi_vco_prepare(struct clk *c)

static void hdmi_vco_unprepare(struct clk *c)
{
	struct hdmi_pll_vco_clk *vco = to_hdmi_vco_clk(c);

	vco->rate_set = false;

	clk_unprepare(mdss_ahb_clk);
}