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

Commit 649d3b58 authored by Jordan Crouse's avatar Jordan Crouse Committed by Tarun Karra
Browse files

msm: kgsl: A430 has more protected mode registers available



A430 extends the number of protected mode registers from 16 to 24.
Update the BUG_ON() restriction to give developers more freedom
to save ourselves from badly behaving user mode drivers.

Change-Id: Ic0dedbad9bcb42e80d0380547260917f58514699
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 3d2eb06b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1137,7 +1137,11 @@ static inline void adreno_set_protected_registers(struct kgsl_device *device,
	unsigned int val;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	/* There are only 16 registers available */
	/* A430 has 24 registers (yay!).  Everything else has 16 (boo!) */

	if (adreno_is_a430(adreno_dev))
		BUG_ON(*index >= 24);
	else
		BUG_ON(*index >= 16);

	val = 0x60000000 | ((mask_len & 0x1F) << 24) | ((reg << 2) & 0xFFFFF);