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

Commit 2460bec9 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Make sure that IB addresses are dword aligned



All IB GPU addresses should be dword aligned. Enforce that in software
to keep invalid addresses from bothering the CP.

Change-Id: Ic0dedbad2298ebbd20ca1b575b8e36dcbf5a1fbe
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 7b96268e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1134,8 +1134,9 @@ static inline bool _verify_ib(struct kgsl_device_private *dev_priv,
		return false;
	}

	/* Make sure that the address is mapped */
	if (!kgsl_mmu_gpuaddr_in_range(private->pagetable, ib->gpuaddr)) {
	/* Make sure that the address is in range and dword aligned */
	if (!kgsl_mmu_gpuaddr_in_range(private->pagetable, ib->gpuaddr) ||
	    !IS_ALIGNED(ib->gpuaddr, 4)) {
		pr_context(device, context, "ctxt %d invalid ib gpuaddr %llX\n",
			context->id, ib->gpuaddr);
		return false;