diff options
author | Sidath Senanayake <sidaths@google.com> | 2017-09-19 18:23:58 +0200 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2017-09-19 18:23:58 +0200 |
commit | c19c62718d90e8efa4675528aae6ab6fde13a12f (patch) | |
tree | 4601ada4314a2641b2ebdb7073198a5a406085f8 /mali_kbase/mali_kbase_mem.c | |
parent | ea23e535ae857c92d45cb11bdd5dba7c27579726 (diff) | |
download | gpu-c19c62718d90e8efa4675528aae6ab6fde13a12f.tar.gz |
Mali Bifrost DDK r8p0 KMD
Provenance:
a0013c522 (collaborate/EAC/b_r8p0)
BX304L01B-BU-00000-r8p0-01rel0
BX304L06A-BU-00000-r8p0-01rel0
BX304X07X-BU-00000-r8p0-01rel0
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: Iab1f0fc8f3602409180629b210c624791be774c5
Diffstat (limited to 'mali_kbase/mali_kbase_mem.c')
-rw-r--r-- | mali_kbase/mali_kbase_mem.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mali_kbase/mali_kbase_mem.c b/mali_kbase/mali_kbase_mem.c index 6fefffe..34222cb 100644 --- a/mali_kbase/mali_kbase_mem.c +++ b/mali_kbase/mali_kbase_mem.c @@ -1510,12 +1510,15 @@ int kbase_alloc_phy_pages_helper( struct page *np = NULL; do { - int err = kbase_mem_pool_grow(&kctx->lp_mem_pool, 1); + int err; + np = kbase_mem_pool_alloc(&kctx->lp_mem_pool); + if (np) + break; + err = kbase_mem_pool_grow(&kctx->lp_mem_pool, 1); if (err) break; - np = kbase_mem_pool_alloc(&kctx->lp_mem_pool); - } while (!np); + } while (1); if (np) { int i; @@ -1571,7 +1574,7 @@ no_new_partial: kbase_zone_cache_clear(alloc); KBASE_TLSTREAM_AUX_PAGESALLOC( - (u32)kctx->id, + kctx->id, (u64)new_page_count); alloc->nents += nr_pages_requested; @@ -1708,7 +1711,7 @@ int kbase_free_phy_pages_helper( &kctx->kbdev->memdev.used_pages); KBASE_TLSTREAM_AUX_PAGESALLOC( - (u32)kctx->id, + kctx->id, (u64)new_page_count); } @@ -2517,8 +2520,7 @@ static int kbase_jd_umm_map(struct kbase_context *kctx, KBASE_DEBUG_ASSERT(pa); for_each_sg(sgt->sgl, s, sgt->nents, i) { - int j; - size_t pages = PFN_UP(sg_dma_len(s)); + size_t j, pages = PFN_UP(sg_dma_len(s)); WARN_ONCE(sg_dma_len(s) & (PAGE_SIZE-1), "sg_dma_len(s)=%u is not a multiple of PAGE_SIZE\n", |