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

Commit 919ff0b3 authored by Rajat Gupta's avatar Rajat Gupta
Browse files

disp: msm: dp: check for pixel1 rcg only for mst supported platforms



Check for pixel1 rcg only for mst supported platforms. On sst only
devices bind gets failed.

Change-Id: I73cc4a572d4d0791205c342f57618b226eb91fef
Signed-off-by: default avatarRajat Gupta <rajatgu@codeaurora.org>
parent 277dae94
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/clk.h>
@@ -212,21 +212,23 @@ static int dp_power_clk_init(struct dp_power_private *power, bool enable)

		power->pixel_parent = clk_get(dev, "pixel_parent");
		if (IS_ERR(power->pixel_parent)) {
			DP_DEBUG("Unable to get DP pixel RCG parent: %d\n",
			DP_ERR("Unable to get DP pixel RCG parent: %d\n",
					PTR_ERR(power->pixel_parent));
			rc = PTR_ERR(power->pixel_parent);
			power->pixel_parent = NULL;
			goto err_pixel_parent;
		}

		if (power->parser->has_mst) {
			power->pixel1_clk_rcg = clk_get(dev, "pixel1_clk_rcg");
			if (IS_ERR(power->pixel1_clk_rcg)) {
			DP_DEBUG("Unable to get DP pixel1 clk RCG: %d\n",
				DP_ERR("Unable to get DP pixel1 clk RCG: %d\n",
						PTR_ERR(power->pixel1_clk_rcg));
				rc = PTR_ERR(power->pixel1_clk_rcg);
				power->pixel1_clk_rcg = NULL;
				goto err_pixel1_clk_rcg;
			}
		}
	} else {
		if (power->pixel1_clk_rcg)
			clk_put(power->pixel1_clk_rcg);