msm: kgsl: Only return tlb flush flag if bit is set for given device
We should only return the tlb flush flag if the bit corresponding
to the given device is set in the tlb flags. Earlier we were returning
the flush flag always if the tlb flags had the flush bit set for any
device.
Change-Id: Iedae82a5f54a17396bd12b3dd704ade0eb4a07f0
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_mmu.c b/drivers/gpu/msm/kgsl_mmu.c
index 9092b96..07ce90c 100644
--- a/drivers/gpu/msm/kgsl_mmu.c
+++ b/drivers/gpu/msm/kgsl_mmu.c
@@ -760,7 +760,7 @@
return 0;
spin_lock(&pt->lock);
- if (pt->tlb_flags && (1<<id)) {
+ if (pt->tlb_flags & (1<<id)) {
result = KGSL_MMUFLAGS_TLBFLUSH;
pt->tlb_flags &= ~(1<<id);
}