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

Commit 7b4f57e9 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Add a barrier between a write/read



Add a wmb() barrier between a write and read of the same register to be
sure that the hardware has seen the write before continuing.

Change-Id: Ic0dedbadc5c536a9c973794b1879b994cf5ad50d
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 8e583ed3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1612,6 +1612,8 @@ static void a6xx_gmu_snapshot(struct kgsl_device *device,
	if (a6xx_gmu_gx_is_on(device)) {
		/* Set fence to ALLOW mode so registers can be read */
		kgsl_regwrite(device, A6XX_GMU_AO_AHB_FENCE_CTRL, 0);
		/* Make sure the previous write posted before reading */
		wmb();
		kgsl_regread(device, A6XX_GMU_AO_AHB_FENCE_CTRL, &val);

		dev_err(device->dev, "set FENCE to ALLOW mode:%x\n", val);