mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 22:01:35 +00:00
Fix mali patch for rk3399
No need to check linux version anymore, function call is the same. Try to see if it builds
This commit is contained in:
parent
5b9597c705
commit
21125280db
1 changed files with 12 additions and 8 deletions
|
@ -22,19 +22,23 @@ index 4824b316..53b262b5 100644
|
||||||
|
|
||||||
if (pinned_pages <= 0)
|
if (pinned_pages <= 0)
|
||||||
diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||||
index b6dac558..631fb4be 100644
|
index b6dac558..8362e256 100644
|
||||||
--- a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
--- a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||||
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
|
||||||
@@ -1191,10 +1191,10 @@ static struct kbase_va_region *kbase_mem_from_user_buffer(
|
@@ -1189,13 +1189,10 @@ static struct kbase_va_region *kbase_mem_from_user_buffer(
|
||||||
|
/* We can't really store the page list because that would involve */
|
||||||
|
/* keeping the pages pinned - instead we pin/unpin around the job */
|
||||||
/* (as part of the external resources handling code) */
|
/* (as part of the external resources handling code) */
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
|
||||||
|
+
|
||||||
faulted_pages = get_user_pages(current, current->mm, address, *va_pages,
|
faulted_pages = get_user_pages(current, current->mm, address, *va_pages,
|
||||||
- reg->flags & KBASE_REG_GPU_WR, 0, NULL, NULL);
|
- reg->flags & KBASE_REG_GPU_WR, 0, NULL, NULL);
|
||||||
+ reg->flags & KBASE_REG_GPU_WR, NULL, NULL);
|
-#else
|
||||||
#else
|
- faulted_pages = get_user_pages(address, *va_pages,
|
||||||
faulted_pages = get_user_pages(address, *va_pages,
|
|
||||||
- reg->flags & KBASE_REG_GPU_WR, 0, NULL, NULL);
|
- reg->flags & KBASE_REG_GPU_WR, 0, NULL, NULL);
|
||||||
+ reg->flags & KBASE_REG_GPU_WR, NULL, NULL);
|
-#endif
|
||||||
#endif
|
+ reg->flags & KBASE_REG_GPU_WR ? FOLL_WRITE : 0, NULL, NULL);
|
||||||
|
+
|
||||||
up_read(¤t->mm->mmap_sem);
|
up_read(¤t->mm->mmap_sem);
|
||||||
|
|
||||||
|
if (faulted_pages != *va_pages)
|
||||||
|
|
Loading…
Add table
Reference in a new issue