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

Commit 4509fbe2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: rcg2: Force enable the RCG before update for GFX"

parents f8963e38 71ede576
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2013, 2018-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013, 2018-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/kernel.h>
@@ -1395,7 +1395,19 @@ static int clk_gfx3d_src_set_rate_and_parent(struct clk_hw *hw,
	if (ret)
		return ret;

	return update_config(rcg, old_cfg);
	if ((!clk_rcg2_is_force_enabled(hw) && (!clk_hw_is_prepared(hw)
		|| !clk_hw_is_enabled(hw))))
		clk_rcg2_set_force_enable(hw);

	ret = update_config(rcg, old_cfg);
	if (ret)
		return ret;

	if ((clk_rcg2_is_force_enabled(hw) && (!clk_hw_is_prepared(hw)
		|| !clk_hw_is_enabled(hw))))
		clk_rcg2_clear_force_enable(hw);

	return ret;
}

static int clk_gfx3d_src_determine_rate(struct clk_hw *hw,