diff options
author | Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | 2017-12-13 17:33:50 -0800 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2018-05-25 11:24:23 -0700 |
commit | 1fd09deddea38d46d8b36f601fa7229fa0ad236b (patch) | |
tree | cf16d1caf0800bc95556a51e2fd5da12f6a15a72 | |
parent | f74dc3f37142c1efca6aabac243dfe6caafefccc (diff) | |
download | meta-xilinx-1fd09deddea38d46d8b36f601fa7229fa0ad236b.tar.gz |
kernel-module-mali: Update Mali driver to r8p0-01rel0
This patch will update Mali kernel driver to r8p0-01rel0.
Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
Tested-by: Jaewon Lee <jaewon.lee@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
15 files changed, 418 insertions, 204 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb index edd8cbe9..3d7c6a9c 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb | |||
@@ -3,26 +3,27 @@ SECTION = "kernel/modules" | |||
3 | 3 | ||
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | LIC_FILES_CHKSUM = " \ | 5 | LIC_FILES_CHKSUM = " \ |
6 | file://linux/license/gpl/mali_kernel_license.h;md5=1436c0d104589824163a3eb50fbb5050 \ | 6 | file://linux/license/gpl/mali_kernel_license.h;md5=436192a2c5cfd47df0ad1987dffc4ae6 \ |
7 | " | 7 | " |
8 | 8 | ||
9 | PV = "r7p0-00rel0" | 9 | PV = "r8p0-01rel0" |
10 | 10 | ||
11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
12 | https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-utgard-gpu/DX910-SW-99002-${PV}.tgz \ | 12 | https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-utgard-gpu/DX910-SW-99002-${PV}.tgz \ |
13 | file://0001-Change-Makefile-to-be-compatible-with-Yocto.patch \ | 13 | file://0001-Change-Makefile-to-be-compatible-with-Yocto.patch \ |
14 | file://0002-staging-mali-r7p0-00rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch \ | 14 | file://0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch \ |
15 | file://0003-staging-mali-r7p0-00rel0-Remove-unused-trace-macros.patch \ | 15 | file://0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch \ |
16 | file://0004-staging-mali-r7p0-00rel0-Don-t-include-mali_read_phy.patch \ | 16 | file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \ |
17 | file://0005-mali-r7p0-PAGE_CACHE_SHIFT-to-PAGE_CACHE.patch \ | 17 | file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ |
18 | file://0006-staging-mali-r7p0-page_cache_release-to-put_page.patch \ | 18 | file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch \ |
19 | file://0007-mali_memory_os_alloc.c-Align-with-dma_attrs-changes-.patch \ | 19 | file://0007-Replace-__GFP_REPEAT-by-__GFP_RETRY_MAYFAIL.patch \ |
20 | file://0008-arm.c-dma_ops-will-be-modified-by-the-driver-only-ti.patch \ | 20 | file://0008-mali_internal_sync-Rename-wait_queue_t-with-wait_que.patch \ |
21 | file://0009-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ | 21 | file://0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch \ |
22 | file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ | 22 | file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ |
23 | file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ | ||
23 | " | 24 | " |
24 | SRC_URI[md5sum] = "db3ef3258eb55700484ecadfdce1fee1" | 25 | SRC_URI[md5sum] = "8f04ae86957fd56197ad5a9d017b84ff" |
25 | SRC_URI[sha256sum] = "496ba80684aa4236806891a8445978849f7dd07299f5e58b14d52cd5e7ba0536" | 26 | SRC_URI[sha256sum] = "bfd14fa3f75a71d4ba313534e651ca1c58dc354e882c0b39867e335882a06350" |
26 | 27 | ||
27 | inherit module | 28 | inherit module |
28 | 29 | ||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch index 0314734e..e5eeb19f 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch | |||
@@ -1,20 +1,21 @@ | |||
1 | From d9a4441c31faef60b7f39692df6913d58ec69d1b Mon Sep 17 00:00:00 2001 | 1 | From 6d283b9aa3f7fb761da4cb076b47a62275fc4caa Mon Sep 17 00:00:00 2001 |
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
3 | Date: Thu, 8 Sep 2016 09:56:40 -0700 | 3 | Date: Tue, 21 Nov 2017 03:57:25 -0800 |
4 | Subject: [PATCH 1/6] Change Makefile to be compatible with Yocto | 4 | Subject: [PATCH 1/9] Change Makefile to be compatible with Yocto |
5 | 5 | ||
6 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 6 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> |
7 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | 7 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> |
8 | Upstream Status: Pending | 8 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
9 | Upstream Status: Inappropriate [Xilinx specific] | ||
9 | --- | 10 | --- |
10 | driver/src/devicedrv/mali/Makefile | 13 +++++++++++-- | 11 | driver/src/devicedrv/mali/Makefile | 11 +++++++++-- |
11 | 1 file changed, 11 insertions(+), 2 deletions(-) | 12 | 1 file changed, 9 insertions(+), 2 deletions(-) |
12 | 13 | ||
13 | diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile | 14 | diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile |
14 | index f39ae4d..9ef9713 100755 | 15 | index 5a259fe..a6dd94c 100644 |
15 | --- Makefile | 16 | --- Makefile |
16 | +++ b/Makefile | 17 | +++ b/Makefile |
17 | @@ -88,7 +88,11 @@ endif | 18 | @@ -89,7 +89,11 @@ endif |
18 | # Define host system directory | 19 | # Define host system directory |
19 | KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build | 20 | KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build |
20 | 21 | ||
@@ -27,12 +28,9 @@ index f39ae4d..9ef9713 100755 | |||
27 | 28 | ||
28 | ifeq ($(ARCH), arm) | 29 | ifeq ($(ARCH), arm) |
29 | # when compiling for ARM we're cross compiling | 30 | # when compiling for ARM we're cross compiling |
30 | @@ -193,10 +197,15 @@ ifeq ($(MALI_MEM_SWAP_TRACKING),1) | 31 | @@ -204,9 +208,12 @@ EXTRA_DEFINES += -DMALI_MEM_SWAP_TRACKING=1 |
31 | EXTRA_DEFINES += -DMALI_MEM_SWAP_TRACKING=1 | ||
32 | endif | 32 | endif |
33 | 33 | ||
34 | +EXTRA_DEFINES += -Wno-error=date-time | ||
35 | + | ||
36 | all: $(UMP_SYMVERS_FILE) | 34 | all: $(UMP_SYMVERS_FILE) |
37 | - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules | 35 | - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules |
38 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules | 36 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r7p0-00rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch index 363153ee..0a7b6736 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r7p0-00rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch | |||
@@ -1,19 +1,19 @@ | |||
1 | From 65a8f9eb32322538396607805dcbc28aa0aadcb7 Mon Sep 17 00:00:00 2001 | 1 | From f27aab2b0e4d5dea9b5a0e4648c142257940c428 Mon Sep 17 00:00:00 2001 |
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | 2 | From: Hyun Kwon <hyun.kwon@xilinx.com> |
3 | Date: Thu, 25 Jun 2015 17:14:42 -0700 | 3 | Date: Thu, 25 Jun 2015 17:14:42 -0700 |
4 | Subject: [PATCH 2/6] staging: mali: r7p0-00rel0: Add the ZYNQ/ZYNQMP platform | 4 | Subject: [PATCH 2/9] staging: mali: r8p0-01rel0: Add the ZYNQ/ZYNQMP platform |
5 | 5 | ||
6 | Add the number of PP cores that is required for Zynq/ZynqMP configuration. | 6 | Add the number of PP cores that is required for Zynq/ZynqMP configuration. |
7 | 7 | ||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | 8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> |
9 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | 9 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
10 | Upstream Status: Pending | 10 | Upstream Status: Inappropriate [Xilinx specific] |
11 | --- | 11 | --- |
12 | driver/src/devicedrv/mali/platform/arm/arm.c | 10 ++++++++++ | 12 | driver/src/devicedrv/mali/platform/arm/arm.c | 10 ++++++++++ |
13 | 1 file changed, 10 insertions(+) | 13 | 1 file changed, 10 insertions(+) |
14 | 14 | ||
15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | 15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c |
16 | index a7ff1b2..0682842 100755 | 16 | index 4e09aca..fac99bc 100644 |
17 | --- platform/arm/arm.c | 17 | --- platform/arm/arm.c |
18 | +++ b/platform/arm/arm.c | 18 | +++ b/platform/arm/arm.c |
19 | @@ -261,6 +261,10 @@ static struct mali_gpu_device_data mali_gpu_data = { | 19 | @@ -261,6 +261,10 @@ static struct mali_gpu_device_data mali_gpu_data = { |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r7p0-00rel0-Remove-unused-trace-macros.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch index fc0dc6e6..98aa6ac9 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r7p0-00rel0-Remove-unused-trace-macros.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch | |||
@@ -1,21 +1,22 @@ | |||
1 | From c86d22f1133647518a68f9f1cbe73e1797e68fa8 Mon Sep 17 00:00:00 2001 | 1 | From d6e44bbf8d1377f78481f611dec237e8d24baf74 Mon Sep 17 00:00:00 2001 |
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
3 | Date: Tue, 3 May 2016 08:11:38 -0700 | 3 | Date: Tue, 21 Nov 2017 04:00:27 -0800 |
4 | Subject: [PATCH 3/6] staging: mali: r7p0-00rel0: Remove unused trace macros | 4 | Subject: [PATCH 3/9] staging: mali: r8p0-01rel0: Remove unused trace macros |
5 | 5 | ||
6 | TRACE_SYSTEM_STRING is not need in each trace file anymore. | 6 | TRACE_SYSTEM_STRING is not need in each trace file anymore. |
7 | 7 | ||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | 8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> |
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
9 | Upstream Status: Pending | 10 | Upstream Status: Pending |
10 | --- | 11 | --- |
11 | driver/src/devicedrv/mali/linux/mali_linux_trace.h | 2 -- | 12 | driver/src/devicedrv/mali/linux/mali_linux_trace.h | 2 -- |
12 | 1 file changed, 2 deletions(-) | 13 | 1 file changed, 2 deletions(-) |
13 | 14 | ||
14 | diff --git a/driver/src/devicedrv/mali/linux/mali_linux_trace.h b/driver/src/devicedrv/mali/linux/mali_linux_trace.h | 15 | diff --git a/driver/src/devicedrv/mali/linux/mali_linux_trace.h b/driver/src/devicedrv/mali/linux/mali_linux_trace.h |
15 | index 2c91ddc..d4e45ab 100755 | 16 | index 7f0b19d..33cb1ca 100644 |
16 | --- linux/mali_linux_trace.h | 17 | --- linux/mali_linux_trace.h |
17 | +++ b/linux/mali_linux_trace.h | 18 | +++ b/linux/mali_linux_trace.h |
18 | @@ -13,12 +13,10 @@ | 19 | @@ -13,13 +13,11 @@ |
19 | 20 | ||
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | 22 | ||
@@ -24,8 +25,9 @@ index 2c91ddc..d4e45ab 100755 | |||
24 | 25 | ||
25 | #undef TRACE_SYSTEM | 26 | #undef TRACE_SYSTEM |
26 | #define TRACE_SYSTEM mali | 27 | #define TRACE_SYSTEM mali |
28 | #ifndef TRACEPOINTS_ENABLED | ||
27 | -#define TRACE_SYSTEM_STRING __stringfy(TRACE_SYSTEM) | 29 | -#define TRACE_SYSTEM_STRING __stringfy(TRACE_SYSTEM) |
28 | 30 | #endif | |
29 | #define TRACE_INCLUDE_PATH . | 31 | #define TRACE_INCLUDE_PATH . |
30 | #define TRACE_INCLUDE_FILE mali_linux_trace | 32 | #define TRACE_INCLUDE_FILE mali_linux_trace |
31 | -- | 33 | -- |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r7p0-00rel0-Don-t-include-mali_read_phy.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch index ce3bea0a..c5c49679 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r7p0-00rel0-Don-t-include-mali_read_phy.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch | |||
@@ -1,19 +1,19 @@ | |||
1 | From 3e6fb4697bddc4cfbb82e6a0b2f9f28d5c1d0a04 Mon Sep 17 00:00:00 2001 | 1 | From 2f5e8944357f43fbde4cb642c6ee4a699c88efb5 Mon Sep 17 00:00:00 2001 |
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | 2 | From: Hyun Kwon <hyun.kwon@xilinx.com> |
3 | Date: Wed, 29 Jun 2016 09:14:37 -0700 | 3 | Date: Wed, 29 Jun 2016 09:14:37 -0700 |
4 | Subject: [PATCH 4/6] staging: mali: r7p0-00rel0: Don't include | 4 | Subject: [PATCH 4/9] staging: mali: r8p0-01rel0: Don't include |
5 | mali_read_phys() for zynq/zynqmp | 5 | mali_read_phys() for zynq/zynqmp |
6 | 6 | ||
7 | mali_read_phys() is not used with CONFIG_ARCH_ZYNQ and CONFIG_ARCH_ZYNQMP. | 7 | mali_read_phys() is not used with CONFIG_ARCH_ZYNQ and CONFIG_ARCH_ZYNQMP. |
8 | 8 | ||
9 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | 9 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> |
10 | Upstream Status: Pending | 10 | Upstream Status: Inappropriate [Xilinx specific] |
11 | --- | 11 | --- |
12 | driver/src/devicedrv/mali/platform/arm/arm.c | 4 ++++ | 12 | driver/src/devicedrv/mali/platform/arm/arm.c | 4 ++++ |
13 | 1 file changed, 4 insertions(+) | 13 | 1 file changed, 4 insertions(+) |
14 | 14 | ||
15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | 15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c |
16 | index 0682842..c6f58d8 100755 | 16 | index fac99bc..62f9be6 100644 |
17 | --- platform/arm/arm.c | 17 | --- platform/arm/arm.c |
18 | +++ b/platform/arm/arm.c | 18 | +++ b/platform/arm/arm.c |
19 | @@ -38,7 +38,9 @@ | 19 | @@ -38,7 +38,9 @@ |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0009-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch index 34cbccf4..3d784604 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0009-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch | |||
@@ -1,20 +1,20 @@ | |||
1 | From ba8c94302a1c606315109a9d1cee342213fdbf98 Mon Sep 17 00:00:00 2001 | 1 | From e67e20ec6ff0c9720d87844270421453c738066a Mon Sep 17 00:00:00 2001 |
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
3 | Date: Thu, 16 Feb 2017 12:15:58 -0800 | 3 | Date: Thu, 16 Feb 2017 12:15:58 -0800 |
4 | Subject: [PATCH] linux/mali_kernel_linux.c: Handle clock when probed and | 4 | Subject: [PATCH 5/9] linux/mali_kernel_linux.c: Handle clock when probed and |
5 | removed | 5 | removed |
6 | 6 | ||
7 | This patch will handle the clock through clock | 7 | This patch will handle the clock through clock |
8 | specifier for GPU PP0 and PP1. | 8 | specifier for GPU PP0 and PP1. |
9 | 9 | ||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | 10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
11 | Upstream-Status: Inappropriate [Specific to Xilinx ZynqMP] | 11 | Upstream Status: Inappropriate [Xilinx specific] |
12 | --- | 12 | --- |
13 | .../src/devicedrv/mali/linux/mali_kernel_linux.c | 40 +++++++++++++++++++++- | 13 | .../src/devicedrv/mali/linux/mali_kernel_linux.c | 40 +++++++++++++++++++++- |
14 | 1 file changed, 39 insertions(+), 1 deletion(-) | 14 | 1 file changed, 39 insertions(+), 1 deletion(-) |
15 | 15 | ||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c | 16 | diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c |
17 | index 9bfa2bd..cfde20f 100755 | 17 | index d7893a3..f15fb56 100644 |
18 | --- linux/mali_kernel_linux.c | 18 | --- linux/mali_kernel_linux.c |
19 | +++ b/linux/mali_kernel_linux.c | 19 | +++ b/linux/mali_kernel_linux.c |
20 | @@ -45,6 +45,14 @@ | 20 | @@ -45,6 +45,14 @@ |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-mali-r7p0-PAGE_CACHE_SHIFT-to-PAGE_CACHE.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-mali-r7p0-PAGE_CACHE_SHIFT-to-PAGE_CACHE.patch deleted file mode 100644 index 32dd9d45..00000000 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-mali-r7p0-PAGE_CACHE_SHIFT-to-PAGE_CACHE.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From ac3baaacbaa564e768529dcb2353a84eb47ae847 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | ||
3 | Date: Mon, 12 Sep 2016 13:12:46 -0700 | ||
4 | Subject: [PATCH 5/6] mali: r7p0: PAGE_CACHE_SHIFT to PAGE_CACHE | ||
5 | |||
6 | 09cbfea removed PAGE_CACHE_*. | ||
7 | |||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
9 | Upstream Status: Pending | ||
10 | --- | ||
11 | driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | ||
15 | index 4793328..1aea47b 100755 | ||
16 | --- linux/mali_memory_swap_alloc.c | ||
17 | +++ b/linux/mali_memory_swap_alloc.c | ||
18 | @@ -52,7 +52,7 @@ extern struct mali_mem_os_allocator mali_mem_os_allocator; | ||
19 | #define MALI_SWAP_LOW_MEM_DEFAULT_VALUE (60*1024*1024) | ||
20 | #define MALI_SWAP_INVALIDATE_MALI_ADDRESS (0) /* Used to mark the given memory cookie is invalidate. */ | ||
21 | #define MALI_SWAP_GLOBAL_SWAP_FILE_SIZE (0xFFFFFFFF) | ||
22 | -#define MALI_SWAP_GLOBAL_SWAP_FILE_INDEX ((MALI_SWAP_GLOBAL_SWAP_FILE_SIZE) >> PAGE_CACHE_SHIFT) | ||
23 | +#define MALI_SWAP_GLOBAL_SWAP_FILE_INDEX ((MALI_SWAP_GLOBAL_SWAP_FILE_SIZE) >> PAGE_SHIFT) | ||
24 | #define MALI_SWAP_GLOBAL_SWAP_FILE_INDEX_RESERVE (1 << 15) /* Reserved for CoW nonlinear swap backend memory, the space size is 128MB. */ | ||
25 | |||
26 | unsigned int mali_mem_swap_out_threshold_value = MALI_SWAP_LOW_MEM_DEFAULT_VALUE; | ||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0008-arm.c-dma_ops-will-be-modified-by-the-driver-only-ti.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch index c11b60a8..3e1745fd 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0008-arm.c-dma_ops-will-be-modified-by-the-driver-only-ti.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch | |||
@@ -1,12 +1,13 @@ | |||
1 | From 4bb78550d818b9e6491fa2d3b9706bb217a1597b Mon Sep 17 00:00:00 2001 | 1 | From ed7242238151c12029c566d1974058c579d8ae3d Mon Sep 17 00:00:00 2001 |
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
3 | Date: Wed, 25 Jan 2017 10:00:33 -0800 | 3 | Date: Wed, 25 Jan 2017 10:00:33 -0800 |
4 | Subject: [PATCH 2/2] arm.c: dma_ops will be modified by the driver only till | 4 | Subject: [PATCH 6/9] arm.c: global variable dma_ops is removed from the kernel |
5 | Kernel v4.7 | 5 | 4.7 |
6 | 6 | ||
7 | From v4.8(Platform specific) Kernel the arch_setup_dma_ops will | 7 | Refer kernel commit 1dccb598df549d892b6450c261da54cdd7af44b4, the global |
8 | not give a dummy_dma_ops if acpi is disabled rather pass a valid | 8 | dma_ops variable and the special-casing for ACPI is removed , and just |
9 | dma_ops. | 9 | returns the dma ops that got set for the device, or the dummy_dma_ops |
10 | if none were present. | ||
10 | 11 | ||
11 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | 12 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
12 | Upstream Status: Pending | 13 | Upstream Status: Pending |
@@ -15,7 +16,7 @@ Upstream Status: Pending | |||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | 16 | 1 file changed, 2 insertions(+), 1 deletion(-) |
16 | 17 | ||
17 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | 18 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c |
18 | index c6f58d8..36965fe 100755 | 19 | index 62f9be6..57ca989 100644 |
19 | --- platform/arm/arm.c | 20 | --- platform/arm/arm.c |
20 | +++ b/platform/arm/arm.c | 21 | +++ b/platform/arm/arm.c |
21 | @@ -529,8 +529,9 @@ int mali_platform_device_init(struct platform_device *device) | 22 | @@ -529,8 +529,9 @@ int mali_platform_device_init(struct platform_device *device) |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-staging-mali-r7p0-page_cache_release-to-put_page.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-staging-mali-r7p0-page_cache_release-to-put_page.patch deleted file mode 100644 index 5582bfa4..00000000 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-staging-mali-r7p0-page_cache_release-to-put_page.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 9dd708ba609b826c07fa91d8a5ee56b368ae8183 Mon Sep 17 00:00:00 2001 | ||
2 | From: "madhurki@xilinx.com" <madhurki@xilinx.com> | ||
3 | Date: Mon, 12 Sep 2016 17:14:34 -0700 | ||
4 | Subject: [PATCH 6/6] staging: mali: r7p0: page_cache_release() to put_page() | ||
5 | |||
6 | 09cbfea replaced page_cache_release() to put_page(). | ||
7 | |||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
9 | Signed-off-by: madhurki@xilinx.com <madhurki@xilinx.com> | ||
10 | Upstream Status: Pending | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | ||
16 | index 1aea47b..068e4d0 100755 | ||
17 | --- linux/mali_memory_swap_alloc.c | ||
18 | +++ b/linux/mali_memory_swap_alloc.c | ||
19 | @@ -183,7 +183,7 @@ static void mali_mem_swap_out_page_node(mali_page_node *page_node) | ||
20 | dma_unmap_page(&mali_platform_device->dev, page_node->swap_it->dma_addr, | ||
21 | _MALI_OSK_MALI_PAGE_SIZE, DMA_TO_DEVICE); | ||
22 | set_page_dirty(page_node->swap_it->page); | ||
23 | - page_cache_release(page_node->swap_it->page); | ||
24 | + put_page(page_node->swap_it->page); | ||
25 | } | ||
26 | |||
27 | void mali_mem_swap_unlock_single_mem_backend(mali_mem_backend *mem_bkend) | ||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-Replace-__GFP_REPEAT-by-__GFP_RETRY_MAYFAIL.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-Replace-__GFP_REPEAT-by-__GFP_RETRY_MAYFAIL.patch new file mode 100644 index 00000000..6e5f5447 --- /dev/null +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-Replace-__GFP_REPEAT-by-__GFP_RETRY_MAYFAIL.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From a8190cd3b346633016d1c0096ef73e0e1ceef438 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Tue, 5 Dec 2017 09:25:15 -0800 | ||
4 | Subject: [PATCH 7/9] Replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL | ||
5 | |||
6 | Refer kernel patch dcda9b04713c3f6ff0875652924844fae28286ea | ||
7 | which replaces with a useful semantic | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
10 | Upstream-Status: Pending | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | 4 ++++ | ||
13 | driver/src/devicedrv/mali/linux/mali_osk_notification.c | 7 ++++++- | ||
14 | 2 files changed, 10 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | ||
17 | index 5fe1270..1602371 100644 | ||
18 | --- linux/mali_memory_os_alloc.c | ||
19 | +++ b/linux/mali_memory_os_alloc.c | ||
20 | @@ -202,7 +202,11 @@ int mali_mem_os_alloc_pages(mali_mem_os_mem *os_mem, u32 size) | ||
21 | /* Allocate new pages, if needed. */ | ||
22 | for (i = 0; i < remaining; i++) { | ||
23 | dma_addr_t dma_addr; | ||
24 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
25 | + gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN | __GFP_COLD; | ||
26 | +#else | ||
27 | gfp_t flags = __GFP_ZERO | __GFP_REPEAT | __GFP_NOWARN | __GFP_COLD; | ||
28 | +#endif | ||
29 | int err; | ||
30 | |||
31 | #if defined(CONFIG_ARM) && !defined(CONFIG_ARM_LPAE) | ||
32 | diff --git a/driver/src/devicedrv/mali/linux/mali_osk_notification.c b/driver/src/devicedrv/mali/linux/mali_osk_notification.c | ||
33 | index b22fe68..d0c302a 100644 | ||
34 | --- linux/mali_osk_notification.c | ||
35 | +++ b/linux/mali_osk_notification.c | ||
36 | @@ -55,9 +55,14 @@ _mali_osk_notification_t *_mali_osk_notification_create(u32 type, u32 size) | ||
37 | { | ||
38 | /* OPT Recycling of notification objects */ | ||
39 | _mali_osk_notification_wrapper_t *notification; | ||
40 | - | ||
41 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
42 | + notification = (_mali_osk_notification_wrapper_t *)kmalloc(sizeof(_mali_osk_notification_wrapper_t) + size, | ||
43 | + GFP_KERNEL | __GFP_HIGH | __GFP_RETRY_MAYFAIL); | ||
44 | +#else | ||
45 | notification = (_mali_osk_notification_wrapper_t *)kmalloc(sizeof(_mali_osk_notification_wrapper_t) + size, | ||
46 | GFP_KERNEL | __GFP_HIGH | __GFP_REPEAT); | ||
47 | +#endif | ||
48 | + | ||
49 | if (NULL == notification) { | ||
50 | MALI_DEBUG_PRINT(1, ("Failed to create a notification object\n")); | ||
51 | return NULL; | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-mali_memory_os_alloc.c-Align-with-dma_attrs-changes-.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-mali_memory_os_alloc.c-Align-with-dma_attrs-changes-.patch deleted file mode 100644 index 79c507d2..00000000 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0007-mali_memory_os_alloc.c-Align-with-dma_attrs-changes-.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From f0a49bccbdd910c48aab59e07aed98093f4a0fea Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Wed, 25 Jan 2017 02:59:40 -0800 | ||
4 | Subject: [PATCH 1/2] mali_memory_os_alloc.c: Align with dma_attrs changes from | ||
5 | 4.8 Kernel | ||
6 | |||
7 | From 4.8 Kernel the DMA attributes is no longer a pointer but an unsigned long. | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
10 | Upstream Status: Pending | ||
11 | --- | ||
12 | .../devicedrv/mali/linux/mali_memory_os_alloc.c | 25 +++++++++++++++++----- | ||
13 | 1 file changed, 20 insertions(+), 5 deletions(-) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | ||
16 | index 7f229eb..08fa2fb 100755 | ||
17 | --- linux/mali_memory_os_alloc.c | ||
18 | +++ b/linux/mali_memory_os_alloc.c | ||
19 | @@ -26,9 +26,11 @@ | ||
20 | #define MALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_PAGES (MALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB * 256) | ||
21 | #define MALI_OS_MEMORY_POOL_TRIM_JIFFIES (10 * CONFIG_HZ) /* Default to 10s */ | ||
22 | |||
23 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) | ||
24 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
25 | /* Write combine dma_attrs */ | ||
26 | static DEFINE_DMA_ATTRS(dma_attrs_wc); | ||
27 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) | ||
28 | +static unsigned long dma_attrs_wc; | ||
29 | #endif | ||
30 | |||
31 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0) | ||
32 | @@ -511,10 +513,14 @@ _mali_osk_errcode_t mali_mem_os_get_table_page(mali_dma_addr *phys, mali_io_addr | ||
33 | spin_unlock(&mali_mem_page_table_page_pool.lock); | ||
34 | |||
35 | if (_MALI_OSK_ERR_OK != ret) { | ||
36 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) | ||
37 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
38 | *mapping = dma_alloc_attrs(&mali_platform_device->dev, | ||
39 | _MALI_OSK_MALI_PAGE_SIZE, &tmp_phys, | ||
40 | GFP_KERNEL, &dma_attrs_wc); | ||
41 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) | ||
42 | + *mapping = dma_alloc_attrs(&mali_platform_device->dev, | ||
43 | + _MALI_OSK_MALI_PAGE_SIZE, &tmp_phys, | ||
44 | + GFP_KERNEL, dma_attrs_wc); | ||
45 | #else | ||
46 | *mapping = dma_alloc_writecombine(&mali_platform_device->dev, | ||
47 | _MALI_OSK_MALI_PAGE_SIZE, &tmp_phys, GFP_KERNEL); | ||
48 | @@ -550,10 +556,14 @@ void mali_mem_os_release_table_page(mali_dma_addr phys, void *virt) | ||
49 | } else { | ||
50 | spin_unlock(&mali_mem_page_table_page_pool.lock); | ||
51 | |||
52 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) | ||
53 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
54 | dma_free_attrs(&mali_platform_device->dev, | ||
55 | _MALI_OSK_MALI_PAGE_SIZE, virt, phys, | ||
56 | &dma_attrs_wc); | ||
57 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) | ||
58 | + dma_free_attrs(&mali_platform_device->dev, | ||
59 | + _MALI_OSK_MALI_PAGE_SIZE, virt, phys, | ||
60 | + dma_attrs_wc); | ||
61 | #else | ||
62 | dma_free_writecombine(&mali_platform_device->dev, | ||
63 | _MALI_OSK_MALI_PAGE_SIZE, virt, phys); | ||
64 | @@ -606,9 +616,12 @@ static void mali_mem_os_page_table_pool_free(size_t nr_to_free) | ||
65 | |||
66 | /* After releasing the spinlock: free the pages we removed from the pool. */ | ||
67 | for (i = 0; i < nr_to_free; i++) { | ||
68 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) | ||
69 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
70 | dma_free_attrs(&mali_platform_device->dev, _MALI_OSK_MALI_PAGE_SIZE, | ||
71 | virt_arr[i], (dma_addr_t)phys_arr[i], &dma_attrs_wc); | ||
72 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) | ||
73 | + dma_free_attrs(&mali_platform_device->dev, _MALI_OSK_MALI_PAGE_SIZE, | ||
74 | + virt_arr[i], (dma_addr_t)phys_arr[i], dma_attrs_wc); | ||
75 | #else | ||
76 | dma_free_writecombine(&mali_platform_device->dev, | ||
77 | _MALI_OSK_MALI_PAGE_SIZE, | ||
78 | @@ -757,8 +770,10 @@ _mali_osk_errcode_t mali_mem_os_init(void) | ||
79 | return _MALI_OSK_ERR_NOMEM; | ||
80 | } | ||
81 | |||
82 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) | ||
83 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
84 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &dma_attrs_wc); | ||
85 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) | ||
86 | + dma_attrs_wc |= DMA_ATTR_WRITE_COMBINE; | ||
87 | #endif | ||
88 | |||
89 | register_shrinker(&mali_mem_os_allocator.shrinker); | ||
90 | -- | ||
91 | 2.7.4 | ||
92 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0008-mali_internal_sync-Rename-wait_queue_t-with-wait_que.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0008-mali_internal_sync-Rename-wait_queue_t-with-wait_que.patch new file mode 100644 index 00000000..592fea04 --- /dev/null +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0008-mali_internal_sync-Rename-wait_queue_t-with-wait_que.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | From 717d7899f6d8048c6b88b3c52e8a9c8afbddbb65 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Tue, 5 Dec 2017 09:48:42 -0800 | ||
4 | Subject: [PATCH 8/9] mali_internal_sync: Rename wait_queue_t with | ||
5 | wait_queue_entry_t | ||
6 | |||
7 | Refer kernel patch ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f | ||
8 | and 2055da which replaces the struct name | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | .../src/devicedrv/mali/linux/mali_internal_sync.c | 27 ++++++++++++++++++++-- | ||
14 | .../src/devicedrv/mali/linux/mali_internal_sync.h | 4 ++++ | ||
15 | 2 files changed, 29 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/driver/src/devicedrv/mali/linux/mali_internal_sync.c b/driver/src/devicedrv/mali/linux/mali_internal_sync.c | ||
18 | index 1f2574e..957a056 100644 | ||
19 | --- linux/mali_internal_sync.c | ||
20 | +++ b/linux/mali_internal_sync.c | ||
21 | @@ -121,8 +121,13 @@ static void mali_internal_sync_fence_add_fence(struct mali_internal_sync_fence * | ||
22 | } | ||
23 | #endif | ||
24 | |||
25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
26 | +static int mali_internal_sync_fence_wake_up_wq(wait_queue_entry_t *curr, unsigned mode, | ||
27 | + int wake_flags, void *key) | ||
28 | +#else | ||
29 | static int mali_internal_sync_fence_wake_up_wq(wait_queue_t *curr, unsigned mode, | ||
30 | int wake_flags, void *key) | ||
31 | +#endif | ||
32 | { | ||
33 | struct mali_internal_sync_fence_waiter *wait; | ||
34 | MALI_IGNORE(mode); | ||
35 | @@ -130,8 +135,12 @@ static int mali_internal_sync_fence_wake_up_wq(wait_queue_t *curr, unsigned mode | ||
36 | MALI_IGNORE(key); | ||
37 | |||
38 | wait = container_of(curr, struct mali_internal_sync_fence_waiter, work); | ||
39 | - list_del_init(&wait->work.task_list); | ||
40 | |||
41 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
42 | + list_del_init(&wait->work.entry); | ||
43 | +#else | ||
44 | + list_del_init(&wait->work.task_list); | ||
45 | +#endif | ||
46 | wait->callback(wait->work.private, wait); | ||
47 | return 1; | ||
48 | } | ||
49 | @@ -498,7 +507,11 @@ void mali_internal_sync_fence_waiter_init(struct mali_internal_sync_fence_waiter | ||
50 | MALI_DEBUG_ASSERT_POINTER(waiter); | ||
51 | MALI_DEBUG_ASSERT_POINTER(callback); | ||
52 | |||
53 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
54 | + INIT_LIST_HEAD(&waiter->work.entry); | ||
55 | +#else | ||
56 | INIT_LIST_HEAD(&waiter->work.task_list); | ||
57 | +#endif | ||
58 | waiter->callback = callback; | ||
59 | } | ||
60 | |||
61 | @@ -560,8 +573,13 @@ int mali_internal_sync_fence_wait_async(struct mali_internal_sync_fence *sync_fe | ||
62 | spin_lock_irqsave(&sync_fence->wq.lock, flags); | ||
63 | err = sync_fence->fence->ops->signaled(sync_fence->fence); | ||
64 | |||
65 | - if (0 == err) | ||
66 | + if (0 == err){ | ||
67 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
68 | + __add_wait_queue_entry_tail(&sync_fence->wq, &waiter->work); | ||
69 | +#else | ||
70 | __add_wait_queue_tail(&sync_fence->wq, &waiter->work); | ||
71 | +#endif | ||
72 | + } | ||
73 | spin_unlock_irqrestore(&sync_fence->wq.lock, flags); | ||
74 | |||
75 | return err; | ||
76 | @@ -578,8 +596,13 @@ int mali_internal_sync_fence_cancel_async(struct mali_internal_sync_fence *sync_ | ||
77 | MALI_DEBUG_ASSERT_POINTER(waiter); | ||
78 | |||
79 | spin_lock_irqsave(&sync_fence->wq.lock, flags); | ||
80 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
81 | + if (!list_empty(&waiter->work.entry)) | ||
82 | + list_del_init(&waiter->work.entry); | ||
83 | +#else | ||
84 | if (!list_empty(&waiter->work.task_list)) | ||
85 | list_del_init(&waiter->work.task_list); | ||
86 | +#endif | ||
87 | else | ||
88 | ret = -ENOENT; | ||
89 | spin_unlock_irqrestore(&sync_fence->wq.lock, flags); | ||
90 | diff --git a/driver/src/devicedrv/mali/linux/mali_internal_sync.h b/driver/src/devicedrv/mali/linux/mali_internal_sync.h | ||
91 | index a5655c7..70f29f9 100644 | ||
92 | --- linux/mali_internal_sync.h | ||
93 | +++ b/linux/mali_internal_sync.h | ||
94 | @@ -112,7 +112,11 @@ typedef void (*mali_internal_sync_callback_t)(struct mali_internal_sync_fence *s | ||
95 | struct mali_internal_sync_fence_waiter *waiter); | ||
96 | |||
97 | struct mali_internal_sync_fence_waiter { | ||
98 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) | ||
99 | + wait_queue_entry_t work; | ||
100 | +#else | ||
101 | wait_queue_t work; | ||
102 | +#endif | ||
103 | mali_internal_sync_callback_t callback; | ||
104 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) | ||
105 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) | ||
106 | -- | ||
107 | 2.7.4 | ||
108 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch new file mode 100644 index 00000000..3445512c --- /dev/null +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 478de18bf513ecad419d25981e7b66c78126752c Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Tue, 5 Dec 2017 09:58:36 -0800 | ||
4 | Subject: [PATCH 9/9] mali_memory_swap_alloc.c: Rename global_page_state with | ||
5 | global_zone_page_state | ||
6 | |||
7 | Refer Kernel commit c41f012ade0b95b0a6e25c7150673e0554736165 | ||
8 | Which simply renames without any functional changes | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | 10 +++++++++- | ||
14 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_swap_alloc.c | ||
17 | index a54faca..e122b4c 100644 | ||
18 | --- linux/mali_memory_swap_alloc.c | ||
19 | +++ b/linux/mali_memory_swap_alloc.c | ||
20 | @@ -248,7 +248,11 @@ static void mali_mem_swap_swapped_bkend_pool_shrink(_mali_mem_swap_pool_shrink_t | ||
21 | } | ||
22 | |||
23 | /* Get system free pages number. */ | ||
24 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
25 | + system_free_size = global_zone_page_state(NR_FREE_PAGES) * PAGE_SIZE; | ||
26 | +#else | ||
27 | system_free_size = global_page_state(NR_FREE_PAGES) * PAGE_SIZE; | ||
28 | +#endif | ||
29 | last_gpu_utilization = _mali_ukk_utilization_gp_pp(); | ||
30 | |||
31 | if ((last_gpu_utilization < gpu_utilization_threshold_value) | ||
32 | @@ -575,8 +579,12 @@ int mali_mem_swap_alloc_pages(mali_mem_swap *swap_mem, u32 size, u32 *bkend_idx) | ||
33 | |||
34 | list_add_tail(&m_page->list, &swap_mem->pages); | ||
35 | } | ||
36 | - | ||
37 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
38 | + system_free_size = global_zone_page_state(NR_FREE_PAGES) * PAGE_SIZE; | ||
39 | +#else | ||
40 | system_free_size = global_page_state(NR_FREE_PAGES) * PAGE_SIZE; | ||
41 | +#endif | ||
42 | + | ||
43 | |||
44 | if ((system_free_size < mali_mem_swap_out_threshold_value) | ||
45 | && (mem_backend_swapped_pool_size > (mali_mem_swap_out_threshold_value >> 2)) | ||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch index ad159ba6..98a86c88 100644 --- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 572d234259158bf9f046c2393a65e2800bec1062 Mon Sep 17 00:00:00 2001 | 1 | From 58e2c55176f1a146781430b2a570c8ce5f80d426 Mon Sep 17 00:00:00 2001 |
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
3 | Date: Mon, 28 Aug 2017 09:40:37 -0700 | 3 | Date: Mon, 28 Aug 2017 09:40:37 -0700 |
4 | Subject: [PATCH] common/mali_pm.c: Add PM runtime barrier after removing | 4 | Subject: [PATCH] common/mali_pm.c: Add PM runtime barrier after removing |
@@ -15,7 +15,7 @@ Upstream-Status: Pending | |||
15 | 1 file changed, 1 insertion(+) | 15 | 1 file changed, 1 insertion(+) |
16 | 16 | ||
17 | diff --git a/driver/src/devicedrv/mali/common/mali_pm.c b/driver/src/devicedrv/mali/common/mali_pm.c | 17 | diff --git a/driver/src/devicedrv/mali/common/mali_pm.c b/driver/src/devicedrv/mali/common/mali_pm.c |
18 | index 1ef03a6..0343ad3 100755 | 18 | index 858c689..62a1e5f 100644 |
19 | --- common/mali_pm.c | 19 | --- common/mali_pm.c |
20 | +++ b/common/mali_pm.c | 20 | +++ b/common/mali_pm.c |
21 | @@ -301,6 +301,7 @@ void mali_pm_init_end(void) | 21 | @@ -301,6 +301,7 @@ void mali_pm_init_end(void) |
diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch new file mode 100644 index 00000000..38ab4042 --- /dev/null +++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | From aeff13ad9e9ef73172a9325f669aefd3c0403dbb Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Wed, 21 Feb 2018 16:52:15 -0800 | ||
4 | Subject: [PATCH] linux/mali_kernel_linux.c: Enable/disable clock for runtime | ||
5 | resume/suspend | ||
6 | |||
7 | Enable/Disable the clock for GP,PP0 and PP1 during runtime | ||
8 | resume/suspend. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
11 | Reviewed-by: Hyun Kwon <hyunk@xilinx.com> | ||
12 | Upstream Status: Inappropriate [Xilinx specific] | ||
13 | --- | ||
14 | .../src/devicedrv/mali/linux/mali_kernel_linux.c | 65 ++++++++++++++++++---- | ||
15 | 1 file changed, 54 insertions(+), 11 deletions(-) | ||
16 | |||
17 | diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c | ||
18 | index f15fb56..e61f33b 100644 | ||
19 | --- linux/mali_kernel_linux.c | ||
20 | +++ b/linux/mali_kernel_linux.c | ||
21 | @@ -51,6 +51,7 @@ | ||
22 | struct clk *clk_gpu; | ||
23 | struct clk *clk_gpu_pp0; | ||
24 | struct clk *clk_gpu_pp1; | ||
25 | +mali_bool clk_enabled; | ||
26 | #endif | ||
27 | |||
28 | #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS) | ||
29 | @@ -281,6 +282,46 @@ struct file_operations mali_fops = { | ||
30 | .mmap = mali_mmap | ||
31 | }; | ||
32 | |||
33 | +static int mali_enable_clk(void) | ||
34 | +{ | ||
35 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
36 | + int err = 0; | ||
37 | + | ||
38 | + if (clk_enabled) | ||
39 | + return 0; | ||
40 | + | ||
41 | + clk_enabled = MALI_TRUE; | ||
42 | + err = clk_prepare_enable(clk_gpu); | ||
43 | + if (err) { | ||
44 | + MALI_PRINT_ERROR(("Could not enable clock for GP\n\r")); | ||
45 | + return err; | ||
46 | + } | ||
47 | + err = clk_prepare_enable(clk_gpu_pp0); | ||
48 | + if (err) { | ||
49 | + MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r")); | ||
50 | + return err; | ||
51 | + } | ||
52 | + err = clk_prepare_enable(clk_gpu_pp1); | ||
53 | + if (err) { | ||
54 | + MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r")); | ||
55 | + return err; | ||
56 | + } | ||
57 | +#endif | ||
58 | + return 0; | ||
59 | +} | ||
60 | + | ||
61 | +static void mali_disable_clk(void) | ||
62 | +{ | ||
63 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
64 | + if (clk_enabled) { | ||
65 | + clk_enabled = MALI_FALSE; | ||
66 | + clk_disable_unprepare(clk_gpu); | ||
67 | + clk_disable_unprepare(clk_gpu_pp0); | ||
68 | + clk_disable_unprepare(clk_gpu_pp1); | ||
69 | + } | ||
70 | +#endif | ||
71 | +} | ||
72 | + | ||
73 | #if MALI_ENABLE_CPU_CYCLES | ||
74 | void mali_init_cpu_time_counters(int reset, int enable_divide_by_64) | ||
75 | { | ||
76 | @@ -593,18 +634,19 @@ static int mali_probe(struct platform_device *pdev) | ||
77 | clk_gpu = devm_clk_get(&pdev->dev, "gpu"); | ||
78 | if (IS_ERR(clk_gpu)) | ||
79 | return PTR_ERR(clk_gpu); | ||
80 | - clk_prepare_enable(clk_gpu); | ||
81 | |||
82 | clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0"); | ||
83 | if (IS_ERR(clk_gpu_pp0)) | ||
84 | return PTR_ERR(clk_gpu_pp0); | ||
85 | - clk_prepare_enable(clk_gpu_pp0); | ||
86 | |||
87 | clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1"); | ||
88 | if (IS_ERR(clk_gpu_pp1)) | ||
89 | return PTR_ERR(clk_gpu_pp1); | ||
90 | - clk_prepare_enable(clk_gpu_pp1); | ||
91 | #endif | ||
92 | + | ||
93 | + err = mali_enable_clk(); | ||
94 | + if (err) | ||
95 | + return err; | ||
96 | if (_MALI_OSK_ERR_OK == _mali_osk_wq_init()) { | ||
97 | /* Initialize the Mali GPU HW specified by pdev */ | ||
98 | if (_MALI_OSK_ERR_OK == mali_initialize_subsystems()) { | ||
99 | @@ -632,11 +674,6 @@ static int mali_probe(struct platform_device *pdev) | ||
100 | _mali_osk_wq_term(); | ||
101 | } | ||
102 | |||
103 | -#if defined(CONFIG_ARCH_ZYNQMP) | ||
104 | - clk_disable_unprepare(clk_gpu); | ||
105 | - clk_disable_unprepare(clk_gpu_pp0); | ||
106 | - clk_disable_unprepare(clk_gpu_pp1); | ||
107 | -#endif | ||
108 | |||
109 | #ifdef CONFIG_MALI_DEVFREQ | ||
110 | mali_devfreq_term(mdev); | ||
111 | @@ -644,6 +681,7 @@ devfreq_init_failed: | ||
112 | mali_pm_metrics_term(mdev); | ||
113 | pm_metrics_init_failed: | ||
114 | clk_disable_unprepare(mdev->clock); | ||
115 | + mali_disable_clk(); | ||
116 | clock_prepare_failed: | ||
117 | clk_put(mdev->clock); | ||
118 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && defined(CONFIG_OF) \ | ||
119 | @@ -706,9 +744,7 @@ static int mali_remove(struct platform_device *pdev) | ||
120 | |||
121 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
122 | /* Remove clock */ | ||
123 | - clk_disable_unprepare(clk_gpu); | ||
124 | - clk_disable_unprepare(clk_gpu_pp0); | ||
125 | - clk_disable_unprepare(clk_gpu_pp1); | ||
126 | + mali_disable_clk(); | ||
127 | #endif | ||
128 | |||
129 | return 0; | ||
130 | @@ -816,6 +852,8 @@ static int mali_driver_runtime_suspend(struct device *dev) | ||
131 | devfreq_suspend_device(mdev->devfreq); | ||
132 | #endif | ||
133 | |||
134 | + mali_disable_clk(); | ||
135 | + | ||
136 | return 0; | ||
137 | } else { | ||
138 | return -EBUSY; | ||
139 | @@ -824,6 +862,11 @@ static int mali_driver_runtime_suspend(struct device *dev) | ||
140 | |||
141 | static int mali_driver_runtime_resume(struct device *dev) | ||
142 | { | ||
143 | + int err ; | ||
144 | + | ||
145 | + err = mali_enable_clk(); | ||
146 | + if (err) | ||
147 | + return err; | ||
148 | #ifdef CONFIG_MALI_DEVFREQ | ||
149 | struct mali_device *mdev = dev_get_drvdata(dev); | ||
150 | if (!mdev) | ||
151 | -- | ||
152 | 2.7.4 | ||
153 | |||