diff options
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-graphics')
7 files changed, 230 insertions, 24 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb index 8c6ab3e9fd..113710e336 100644 --- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb @@ -37,7 +37,7 @@ COMPATIBLE_MACHINE = "^$" COMPATIBLE_MACHINE_zynqmpeg = "zynqmpeg" COMPATIBLE_MACHINE_zynqmpev = "zynqmpev" -PACKAGE_ARCH = "${SOC_FAMILY}${SOC_VARIANT}" +PACKAGE_ARCH = "${SOC_FAMILY}" S = "${WORKDIR}/mali-400" diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb index 327f8f09e7..fe2fbdcf58 100644 --- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb @@ -21,6 +21,9 @@ SRC_URI = " \ file://0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch \ file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ + file://0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch\ + file://0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch\ + file://0014-linux-mali_-timer-Get-rid-of-init_timer.patch\ " SRC_URI[md5sum] = "8f04ae86957fd56197ad5a9d017b84ff" SRC_URI[sha256sum] = "bfd14fa3f75a71d4ba313534e651ca1c58dc354e882c0b39867e335882a06350" diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch new file mode 100644 index 0000000000..24f0a22c43 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch @@ -0,0 +1,33 @@ +From 779b1883d56804ecd08fe7f57d6c01e3db4e893b Mon Sep 17 00:00:00 2001 +From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Date: Wed, 5 Dec 2018 18:07:29 -0800 +Subject: [PATCH 1/3] linux: mali_memory_os_alloc: Remove __GFP_COLD + +The support for Cache hot and cold pages are removed from the kernel. +For more information refer kernel commit 453f85d43fa9ee243f0fc3ac4e1be45615301e3f + +Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> +Upstream Status: Pending +--- + driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c +index 1602371..830e8c6 100644 +--- linux/mali_memory_os_alloc.c ++++ b/linux/mali_memory_os_alloc.c +@@ -202,7 +202,9 @@ int mali_mem_os_alloc_pages(mali_mem_os_mem *os_mem, u32 size) + /* Allocate new pages, if needed. */ + for (i = 0; i < remaining; i++) { + dma_addr_t dma_addr; +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) ++ gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN; ++#elif LINUX_VERSION_CODE == KERNEL_VERSION(4, 14, 0) + gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN | __GFP_COLD; + #else + gfp_t flags = __GFP_ZERO | __GFP_REPEAT | __GFP_NOWARN | __GFP_COLD; +-- +2.7.4 + diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch new file mode 100644 index 0000000000..c28a83f478 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch @@ -0,0 +1,34 @@ +From d20b6eb3e48e56558488dbdda98875b1aed0c29f Mon Sep 17 00:00:00 2001 +From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Date: Wed, 5 Dec 2018 18:13:28 -0800 +Subject: [PATCH 2/3] linux: mali_memory_secure: Add header file dma-direct.h + +Add dma-direct.h header, as API dma_to_phys is defined here. +refer kernel commit ea8c64ace86647260ec4255f483e5844d62af2df + +Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> +Upstream Status: Pending +--- + driver/src/devicedrv/mali/linux/mali_memory_secure.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c +index 2836b1b..4f55fa5 100644 +--- linux/mali_memory_secure.c ++++ b/linux/mali_memory_secure.c +@@ -13,7 +13,11 @@ + #include "mali_memory_secure.h" + #include "mali_osk.h" + #include <linux/mutex.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) ++#include <linux/dma-direct.h> ++#else + #include <linux/dma-mapping.h> ++#endif + #include <linux/dma-buf.h> + + _mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd) +-- +2.7.4 + diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch new file mode 100644 index 0000000000..a7c1d5cc69 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch @@ -0,0 +1,156 @@ +From b6936450484b5aa9dd2438367a907af020341d1d Mon Sep 17 00:00:00 2001 +From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Date: Thu, 6 Dec 2018 13:30:44 -0800 +Subject: [PATCH 3/3] linux: mali_*timer: Get rid of init_timer + +kernel 4.19 got rid of ancient init_timer. Hence, replace it with +timer_setup API. For more information refer kernel commit +7eeb6b893bd28c68b6d664de1d3120e49b855cdb + +Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> +Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> +Upstream Status: Pending +--- + driver/src/devicedrv/mali/common/mali_control_timer.c | 6 ++++++ + driver/src/devicedrv/mali/common/mali_group.c | 6 ++++++ + driver/src/devicedrv/mali/common/mali_osk.h | 15 ++++++++++++++- + driver/src/devicedrv/mali/linux/mali_osk_timers.c | 15 ++++++++++++++- + 4 files changed, 40 insertions(+), 2 deletions(-) + +diff --git a/driver/src/devicedrv/mali/common/mali_control_timer.c b/driver/src/devicedrv/mali/common/mali_control_timer.c +index 1296ffe..d24b934 100644 +--- common/mali_control_timer.c ++++ b/common/mali_control_timer.c +@@ -65,11 +65,17 @@ _mali_osk_errcode_t mali_control_timer_init(void) + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ mali_control_timer = _mali_osk_timer_init(mali_control_timer_callback); ++#else + mali_control_timer = _mali_osk_timer_init(); ++#endif + if (NULL == mali_control_timer) { + return _MALI_OSK_ERR_FAULT; + } ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + _mali_osk_timer_setcallback(mali_control_timer, mali_control_timer_callback, NULL); ++#endif + + return _MALI_OSK_ERR_OK; + } +diff --git a/driver/src/devicedrv/mali/common/mali_group.c b/driver/src/devicedrv/mali/common/mali_group.c +index 5c7b3f4..1702e9a 100644 +--- common/mali_group.c ++++ b/common/mali_group.c +@@ -65,9 +65,15 @@ struct mali_group *mali_group_create(struct mali_l2_cache_core *core, + + group = _mali_osk_calloc(1, sizeof(struct mali_group)); + if (NULL != group) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ group->timeout_timer = _mali_osk_timer_init(mali_group_timeout); ++#else + group->timeout_timer = _mali_osk_timer_init(); ++#endif + if (NULL != group->timeout_timer) { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + _mali_osk_timer_setcallback(group->timeout_timer, mali_group_timeout, (void *)group); ++#endif + + group->l2_cache_core[0] = core; + _mali_osk_list_init(&group->group_list); +diff --git a/driver/src/devicedrv/mali/common/mali_osk.h b/driver/src/devicedrv/mali/common/mali_osk.h +index a501778..fe93d79 100644 +--- common/mali_osk.h ++++ b/common/mali_osk.h +@@ -947,7 +947,17 @@ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue(_mali_osk_notification_ + * asked for. + * + * @{ */ +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++/** @brief Initialize a timer ++ * ++ * Allocates resources for a new timer, and initializes them. This does not ++ * start the timer. ++ * ++ * @param callback Function to call when timer expires ++ * @return a pointer to the allocated timer object, or NULL on failure. ++ */ ++_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback); ++#else + /** @brief Initialize a timer + * + * Allocates resources for a new timer, and initializes them. This does not +@@ -956,6 +966,7 @@ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue(_mali_osk_notification_ + * @return a pointer to the allocated timer object, or NULL on failure. + */ + _mali_osk_timer_t *_mali_osk_timer_init(void); ++#endif + + /** @brief Start a timer + * +@@ -1034,6 +1045,7 @@ void _mali_osk_timer_del_async(_mali_osk_timer_t *tim); + */ + mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + /** @brief Set a timer's callback parameters. + * + * This must be called at least once before a timer is started/modified. +@@ -1047,6 +1059,7 @@ mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim); + * @param data Function-specific data to supply to the function on expiry. + */ + void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data); ++#endif + + /** @brief Terminate a timer, and deallocate resources. + * +diff --git a/driver/src/devicedrv/mali/linux/mali_osk_timers.c b/driver/src/devicedrv/mali/linux/mali_osk_timers.c +index e5d7238..f9b5a86 100644 +--- linux/mali_osk_timers.c ++++ b/linux/mali_osk_timers.c +@@ -21,13 +21,24 @@ + struct _mali_osk_timer_t_struct { + struct timer_list timer; + }; +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++typedef void (*timer_timeout_function_t)(struct timer_list *); ++#else + typedef void (*timer_timeout_function_t)(unsigned long); ++#endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback) ++#else + _mali_osk_timer_t *_mali_osk_timer_init(void) ++#endif + { + _mali_osk_timer_t *t = (_mali_osk_timer_t *)kmalloc(sizeof(_mali_osk_timer_t), GFP_KERNEL); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) ++ if (NULL != t) timer_setup(&t->timer, (timer_timeout_function_t)callback, 0); ++#else + if (NULL != t) init_timer(&t->timer); ++#endif + return t; + } + +@@ -62,12 +73,14 @@ mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim) + return 1 == timer_pending(&(tim->timer)); + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data) + { + MALI_DEBUG_ASSERT_POINTER(tim); + tim->timer.data = (unsigned long)data; + tim->timer.function = (timer_timeout_function_t)callback; + } ++#endif + + void _mali_osk_timer_term(_mali_osk_timer_t *tim) + { +-- +2.7.4 + diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend new file mode 100644 index 0000000000..3ddcf0b819 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/xf86-video-armsoc:" + +SRC_URI_append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch" diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb deleted file mode 100644 index 7a671fe01a..0000000000 --- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_git.bb +++ /dev/null @@ -1,23 +0,0 @@ -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -SUMMARY = "X.Org X server -- Xilinx ARM SOC display driver" -DESCRIPTION = "Xilinx ARM SOC display driver " - -LICENSE = "MIT-X & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602" - -DEPENDS += "virtual/libx11 libdrm xf86driproto" -RDEPENDS_${PN} += "xserver-xorg-module-exa" - -PV = "1.4.1+git${SRCPV}" - -SRCREV = "8bbdb2ae3bb8ef649999a8da33ddbe11a04763b8" -SRC_URI = " \ - git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc \ - file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ - " - -S = "${WORKDIR}/git" - -EXTRA_OECONF = " --enable-maintainer-mode" -CFLAGS += " -I${STAGING_INCDIR}/xorg " |