summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-01-09 12:42:34 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-09 12:42:34 -0800
commita999a488bfb19ec3754a3a20204d5a029336e950 (patch)
tree28d8efe184ab33d7b618db4f3dd74ff78573a843 /drivers
parent443502cc09e9d4f8fae3f1d767bb6c736f2453d1 (diff)
parent8b20da6ffc46158f941729b5b0d2afc039f05405 (diff)
Merge "msm: kgsl: Remove BUG_ON from the map global"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/msm/kgsl_iommu.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index bc681057250d..d997cdd2cc7e 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -134,7 +134,7 @@ static void kgsl_iommu_unmap_globals(struct kgsl_pagetable *pagetable)
}
}
-static void kgsl_iommu_map_globals(struct kgsl_pagetable *pagetable)
+static int kgsl_iommu_map_globals(struct kgsl_pagetable *pagetable)
{
unsigned int i;
@@ -143,9 +143,11 @@ static void kgsl_iommu_map_globals(struct kgsl_pagetable *pagetable)
int ret = kgsl_mmu_map(pagetable,
global_pt_entries[i].memdesc);
- BUG_ON(ret);
+ if (ret)
+ return ret;
}
}
+ return 0;
}
static void kgsl_iommu_unmap_global_secure_pt_entry(struct kgsl_pagetable
@@ -158,16 +160,16 @@ static void kgsl_iommu_unmap_global_secure_pt_entry(struct kgsl_pagetable
}
-static void kgsl_map_global_secure_pt_entry(struct kgsl_pagetable *pagetable)
+static int kgsl_map_global_secure_pt_entry(struct kgsl_pagetable *pagetable)
{
- int ret;
+ int ret = 0;
struct kgsl_memdesc *entry = kgsl_global_secure_pt_entry;
if (entry != NULL) {
entry->pagetable = pagetable;
ret = kgsl_mmu_map(pagetable, entry);
- BUG_ON(ret);
}
+ return ret;
}
static void kgsl_iommu_remove_global(struct kgsl_mmu *mmu,
@@ -1171,7 +1173,7 @@ static int _init_global_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
goto done;
}
- kgsl_iommu_map_globals(pt);
+ ret = kgsl_iommu_map_globals(pt);
done:
if (ret)
@@ -1227,7 +1229,7 @@ static int _init_secure_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
ctx->regbase = iommu->regbase + KGSL_IOMMU_CB0_OFFSET
+ (cb_num << KGSL_IOMMU_CB_SHIFT);
- kgsl_map_global_secure_pt_entry(pt);
+ ret = kgsl_map_global_secure_pt_entry(pt);
done:
if (ret)
@@ -1288,7 +1290,7 @@ static int _init_per_process_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
goto done;
}
- kgsl_iommu_map_globals(pt);
+ ret = kgsl_iommu_map_globals(pt);
done:
if (ret)