summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mali_kbase/mali_kbase_mem.c11
-rw-r--r--mali_kbase/mali_kbase_mem.h5
2 files changed, 3 insertions, 13 deletions
diff --git a/mali_kbase/mali_kbase_mem.c b/mali_kbase/mali_kbase_mem.c
index c3eb2cc..afc5a30 100644
--- a/mali_kbase/mali_kbase_mem.c
+++ b/mali_kbase/mali_kbase_mem.c
@@ -526,20 +526,15 @@ int kbase_gpu_munmap(struct kbase_context *kctx, struct kbase_va_region *reg)
switch (alloc->imported.user_buf.state) {
case KBASE_USER_BUF_STATE_GPU_MAPPED: {
alloc->imported.user_buf.current_mapping_usage_count = 0;
- kbase_mem_phy_alloc_ref_read(alloc) ?
- kbase_user_buf_from_gpu_mapped_to_pinned(kctx, reg) :
- kbase_user_buf_from_gpu_mapped_to_empty(kctx, reg);
+ kbase_user_buf_from_gpu_mapped_to_empty(kctx, reg);
break;
}
case KBASE_USER_BUF_STATE_DMA_MAPPED: {
- kbase_mem_phy_alloc_ref_read(alloc) ?
- kbase_user_buf_from_dma_mapped_to_pinned(kctx, reg) :
- kbase_user_buf_from_dma_mapped_to_empty(kctx, reg);
+ kbase_user_buf_from_dma_mapped_to_empty(kctx, reg);
break;
}
case KBASE_USER_BUF_STATE_PINNED: {
- if (!kbase_mem_phy_alloc_ref_read(alloc))
- kbase_user_buf_from_pinned_to_empty(kctx, reg);
+ kbase_user_buf_from_pinned_to_empty(kctx, reg);
break;
}
case KBASE_USER_BUF_STATE_EMPTY: {
diff --git a/mali_kbase/mali_kbase_mem.h b/mali_kbase/mali_kbase_mem.h
index 371d788..739c7dc 100644
--- a/mali_kbase/mali_kbase_mem.h
+++ b/mali_kbase/mali_kbase_mem.h
@@ -589,11 +589,6 @@ int kbase_mem_init(struct kbase_device *kbdev);
void kbase_mem_halt(struct kbase_device *kbdev);
void kbase_mem_term(struct kbase_device *kbdev);
-static inline unsigned int kbase_mem_phy_alloc_ref_read(struct kbase_mem_phy_alloc *alloc)
-{
- return kref_read(&alloc->kref);
-}
-
static inline struct kbase_mem_phy_alloc *kbase_mem_phy_alloc_get(struct kbase_mem_phy_alloc *alloc)
{
kref_get(&alloc->kref);