From 9059e81dbbb71540cee63590ecbf34e6f537fb70 Mon Sep 17 00:00:00 2001 From: Thomas McKahan Date: Mon, 2 Jul 2018 22:20:30 -0400 Subject: [PATCH] Rockchip Fix Mali on newer kernels --- ...rd-Adapt-to-the-new-mmap-call-checks.patch | 34 +++++++++++++++++++ ...rd-Adapt-to-the-new-mmap-call-checks.patch | 34 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 patch/kernel/rockchip-dev/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch create mode 100644 patch/kernel/rockchip-next/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch diff --git a/patch/kernel/rockchip-dev/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch b/patch/kernel/rockchip-dev/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch new file mode 100644 index 0000000000..f5236bc16f --- /dev/null +++ b/patch/kernel/rockchip-dev/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch @@ -0,0 +1,34 @@ +From 9812105eb6220863af05fc72591118f0a48e1c4e Mon Sep 17 00:00:00 2001 +From: Myy Miouyouyou +Date: Mon, 21 May 2018 22:32:59 +0200 +Subject: [PATCH] GPU: ARM: Midgard: Adapt to the new mmap call checks. + +Now, I don't know if this driver is just one of these "buggy" drivers +Linus is talking about, or if this is just standard GPU procedure. + +Anyway, this patch is due to this change by Linus Torvalds : +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be83bbf806822b1b89e0a0f23cd87cddc409e429 + +And the fix is inspired by : +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76ef6b28ea4f81c3d511866a9b31392caa833126 + +Signed-off-by: Myy Miouyouyou +--- + drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +index cc4932a4ead7..89b4cca27cf1 100644 +--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c ++++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +@@ -1087,6 +1087,7 @@ static int kbase_open(struct inode *inode, struct file *filp) + + init_waitqueue_head(&kctx->event_queue); + filp->private_data = kctx; ++ filp->f_mode |= FMODE_UNSIGNED_OFFSET; + kctx->filp = filp; + + if (kbdev->infinite_cache_active_default) +-- +2.17.0 + diff --git a/patch/kernel/rockchip-next/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch b/patch/kernel/rockchip-next/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch new file mode 100644 index 0000000000..f5236bc16f --- /dev/null +++ b/patch/kernel/rockchip-next/0009-GPU-ARM-Midgard-Adapt-to-the-new-mmap-call-checks.patch @@ -0,0 +1,34 @@ +From 9812105eb6220863af05fc72591118f0a48e1c4e Mon Sep 17 00:00:00 2001 +From: Myy Miouyouyou +Date: Mon, 21 May 2018 22:32:59 +0200 +Subject: [PATCH] GPU: ARM: Midgard: Adapt to the new mmap call checks. + +Now, I don't know if this driver is just one of these "buggy" drivers +Linus is talking about, or if this is just standard GPU procedure. + +Anyway, this patch is due to this change by Linus Torvalds : +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be83bbf806822b1b89e0a0f23cd87cddc409e429 + +And the fix is inspired by : +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76ef6b28ea4f81c3d511866a9b31392caa833126 + +Signed-off-by: Myy Miouyouyou +--- + drivers/gpu/arm/midgard/mali_kbase_core_linux.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +index cc4932a4ead7..89b4cca27cf1 100644 +--- a/drivers/gpu/arm/midgard/mali_kbase_core_linux.c ++++ b/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +@@ -1087,6 +1087,7 @@ static int kbase_open(struct inode *inode, struct file *filp) + + init_waitqueue_head(&kctx->event_queue); + filp->private_data = kctx; ++ filp->f_mode |= FMODE_UNSIGNED_OFFSET; + kctx->filp = filp; + + if (kbdev->infinite_cache_active_default) +-- +2.17.0 +