summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2020-08-14 00:21:17 +0800
committerJohn Stultz <john.stultz@linaro.org>2021-01-07 00:05:39 +0000
commit29186c26014764e1ed94548b285b3f020beed758 (patch)
treef1a0dff26ca98dac35a073c571257dbca421f73f
parent06614de6799ac506aea9bc3b51e6533bb8ccfb5e (diff)
downloadhikey-modules-29186c26014764e1ed94548b285b3f020beed758.tar.gz
MALI: mali_kbase_mem.c: update for 5.9-rc on the change of get_user_pages_remote
which is introduced by change here: https://android.googlesource.com/kernel/common/+/64019a2e467a288a16b65ab55ddcbf58c1b00187 but as the kernel version is still 5.8.0, so the condition check uses 5.8.0 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I00c6aad8736abc7e8b4f73da92ec94e8059115ba
-rw-r--r--midgard/mali_kbase_mem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/midgard/mali_kbase_mem.c b/midgard/mali_kbase_mem.c
index b39d8db..27d2bf4 100644
--- a/midgard/mali_kbase_mem.c
+++ b/midgard/mali_kbase_mem.c
@@ -2565,12 +2565,18 @@ static int kbase_jd_user_buf_map(struct kbase_context *kctx,
alloc->imported.user_buf.nr_pages,
reg->flags & KBASE_REG_GPU_WR ? FOLL_WRITE : 0,
pages, NULL);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
pinned_pages = get_user_pages_remote(NULL, mm,
address,
alloc->imported.user_buf.nr_pages,
reg->flags & KBASE_REG_GPU_WR ? FOLL_WRITE : 0,
pages, NULL, NULL);
+#else
+ pinned_pages = get_user_pages_remote(mm,
+ address,
+ alloc->imported.user_buf.nr_pages,
+ reg->flags & KBASE_REG_GPU_WR ? FOLL_WRITE : 0,
+ pages, NULL, NULL);
#endif
if (pinned_pages <= 0)