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

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

Merge "msm: kgsl: Set correct values for SMMU protect register for A5xx"

parents 15140700 acae7069
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -353,12 +353,15 @@ static void a5xx_protect_init(struct adreno_device *adreno_dev)
	/*
	 * For a530 and a540 the SMMU region is 0x20000 bytes long and 0x10000
	 * bytes on all other targets. The base offset for both is 0x40000.
	 * Write it to the next available slot
	 * Write it to the next available slot. The base offset and length of a
	 * block must be specified as power of 2 values.
	 */
	if (adreno_is_a530(adreno_dev) || adreno_is_a540(adreno_dev))
		_setprotectreg(device, reg + 1, 0x40000, ilog2(0x20000));
		_setprotectreg(device, reg + 1, (0x40000 >> 2),
			ilog2(0x20000 >> 2));
	else
		_setprotectreg(device, reg + 1, 0x40000, ilog2(0x10000));
		_setprotectreg(device, reg + 1, (0x40000 >> 2),
			ilog2(0x10000 >> 2));
}

/*