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

Commit 293a2b36 authored by Deepak Katragadda's avatar Deepak Katragadda Committed by Kyle Yan
Browse files

clk: msm: Set the GMEM GX clamp before disabling the GPU_GX GDSC



The GMEM GX clamp should be set to the active state before
turning off the gdsc_gpu_gx.

CRs-Fixed: 1027772
Change-Id: I5bb97734a2402e763836250c3ce6f7fc308c20a6
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent 51b1e61b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -519,6 +519,13 @@ static void enable_gfx_crc(void)
	regval = readl_relaxed(virt_base_gfx + GPU_GX_GDSCR_OFFSET);
	regval |= SW_COLLAPSE_MASK;
	writel_relaxed(regval, virt_base_gfx + GPU_GX_GDSCR_OFFSET);
	/* Write to disable GX GDSC should go through before continuing */
	wmb();
	regval = readl_relaxed(virt_base_gfx + GPUCC_GX_DOMAIN_MISC);
	regval |= BIT(0);
	writel_relaxed(regval, virt_base_gfx + GPUCC_GX_DOMAIN_MISC);
	/* Make sure GMEM_CLAMP_IO is asserted before continuing. */
	wmb();
	regulator_disable(vdd_gpucc.regulator[0]);
	regval = readl_relaxed(virt_base_gfx + GPU_CX_GDSCR_OFFSET);
	regval |= SW_COLLAPSE_MASK;
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -338,6 +338,8 @@ static int gdsc_disable(struct regulator_dev *rdev)
			regval = readl_relaxed(sc->domain_addr);
			regval |= GMEM_CLAMP_IO_MASK;
			writel_relaxed(regval, sc->domain_addr);
			/* Make sure CLAMP_IO is asserted before continuing. */
			wmb();
		}
	} else {
		for (i = sc->clock_count-1; i >= 0; i--)