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: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
parent
7b96268e45
commit
2460bec971
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user