summaryrefslogtreecommitdiff
path: root/meta-xilinx/meta-xilinx-bsp/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-graphics')
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/cairo/cairo_%.bbappend9
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/egl.pc12
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc12
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1.pc12
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1_cm.pc12
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv2.pc12
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb201
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/libglu/libglu_%.bbappend1
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb53
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch47
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch52
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch35
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch47
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch90
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch35
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch31
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch153
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch33
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch34
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch156
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch17
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch47
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch146
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch32
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch36
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-demos_%.bbappend9
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-gl_%.bbappend3
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/wayland/weston_%.bbappend9
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch29
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/weston.ini6
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston-init%.bbappend7
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend3
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch33
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch141
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend5
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/zynqmp/xorg.conf27
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend1
37 files changed, 0 insertions, 1588 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/cairo/cairo_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/cairo/cairo_%.bbappend
deleted file mode 100644
index c3f12f63a..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/cairo/cairo_%.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-PACKAGECONFIG_zynqmp += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
- egl glesv2"
-
-# OpenGL comes from libmali on ev/eg
-DEPENDS_append_zynqmpev = " libmali-xlnx"
-DEPENDS_append_zynqmpeg = " libmali-xlnx"
-
-PACKAGE_ARCH_zynqmpev = "${SOC_VARIANT_ARCH}"
-PACKAGE_ARCH_zynqmpeg = "${SOC_VARIANT_ARCH}"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/egl.pc b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/egl.pc
deleted file mode 100644
index 65c4c1f3a..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/egl.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=/usr/lib
-includedir=/usr/include
-
-Name: egl
-Description: MALI EGL library
-Requires.private:
-Version: 17.3
-Libs: -L${libdir} -lEGL
-Libs.private: -lm -lpthread -ldl
-Cflags: -I${includedir}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc
deleted file mode 100644
index c40b5f4fd..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=/usr/lib
-includedir=/usr/include
-
-Name: gbm
-Description: MALI gbm library
-Requires.private:
-Version: 17.3
-Libs: -L${libdir} -lgbm
-Libs.private: -lm -lpthread -ldl
-Cflags: -I${includedir}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1.pc b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1.pc
deleted file mode 100644
index 39467f332..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=/usr/lib
-includedir=/usr/include
-
-Name: glesv1
-Description: MALI OpenGL ES 1.1 library
-Requires.private:
-Version: 17.3
-Libs: -L${libdir} -lGLESv1_CM
-Libs.private: -lm -lpthread -ldl
-Cflags: -I${includedir}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1_cm.pc b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1_cm.pc
deleted file mode 100644
index 1547b4c82..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv1_cm.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=/usr/lib
-includedir=/usr/include
-
-Name: gles_cm
-Description: Mali OpenGL ES 1.1 CM library
-Requires.private:
-Version: 17.3
-Libs: -L${libdir} -lGLESv1_CM
-Libs.private: -lm -lpthread -ldl
-Cflags: -I${includedir}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv2.pc b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv2.pc
deleted file mode 100644
index a0a84f233..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/files/glesv2.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=/usr/lib
-includedir=/usr/include
-
-Name: glesv2
-Description: MALI OpenGL ES 2.0 library
-Requires.private:
-Version: 17.3
-Libs: -L${libdir} -lGLESv2
-Libs.private: -lm -lpthread -ldl
-Cflags: -I${includedir}
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
deleted file mode 100644
index 5c45b2baf..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
+++ /dev/null
@@ -1,201 +0,0 @@
-DESCRIPTION = "libGLES for ZynqMP with Mali 400"
-
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://EULA;md5=82e466d0ed92c5a15f568dbe6b31089c"
-
-inherit features_check update-alternatives
-
-ANY_OF_DISTRO_FEATURES = "x11 fbdev wayland"
-
-PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https"
-BRANCH ?= "rel-v2020.2"
-SRCREV ?= "da73805e3e011382c4d014ac10037cd193aaa9a0"
-BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
-
-PV = "r9p0-01rel0"
-SRC_URI = " \
- ${REPO};${BRANCHARG} \
- file://egl.pc \
- file://glesv1_cm.pc \
- file://glesv1.pc \
- file://glesv2.pc \
- file://gbm.pc \
- "
-
-COMPATIBLE_MACHINE = "^$"
-COMPATIBLE_MACHINE_zynqmpeg = "zynqmpeg"
-COMPATIBLE_MACHINE_zynqmpev = "zynqmpev"
-
-PACKAGE_ARCH = "${SOC_VARIANT_ARCH}"
-
-
-S = "${WORKDIR}/git"
-
-# If were switching at runtime, we would need all RDEPENDS needed for all backends available
-X11RDEPENDS = "libxdamage libxext libx11 libdrm libxfixes"
-X11DEPENDS = "libxdamage libxext virtual/libx11 libdrm libxfixes"
-
-# Don't install runtime dependencies for other backends unless the DISTRO supports it
-RDEPENDS_${PN} = " \
- kernel-module-mali \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11RDEPENDS}', '', d)} \
-"
-
-# We dont build anything but we want to avoid QA warning build-deps
-DEPENDS = "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland libdrm', '', d)} \
-"
-
-
-# x11 is default, set to "fbdev" , "wayland", or "headless" if required
-MALI_BACKEND_DEFAULT ?= "x11"
-
-USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-USE_FB = "${@bb.utils.contains("DISTRO_FEATURES", "fbdev", "yes", "no", d)}"
-USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
-
-MONOLITHIC_LIBMALI = "libMali.so.9.0"
-
-do_install() {
- #Identify the ARCH type
- ${TARGET_PREFIX}gcc --version > ARCH_PLATFORM
- if grep -q aarch64 "ARCH_PLATFORM"; then
- ARCH_PLATFORM_DIR=aarch64-linux-gnu
- else
- ARCH_PLATFORM_DIR=arm-linux-gnueabihf
- fi
-
- # install headers
- install -d -m 0655 ${D}${includedir}/EGL
- install -m 0644 ${S}/${PV}/glesHeaders/EGL/*.h ${D}${includedir}/EGL/
- install -d -m 0655 ${D}${includedir}/GLES
- install -m 0644 ${S}/${PV}/glesHeaders/GLES/*.h ${D}${includedir}/GLES/
- install -d -m 0655 ${D}${includedir}/GLES2
- install -m 0644 ${S}/${PV}/glesHeaders/GLES2/*.h ${D}${includedir}/GLES2/
- install -d -m 0655 ${D}${includedir}/KHR
- install -m 0644 ${S}/${PV}/glesHeaders/KHR/*.h ${D}${includedir}/KHR/
-
- install -d ${D}${libdir}/pkgconfig
- install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/egl.pc
- install -m 0644 ${WORKDIR}/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
- install -m 0644 ${WORKDIR}/glesv1.pc ${D}${libdir}/pkgconfig/glesv1.pc
- install -m 0644 ${WORKDIR}/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
-
- install -d ${D}${libdir}
- install -d ${D}${includedir}
-
- cp -a --no-preserve=ownership ${S}/${PV}/${ARCH_PLATFORM_DIR}/common/*.so* ${D}${libdir}
-
- install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/headless/${MONOLITHIC_LIBMALI}
- ln -snf headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI}
-
- if [ "${USE_FB}" = "yes" ]; then
- install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/fbdev/${MONOLITHIC_LIBMALI}
- if [ "${MALI_BACKEND_DEFAULT}" = "fbdev" ]; then
- ln -snf fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI}
- fi
- fi
- if [ "${USE_X11}" = "yes" ]; then
- install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/x11/${MONOLITHIC_LIBMALI} ${D}${libdir}/x11/${MONOLITHIC_LIBMALI}
- if [ "${MALI_BACKEND_DEFAULT}" = "x11" ]; then
- ln -snf x11/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI}
- fi
- else
- # We cant rely on the fact that all apps will use pkgconfig correctly
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if (1)/' ${D}${includedir}/EGL/eglplatform.h
- fi
- if [ "${USE_WL}" = "yes" ]; then
- install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/
- install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc
- install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/wayland/${MONOLITHIC_LIBMALI}
- if [ "${MALI_BACKEND_DEFAULT}" = "wayland" ]; then
- ln -snf wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI}
- fi
- fi
-}
-
-
-# We need separate packages to provide multiple alternatives, at this point we install
-# everything on the default one but that can be split if necessary
-PACKAGES += "${PN}-x11 ${PN}-fbdev ${PN}-wayland ${PN}-headless"
-
-# This is default/common for all alternatives
-ALTERNATIVE_LINK_NAME[libmali-xlnx] = "${libdir}/${MONOLITHIC_LIBMALI}"
-
-
-# Declare alternatives and corresponding library location
-ALTERNATIVE_${PN}-x11 = "libmali-xlnx"
-ALTERNATIVE_TARGET_libmali-xlnx-x11[libmali-xlnx] = "${libdir}/x11/${MONOLITHIC_LIBMALI}"
-
-ALTERNATIVE_${PN}-fbdev = "libmali-xlnx"
-ALTERNATIVE_TARGET_libmali-xlnx-fbdev[libmali-xlnx] = "${libdir}/fbdev/${MONOLITHIC_LIBMALI}"
-
-ALTERNATIVE_${PN}-wayland = "libmali-xlnx"
-ALTERNATIVE_TARGET_libmali-xlnx-wayland[libmali-xlnx] = "${libdir}/wayland/${MONOLITHIC_LIBMALI}"
-
-ALTERNATIVE_${PN}-headless = "libmali-xlnx"
-ALTERNATIVE_TARGET_libmali-xlnx-headless[libmali-xlnx] = "${libdir}/headless/${MONOLITHIC_LIBMALI}"
-
-# Set priorities according to what we prveiously defined
-ALTERNATIVE_PRIORITY_libmali-xlnx-x11[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "x11", "20", "10", d)}"
-ALTERNATIVE_PRIORITY_libmali-xlnx-fbdev[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "fbdev", "20", "10", d)}"
-ALTERNATIVE_PRIORITY_libmali-xlnx-wayland[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "wayland", "20", "10", d)}"
-
-# If misconfigured, fallback to headless
-ALTERNATIVE_PRIORITY_libmali-xlnx-headless[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "headless", "20", "15", d)}"
-
-
-# Package gets renamed on the debian class, but we want to keep -xlnx
-DEBIAN_NOAUTONAME_libmali-xlnx = "1"
-
-# Update alternatives will actually have separate postinst scripts (one for each package)
-# This wont work for us, so we create a common postinst script and we pass that as the general
-# libmali-xlnx postinst script, but we defer execution to run on first boot (pkg_postinst_ontarget).
-# This will avoid ldconfig removing the symbolic links when creating the root filesystem.
-python populate_packages_updatealternatives_append () {
- # We need to remove the 'fake' libmali-xlnx before creating any links
- libdir = d.getVar('libdir')
- common_postinst = "#!/bin/sh\nrm " + libdir + "/${MONOLITHIC_LIBMALI}\n"
- for pkg in (d.getVar('PACKAGES') or "").split():
- # Not all packages provide an alternative (e.g. ${PN}-lic)
- postinst = d.getVar('pkg_postinst_%s' % pkg)
- if postinst:
- old_postinst = postinst
- new_postinst = postinst.replace('#!/bin/sh','')
- common_postinst += new_postinst
- d.setVar('pkg_postinst_ontarget_%s' % 'libmali-xlnx', common_postinst)
-}
-
-
-# Inhibit warnings about files being stripped
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_SYSROOT_STRIP = "1"
-
-RREPLACES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
-RPROVIDES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
-RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
-
-# These libraries shouldn't get installed in world builds unless something
-# explicitly depends upon them.
-EXCLUDE_FROM_WORLD = "1"
-FILES_${PN} += "${libdir}/*"
-
-do_package_append() {
-
- shlibswork_dir = d.getVar('SHLIBSWORKDIR')
- pkg_filename = d.getVar('PN') + ".list"
- shlibs_file = os.path.join(shlibswork_dir, pkg_filename)
- lines = ""
- with open(shlibs_file, "r") as f:
- lines = f.readlines()
- with open(shlibs_file, "w") as f:
- for line in lines:
- if d.getVar('MALI_BACKEND_DEFAULT') in line.strip("\n"):
- f.write(line)
-}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libglu/libglu_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libglu/libglu_%.bbappend
deleted file mode 100644
index 56924658c..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/libglu/libglu_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-DEPENDS_append_zynqmp = " virtual/libgles2"
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
deleted file mode 100644
index 747ec724c..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "A Mali 400 Linux Kernel module"
-SECTION = "kernel/modules"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = " \
- file://linux/license/gpl/mali_kernel_license.h;md5=f5af2d61f4c1eb262cb6a557aaa1070a \
- "
-
-PV = "r9p0-01rel0"
-
-SRC_URI = " \
- https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-utgard-gpu/DX910-SW-99002-${PV}.tgz \
- file://0001-Change-Makefile-to-be-compatible-with-Yocto.patch \
- file://0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch \
- file://0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch \
- file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \
- file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \
- file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.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\
- file://0015-fix-driver-failed-to-check-map-error.patch \
- file://0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch \
- file://0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch \
- file://0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch \
- file://0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch \
- "
-SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c"
-SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b"
-
-inherit module
-
-PARALLEL_MAKE = "-j 1"
-
-S = "${WORKDIR}/DX910-SW-99002-${PV}/driver/src/devicedrv/mali"
-
-COMPATIBLE_MACHINE = "^$"
-COMPATIBLE_MACHINE_zynqmpeg = "zynqmpeg"
-COMPATIBLE_MACHINE_zynqmpev = "zynqmpev"
-
-PACKAGE_ARCH = "${SOC_VARIANT_ARCH}"
-
-EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \
- ARCH="${ARCH}" \
- BUILD=release \
- MALI_PLATFORM="arm" \
- USING_DT=1 \
- MALI_SHARED_INTERRUPTS=1 \
- CROSS_COMPILE="${TARGET_PREFIX}" \
- MALI_QUIET=1 \
- '
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch
deleted file mode 100644
index 3c82f602a..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 6d283b9aa3f7fb761da4cb076b47a62275fc4caa Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Tue, 21 Nov 2017 03:57:25 -0800
-Subject: [PATCH 1/9] Change Makefile to be compatible with Yocto
-
-Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
-Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Upstream Status: Inappropriate [Xilinx specific]
----
- driver/src/devicedrv/mali/Makefile | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile
-index 5a259fe..a6dd94c 100644
---- Makefile
-+++ b/Makefile
-@@ -89,7 +89,11 @@ endif
- # Define host system directory
- KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build
-
--include $(KDIR)/.config
-+ifeq ($(O),)
-+ -include $(KDIR)/.config
-+else
-+ -include $(O)/.config
-+endif
-
- ifeq ($(ARCH), arm)
- # when compiling for ARM we're cross compiling
-@@ -204,9 +208,12 @@ EXTRA_DEFINES += -DMALI_MEM_SWAP_TRACKING=1
- endif
-
- all: $(UMP_SYMVERS_FILE)
-- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules
-+ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules
- @rm $(FILES_PREFIX)__malidrv_build_info.c $(FILES_PREFIX)__malidrv_build_info.o
-
-+modules_install:
-+ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules_install
-+
- clean:
- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
-
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch
deleted file mode 100644
index 0a7b6736f..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From f27aab2b0e4d5dea9b5a0e4648c142257940c428 Mon Sep 17 00:00:00 2001
-From: Hyun Kwon <hyun.kwon@xilinx.com>
-Date: Thu, 25 Jun 2015 17:14:42 -0700
-Subject: [PATCH 2/9] staging: mali: r8p0-01rel0: Add the ZYNQ/ZYNQMP platform
-
-Add the number of PP cores that is required for Zynq/ZynqMP configuration.
-
-Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
-Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-Upstream Status: Inappropriate [Xilinx specific]
----
- driver/src/devicedrv/mali/platform/arm/arm.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c
-index 4e09aca..fac99bc 100644
---- platform/arm/arm.c
-+++ b/platform/arm/arm.c
-@@ -261,6 +261,10 @@ static struct mali_gpu_device_data mali_gpu_data = {
- .dedicated_mem_start = 0x80000000, /* Physical start address (use 0xD0000000 for old indirect setup) */
- .dedicated_mem_size = 0x10000000, /* 256MB */
- #endif
-+#if defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP)
-+ .fb_start = 0x00000000,
-+ .fb_size = 0xfffff000,
-+#else
- #if defined(CONFIG_ARM64)
- /* Some framebuffer drivers get the framebuffer dynamically, such as through GEM,
- * in which the memory resource can't be predicted in advance.
-@@ -271,6 +275,7 @@ static struct mali_gpu_device_data mali_gpu_data = {
- .fb_start = 0xe0000000,
- .fb_size = 0x01000000,
- #endif
-+#endif /* !defined(CONFIG_ARCH_ZYNQ) && !defined(CONFIG_ARCH_ZYNQMP) */
- .control_interval = 1000, /* 1000ms */
- .utilization_callback = mali_gpu_utilization_callback,
- .get_clock_info = NULL,
-@@ -505,6 +510,11 @@ int mali_platform_device_init(struct platform_device *device)
- mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */
- }
- }
-+#elif defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP)
-+
-+ MALI_DEBUG_PRINT(4, ("Registering Zynq/ZynqMP Mali-400 device\n"));
-+ num_pp_cores = 2;
-+
- #endif
-
- /* After kernel 3.15 device tree will default set dev
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch
deleted file mode 100644
index 98aa6ac93..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d6e44bbf8d1377f78481f611dec237e8d24baf74 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Tue, 21 Nov 2017 04:00:27 -0800
-Subject: [PATCH 3/9] staging: mali: r8p0-01rel0: Remove unused trace macros
-
-TRACE_SYSTEM_STRING is not need in each trace file anymore.
-
-Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Upstream Status: Pending
----
- driver/src/devicedrv/mali/linux/mali_linux_trace.h | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_linux_trace.h b/driver/src/devicedrv/mali/linux/mali_linux_trace.h
-index 7f0b19d..33cb1ca 100644
---- linux/mali_linux_trace.h
-+++ b/linux/mali_linux_trace.h
-@@ -13,13 +13,11 @@
-
- #include <linux/types.h>
-
--#include <linux/stringify.h>
- #include <linux/tracepoint.h>
-
- #undef TRACE_SYSTEM
- #define TRACE_SYSTEM mali
- #ifndef TRACEPOINTS_ENABLED
--#define TRACE_SYSTEM_STRING __stringfy(TRACE_SYSTEM)
- #endif
- #define TRACE_INCLUDE_PATH .
- #define TRACE_INCLUDE_FILE mali_linux_trace
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch
deleted file mode 100644
index c5c496796..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2f5e8944357f43fbde4cb642c6ee4a699c88efb5 Mon Sep 17 00:00:00 2001
-From: Hyun Kwon <hyun.kwon@xilinx.com>
-Date: Wed, 29 Jun 2016 09:14:37 -0700
-Subject: [PATCH 4/9] staging: mali: r8p0-01rel0: Don't include
- mali_read_phys() for zynq/zynqmp
-
-mali_read_phys() is not used with CONFIG_ARCH_ZYNQ and CONFIG_ARCH_ZYNQMP.
-
-Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
-Upstream Status: Inappropriate [Xilinx specific]
----
- driver/src/devicedrv/mali/platform/arm/arm.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c
-index fac99bc..62f9be6 100644
---- platform/arm/arm.c
-+++ b/platform/arm/arm.c
-@@ -38,7 +38,9 @@
- static int mali_core_scaling_enable = 0;
-
- void mali_gpu_utilization_callback(struct mali_gpu_utilization_data *data);
-+#if !(defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP))
- static u32 mali_read_phys(u32 phys_addr);
-+#endif
- #if defined(CONFIG_ARCH_REALVIEW)
- static void mali_write_phys(u32 phys_addr, u32 value);
- #endif
-@@ -578,6 +580,7 @@ int mali_platform_device_deinit(struct platform_device *device)
-
- #endif /* CONFIG_MALI_DT */
-
-+#if !(defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP))
- static u32 mali_read_phys(u32 phys_addr)
- {
- u32 phys_addr_page = phys_addr & 0xFFFFE000;
-@@ -592,6 +595,7 @@ static u32 mali_read_phys(u32 phys_addr)
-
- return ret;
- }
-+#endif
-
- #if defined(CONFIG_ARCH_REALVIEW)
- static void mali_write_phys(u32 phys_addr, u32 value)
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch
deleted file mode 100644
index 3d7846042..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From e67e20ec6ff0c9720d87844270421453c738066a Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Thu, 16 Feb 2017 12:15:58 -0800
-Subject: [PATCH 5/9] linux/mali_kernel_linux.c: Handle clock when probed and
- removed
-
-This patch will handle the clock through clock
-specifier for GPU PP0 and PP1.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Upstream Status: Inappropriate [Xilinx specific]
----
- .../src/devicedrv/mali/linux/mali_kernel_linux.c | 40 +++++++++++++++++++++-
- 1 file changed, 39 insertions(+), 1 deletion(-)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c
-index d7893a3..f15fb56 100644
---- linux/mali_kernel_linux.c
-+++ b/linux/mali_kernel_linux.c
-@@ -45,6 +45,14 @@
- #if defined(CONFIG_MALI400_INTERNAL_PROFILING)
- #include "mali_profiling_internal.h"
- #endif
-+
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+/* Initialize variables for clocks */
-+struct clk *clk_gpu;
-+struct clk *clk_gpu_pp0;
-+struct clk *clk_gpu_pp1;
-+#endif
-+
- #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
- #include "mali_osk_profiling.h"
- #include "mali_dvfs_policy.h"
-@@ -580,7 +588,23 @@ static int mali_probe(struct platform_device *pdev)
- }
- #endif
-
--
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+ /* Initialize clocks for GPU and PP */
-+ clk_gpu = devm_clk_get(&pdev->dev, "gpu");
-+ if (IS_ERR(clk_gpu))
-+ return PTR_ERR(clk_gpu);
-+ clk_prepare_enable(clk_gpu);
-+
-+ clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0");
-+ if (IS_ERR(clk_gpu_pp0))
-+ return PTR_ERR(clk_gpu_pp0);
-+ clk_prepare_enable(clk_gpu_pp0);
-+
-+ clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1");
-+ if (IS_ERR(clk_gpu_pp1))
-+ return PTR_ERR(clk_gpu_pp1);
-+ clk_prepare_enable(clk_gpu_pp1);
-+#endif
- if (_MALI_OSK_ERR_OK == _mali_osk_wq_init()) {
- /* Initialize the Mali GPU HW specified by pdev */
- if (_MALI_OSK_ERR_OK == mali_initialize_subsystems()) {
-@@ -608,6 +632,12 @@ static int mali_probe(struct platform_device *pdev)
- _mali_osk_wq_term();
- }
-
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+ clk_disable_unprepare(clk_gpu);
-+ clk_disable_unprepare(clk_gpu_pp0);
-+ clk_disable_unprepare(clk_gpu_pp1);
-+#endif
-+
- #ifdef CONFIG_MALI_DEVFREQ
- mali_devfreq_term(mdev);
- devfreq_init_failed:
-@@ -673,6 +703,14 @@ static int mali_remove(struct platform_device *pdev)
- mali_platform_device_deinit(mali_platform_device);
- #endif
- mali_platform_device = NULL;
-+
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+ /* Remove clock */
-+ clk_disable_unprepare(clk_gpu);
-+ clk_disable_unprepare(clk_gpu_pp0);
-+ clk_disable_unprepare(clk_gpu_pp1);
-+#endif
-+
- return 0;
- }
-
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch
deleted file mode 100644
index 3e1745fd5..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ed7242238151c12029c566d1974058c579d8ae3d Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Wed, 25 Jan 2017 10:00:33 -0800
-Subject: [PATCH 6/9] arm.c: global variable dma_ops is removed from the kernel
- 4.7
-
-Refer kernel commit 1dccb598df549d892b6450c261da54cdd7af44b4, the global
-dma_ops variable and the special-casing for ACPI is removed , and just
-returns the dma ops that got set for the device, or the dummy_dma_ops
-if none were present.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Upstream Status: Pending
----
- driver/src/devicedrv/mali/platform/arm/arm.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c
-index 62f9be6..57ca989 100644
---- platform/arm/arm.c
-+++ b/platform/arm/arm.c
-@@ -529,8 +529,9 @@ int mali_platform_device_init(struct platform_device *device)
- */
- if (!device->dev.dma_mask)
- device->dev.dma_mask = &device->dev.coherent_dma_mask;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0))
- device->dev.archdata.dma_ops = dma_ops;
--
-+#endif
- err = platform_device_add_data(device, &mali_gpu_data, sizeof(mali_gpu_data));
-
- if (0 == err) {
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch
deleted file mode 100644
index 98a86c883..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 58e2c55176f1a146781430b2a570c8ce5f80d426 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Mon, 28 Aug 2017 09:40:37 -0700
-Subject: [PATCH] common/mali_pm.c: Add PM runtime barrier after removing
- suspend
-
-Runtime PM suspend "put" results in addition of PM suspend
-API in work queue. This barrier API will remove it from
-the work queue.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Upstream-Status: Pending
----
- driver/src/devicedrv/mali/common/mali_pm.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/driver/src/devicedrv/mali/common/mali_pm.c b/driver/src/devicedrv/mali/common/mali_pm.c
-index 858c689..62a1e5f 100644
---- common/mali_pm.c
-+++ b/common/mali_pm.c
-@@ -301,6 +301,7 @@ void mali_pm_init_end(void)
- }
-
- _mali_osk_pm_dev_ref_put();
-+ _mali_osk_pm_dev_barrier();
- }
-
- void mali_pm_update_sync(void)
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch
deleted file mode 100644
index 38ab4042d..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From aeff13ad9e9ef73172a9325f669aefd3c0403dbb Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Date: Wed, 21 Feb 2018 16:52:15 -0800
-Subject: [PATCH] linux/mali_kernel_linux.c: Enable/disable clock for runtime
- resume/suspend
-
-Enable/Disable the clock for GP,PP0 and PP1 during runtime
-resume/suspend.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
-Reviewed-by: Hyun Kwon <hyunk@xilinx.com>
-Upstream Status: Inappropriate [Xilinx specific]
----
- .../src/devicedrv/mali/linux/mali_kernel_linux.c | 65 ++++++++++++++++++----
- 1 file changed, 54 insertions(+), 11 deletions(-)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c
-index f15fb56..e61f33b 100644
---- linux/mali_kernel_linux.c
-+++ b/linux/mali_kernel_linux.c
-@@ -51,6 +51,7 @@
- struct clk *clk_gpu;
- struct clk *clk_gpu_pp0;
- struct clk *clk_gpu_pp1;
-+mali_bool clk_enabled;
- #endif
-
- #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
-@@ -281,6 +282,46 @@ struct file_operations mali_fops = {
- .mmap = mali_mmap
- };
-
-+static int mali_enable_clk(void)
-+{
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+ int err = 0;
-+
-+ if (clk_enabled)
-+ return 0;
-+
-+ clk_enabled = MALI_TRUE;
-+ err = clk_prepare_enable(clk_gpu);
-+ if (err) {
-+ MALI_PRINT_ERROR(("Could not enable clock for GP\n\r"));
-+ return err;
-+ }
-+ err = clk_prepare_enable(clk_gpu_pp0);
-+ if (err) {
-+ MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r"));
-+ return err;
-+ }
-+ err = clk_prepare_enable(clk_gpu_pp1);
-+ if (err) {
-+ MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r"));
-+ return err;
-+ }
-+#endif
-+ return 0;
-+}
-+
-+static void mali_disable_clk(void)
-+{
-+#if defined(CONFIG_ARCH_ZYNQMP)
-+ if (clk_enabled) {
-+ clk_enabled = MALI_FALSE;
-+ clk_disable_unprepare(clk_gpu);
-+ clk_disable_unprepare(clk_gpu_pp0);
-+ clk_disable_unprepare(clk_gpu_pp1);
-+ }
-+#endif
-+}
-+
- #if MALI_ENABLE_CPU_CYCLES
- void mali_init_cpu_time_counters(int reset, int enable_divide_by_64)
- {
-@@ -593,18 +634,19 @@ static int mali_probe(struct platform_device *pdev)
- clk_gpu = devm_clk_get(&pdev->dev, "gpu");
- if (IS_ERR(clk_gpu))
- return PTR_ERR(clk_gpu);
-- clk_prepare_enable(clk_gpu);
-
- clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0");
- if (IS_ERR(clk_gpu_pp0))
- return PTR_ERR(clk_gpu_pp0);
-- clk_prepare_enable(clk_gpu_pp0);
-
- clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1");
- if (IS_ERR(clk_gpu_pp1))
- return PTR_ERR(clk_gpu_pp1);
-- clk_prepare_enable(clk_gpu_pp1);
- #endif
-+
-+ err = mali_enable_clk();
-+ if (err)
-+ return err;
- if (_MALI_OSK_ERR_OK == _mali_osk_wq_init()) {
- /* Initialize the Mali GPU HW specified by pdev */
- if (_MALI_OSK_ERR_OK == mali_initialize_subsystems()) {
-@@ -632,11 +674,6 @@ static int mali_probe(struct platform_device *pdev)
- _mali_osk_wq_term();
- }
-
--#if defined(CONFIG_ARCH_ZYNQMP)
-- clk_disable_unprepare(clk_gpu);
-- clk_disable_unprepare(clk_gpu_pp0);
-- clk_disable_unprepare(clk_gpu_pp1);
--#endif
-
- #ifdef CONFIG_MALI_DEVFREQ
- mali_devfreq_term(mdev);
-@@ -644,6 +681,7 @@ devfreq_init_failed:
- mali_pm_metrics_term(mdev);
- pm_metrics_init_failed:
- clk_disable_unprepare(mdev->clock);
-+ mali_disable_clk();
- clock_prepare_failed:
- clk_put(mdev->clock);
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && defined(CONFIG_OF) \
-@@ -706,9 +744,7 @@ static int mali_remove(struct platform_device *pdev)
-
- #if defined(CONFIG_ARCH_ZYNQMP)
- /* Remove clock */
-- clk_disable_unprepare(clk_gpu);
-- clk_disable_unprepare(clk_gpu_pp0);
-- clk_disable_unprepare(clk_gpu_pp1);
-+ mali_disable_clk();
- #endif
-
- return 0;
-@@ -816,6 +852,8 @@ static int mali_driver_runtime_suspend(struct device *dev)
- devfreq_suspend_device(mdev->devfreq);
- #endif
-
-+ mali_disable_clk();
-+
- return 0;
- } else {
- return -EBUSY;
-@@ -824,6 +862,11 @@ static int mali_driver_runtime_suspend(struct device *dev)
-
- static int mali_driver_runtime_resume(struct device *dev)
- {
-+ int err ;
-+
-+ err = mali_enable_clk();
-+ if (err)
-+ return err;
- #ifdef CONFIG_MALI_DEVFREQ
- struct mali_device *mdev = dev_get_drvdata(dev);
- if (!mdev)
---
-2.7.4
-
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
deleted file mode 100644
index 24f0a22c4..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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
deleted file mode 100644
index c28a83f47..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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
deleted file mode 100644
index a7c1d5cc6..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-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/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch
deleted file mode 100644
index 5363c37e8..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: mali/linux/mali_memory_os_alloc.c
-===================================================================
---- mali.orig/linux/mali_memory_os_alloc.c
-+++ mali/linux/mali_memory_os_alloc.c
-@@ -239,8 +239,10 @@ int mali_mem_os_alloc_pages(mali_mem_os_
- /* Ensure page is flushed from CPU caches. */
- dma_addr = dma_map_page(&mali_platform_device->dev, new_page,
- 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
-- dma_unmap_page(&mali_platform_device->dev, dma_addr,
-- _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
-+ err = dma_mapping_error(&mali_platform_device->dev, dma_addr);
-+ if (likely(!err))
-+ dma_unmap_page(&mali_platform_device->dev, dma_addr,
-+ _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
- dma_addr = dma_map_page(&mali_platform_device->dev, new_page,
- 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL);
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch
deleted file mode 100644
index dc8bbebf4..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 8cf1dd43f3f25cb4afb84dfc3b0e7c02bc8f7f0c Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Mon, 24 Feb 2020 18:19:37 -0800
-Subject: [LINUX][rel-v2020.1][PATCH v1 1/3] mali_memory_secure: Kernel 5.0
- onwards 'access_ok' API does not take 'type' as input parameter
-
-'access_ok' no longer needs 'type' as input paramter from kernel 5.0
-onwards.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
----
- driver/src/devicedrv/mali/linux/mali_ukk_mem.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_ukk_mem.c b/driver/src/devicedrv/mali/linux/mali_ukk_mem.c
-index 4ec57dc..270bb6d 100644
---- linux/mali_ukk_mem.c
-+++ b/linux/mali_ukk_mem.c
-@@ -207,8 +207,13 @@ int mem_write_safe_wrapper(struct mali_session_data *session_data, _mali_uk_mem_
- kargs.ctx = (uintptr_t)session_data;
-
- /* Check if we can access the buffers */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
-+ if (!access_ok((const void __user *)kargs.dest, kargs.size)
-+ || !access_ok((const void __user *)kargs.src, kargs.size)) {
-+#else
- if (!access_ok(VERIFY_WRITE, kargs.dest, kargs.size)
- || !access_ok(VERIFY_READ, kargs.src, kargs.size)) {
-+#endif
- return -EINVAL;
- }
-
-@@ -266,7 +271,11 @@ int mem_dump_mmu_page_table_wrapper(struct mali_session_data *session_data, _mal
- goto err_exit;
-
- user_buffer = (void __user *)(uintptr_t)kargs.buffer;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
-+ if (!access_ok(user_buffer, kargs.size))
-+#else
- if (!access_ok(VERIFY_WRITE, user_buffer, kargs.size))
-+#endif
- goto err_exit;
-
- /* allocate temporary buffer (kernel side) to store mmu page table info */
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch
deleted file mode 100644
index 9c4bbee9f..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 953cab73b8bc487da330aa454abd7f8c7466737e Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Mon, 24 Feb 2020 18:32:16 -0800
-Subject: [LINUX][rel-v2020.1][PATCH v1 2/3] Support for vm_insert_pfn
- deprecated from kernel 4.20
-
-From kernel 4.20 onwards, support for vm_insert_pfn is deprecated.
-Hence, replace the same with vmf_insert_pfn.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
----
- .../devicedrv/mali/linux/mali_memory_block_alloc.c | 6 +++++-
- driver/src/devicedrv/mali/linux/mali_memory_cow.c | 14 ++++++++++++--
- .../src/devicedrv/mali/linux/mali_memory_os_alloc.c | 20 +++++++++++++++++---
- driver/src/devicedrv/mali/linux/mali_memory_secure.c | 7 ++++++-
- 4 files changed, 40 insertions(+), 7 deletions(-)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_memory_block_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_block_alloc.c
-index 0c5b6c3..e528699 100644
---- linux/mali_memory_block_alloc.c
-+++ b/linux/mali_memory_block_alloc.c
-@@ -309,9 +309,13 @@ int mali_mem_block_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *v
-
- list_for_each_entry(m_page, &block_mem->pfns, list) {
- MALI_DEBUG_ASSERT(m_page->type == MALI_PAGE_NODE_BLOCK);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page));
--
- if (unlikely(0 != ret)) {
-+#endif
- return -EFAULT;
- }
- addr += _MALI_OSK_MALI_PAGE_SIZE;
-diff --git a/driver/src/devicedrv/mali/linux/mali_memory_cow.c b/driver/src/devicedrv/mali/linux/mali_memory_cow.c
-index f1d44fe..1dae1d6 100644
---- linux/mali_memory_cow.c
-+++ b/linux/mali_memory_cow.c
-@@ -532,9 +532,14 @@ int mali_mem_cow_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *vma
- * flush which makes it way slower than remap_pfn_range or vm_insert_pfn.
- ret = vm_insert_page(vma, addr, page);
- */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page));
--
- if (unlikely(0 != ret)) {
-+#endif
-+
- return ret;
- }
- addr += _MALI_OSK_MALI_PAGE_SIZE;
-@@ -569,9 +574,14 @@ _mali_osk_errcode_t mali_mem_cow_cpu_map_pages_locked(mali_mem_backend *mem_bken
-
- list_for_each_entry(m_page, &cow->pages, list) {
- if ((count >= offset) && (count < offset + num)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, vaddr, _mali_page_node_get_pfn(m_page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, vaddr, _mali_page_node_get_pfn(m_page));
--
- if (unlikely(0 != ret)) {
-+#endif
-+
- if (count == offset) {
- return _MALI_OSK_ERR_FAULT;
- } else {
-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 3fb6f05..7de3920 100644
---- linux/mali_memory_os_alloc.c
-+++ b/linux/mali_memory_os_alloc.c
-@@ -378,9 +378,14 @@ int mali_mem_os_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *vma)
- ret = vm_insert_page(vma, addr, page);
- */
- page = m_page->page;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, addr, page_to_pfn(page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, addr, page_to_pfn(page));
--
- if (unlikely(0 != ret)) {
-+#endif
-+
- return -EFAULT;
- }
- addr += _MALI_OSK_MALI_PAGE_SIZE;
-@@ -416,9 +421,13 @@ _mali_osk_errcode_t mali_mem_os_resize_cpu_map_locked(mali_mem_backend *mem_bken
-
- vm_end -= _MALI_OSK_MALI_PAGE_SIZE;
- if (mapping_page_num > 0) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, vm_end, page_to_pfn(m_page->page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, vm_end, page_to_pfn(m_page->page));
--
- if (unlikely(0 != ret)) {
-+#endif
- /*will return -EBUSY If the page has already been mapped into table, but it's OK*/
- if (-EBUSY == ret) {
- break;
-@@ -439,9 +448,14 @@ _mali_osk_errcode_t mali_mem_os_resize_cpu_map_locked(mali_mem_backend *mem_bken
- list_for_each_entry(m_page, &os_mem->pages, list) {
- if (count >= offset) {
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, vstart, page_to_pfn(m_page->page));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, vstart, page_to_pfn(m_page->page));
--
- if (unlikely(0 != ret)) {
-+#endif
-+
- /*will return -EBUSY If the page has already been mapped into table, but it's OK*/
- if (-EBUSY == ret) {
- break;
-diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c
-index 5546304..cebd1c8 100644
---- linux/mali_memory_secure.c
-+++ b/linux/mali_memory_secure.c
-@@ -132,9 +132,14 @@ int mali_mem_secure_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *
- MALI_DEBUG_ASSERT(0 == size % _MALI_OSK_MALI_PAGE_SIZE);
-
- for (j = 0; j < size / _MALI_OSK_MALI_PAGE_SIZE; j++) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ ret = vmf_insert_pfn(vma, addr, PFN_DOWN(phys));
-+ if (unlikely(VM_FAULT_ERROR & ret)) {
-+#else
- ret = vm_insert_pfn(vma, addr, PFN_DOWN(phys));
--
- if (unlikely(0 != ret)) {
-+#endif
-+
- return -EFAULT;
- }
- addr += _MALI_OSK_MALI_PAGE_SIZE;
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch
deleted file mode 100644
index 9797db629..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ad5c569f0cc40698699fc2f2c1db3ceb9f8b8f35 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Tue, 25 Feb 2020 11:36:01 -0800
-Subject: [LINUX][rel-v2020.1][PATCH v1 3/3] Change return type to vm_fault_t
- for fault handler
-
-From kernel 4.17 onwards the return type of fault handler for
-vm_operations is of type 'vm_fault_t'.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
----
- driver/src/devicedrv/mali/linux/mali_memory.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_memory.c b/driver/src/devicedrv/mali/linux/mali_memory.c
-index c0f0982..2b2b209 100644
---- linux/mali_memory.c
-+++ b/linux/mali_memory.c
-@@ -70,7 +70,9 @@ static void mali_mem_vma_close(struct vm_area_struct *vma)
- }
- }
-
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
-+static vm_fault_t mali_mem_vma_fault(struct vm_fault *vmf)
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
- static int mali_mem_vma_fault(struct vm_fault *vmf)
- #else
- static int mali_mem_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch
deleted file mode 100644
index 154bb673e..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c6a6b39cea3fdfd91cae7f2a4ef6f36d2c55fdd6 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Tue, 25 Feb 2020 15:17:17 -0800
-Subject: [LINUX][rel-v2020.1][PATCH v1] "get_monotonic_boottime(&ts)"
- deprecated from kernel 4.20 onwards
-
-As "get_monotonic_boottime(&ts)" is deprecated, replace the same with
-"ktime_get_boottime_ts64(&ts)". Refer kernel commit ID
-976516404ff3fab2a8caa8bd6f5efc1437fed0b8
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
----
- driver/src/devicedrv/mali/linux/mali_osk_time.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/driver/src/devicedrv/mali/linux/mali_osk_time.c b/driver/src/devicedrv/mali/linux/mali_osk_time.c
-index 03046a5..bfcbf7f 100644
---- linux/mali_osk_time.c
-+++ b/linux/mali_osk_time.c
-@@ -53,7 +53,13 @@ u64 _mali_osk_time_get_ns(void)
-
- u64 _mali_osk_boot_time_get_ns(void)
- {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
-+ struct timespec64 tsval;
-+ ktime_get_boottime_ts64(&tsval);
-+ return (u64)timespec64_to_ns(&tsval);
-+#else
- struct timespec tsval;
- get_monotonic_boottime(&tsval);
- return (u64)timespec_to_ns(&tsval);
-+#endif
- }
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-demos_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-demos_%.bbappend
deleted file mode 100644
index febf1636d..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-demos_%.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-# OpenGL comes from libmali on ev/eg, when egl is enabled
-DEPENDS_MALI_XLNX = "${@bb.utils.contains('PACKAGECONFIG', 'egl', 'libmali-xlnx', '', d)}"
-PKG_ARCH_XLNX = "${@bb.utils.contains('PACKAGECONFIG', 'egl', '${SOC_VARIANT_ARCH}', '${TUNE_PKGARCH}', d)}"
-
-DEPENDS_append_zynqmpev = " ${DEPENDS_MALI_XLNX}"
-DEPENDS_append_zynqmpeg = " ${DEPENDS_MALI_XLNX}"
-
-PACKAGE_ARCH_zynqmpev = "${PKG_ARCH_XLNX}"
-PACKAGE_ARCH_zynqmpeg = "${PKG_ARCH_XLNX}"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-gl_%.bbappend
deleted file mode 100644
index bcfefa1e1..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/mesa/mesa-gl_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-do_install_append_zynqmp () {
- rm -rf ${D}${includedir}/KHR/*
-}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/wayland/weston_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/wayland/weston_%.bbappend
deleted file mode 100644
index febf1636d..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/wayland/weston_%.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-# OpenGL comes from libmali on ev/eg, when egl is enabled
-DEPENDS_MALI_XLNX = "${@bb.utils.contains('PACKAGECONFIG', 'egl', 'libmali-xlnx', '', d)}"
-PKG_ARCH_XLNX = "${@bb.utils.contains('PACKAGECONFIG', 'egl', '${SOC_VARIANT_ARCH}', '${TUNE_PKGARCH}', d)}"
-
-DEPENDS_append_zynqmpev = " ${DEPENDS_MALI_XLNX}"
-DEPENDS_append_zynqmpeg = " ${DEPENDS_MALI_XLNX}"
-
-PACKAGE_ARCH_zynqmpev = "${PKG_ARCH_XLNX}"
-PACKAGE_ARCH_zynqmpeg = "${PKG_ARCH_XLNX}"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch
deleted file mode 100644
index 33d33b0f5..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3fbb596e53524e78703b76c4fdc33cd6ac62f777 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Fri, 11 Dec 2020 16:21:38 -0800
-Subject: [PATCH] libweston: Remove substitute format for ARGB8888
-
-Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same
-as opaque substitute.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Upstream-Status : Inappropriate [Xilinx specific]
----
- libweston/pixel-formats.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c
-index 79dc709..ec2d3b7 100644
---- a/libweston/pixel-formats.c
-+++ b/libweston/pixel-formats.c
-@@ -193,7 +193,6 @@ static const struct pixel_format_info pixel_format_table[] = {
- {
- DRM_FORMAT(ARGB8888),
- BITS_RGBA_FIXED(8, 8, 8, 8),
-- .opaque_substitute = DRM_FORMAT_XRGB8888,
- .depth = 32,
- .bpp = 32,
- GL_FORMAT(GL_BGRA_EXT),
---
-2.17.1
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/weston.ini b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/weston.ini
deleted file mode 100644
index 2ff81795c..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/files/weston.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[core]
-idle-time=0
-
-gbm-format=rgb565
-
-require-input=false
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston-init%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston-init%.bbappend
deleted file mode 100644
index aaee7f5dc..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston-init%.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_prepend_zynqmp := "${THISDIR}/files:"
-
-SRC_URI_append_zynqmp = " file://weston.ini"
-
-do_install_append_zynqmp() {
- install -Dm 0700 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/weston.ini
-}
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend
deleted file mode 100644
index d1912a814..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend_zynqmp := "${THISDIR}/files:"
-
-SRC_URI_append_zynqmp = " file://0001-libweston-Remove-substitute-format-for-ARGB8888.patch"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch
deleted file mode 100644
index 2e0247944..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 497de8b16265468cacad880f4a371756924ae0c1 Mon Sep 17 00:00:00 2001
-From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
-Date: Tue, 14 Apr 2020 15:25:13 -0700
-Subject: [xf86-video-armsoc][PATCH v2] armsoc_driver.c: Bypass the exa layer
- to free the root pixmap
-
-Since the root pixmap was allocated through miCreateScreenResources,
-the exa layer is not aware of the pixmap resulting in the assertion
-to fail. Instead, we can directly invoke fbDestroyPixmap, thereby
-freeing the pixmap and avoiding a memory leak.
-
-Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
----
- src/armsoc_driver.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c
-index 3ace3c7..a4a1ba3 100644
---- a/src/armsoc_driver.c
-+++ b/src/armsoc_driver.c
-@@ -1259,7 +1259,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL)
- * we do it here, before calling the CloseScreen chain which would just free pScreen->devPrivate in fbCloseScreen()
- */
- if (pScreen->devPrivate) {
-- (void) (*pScreen->DestroyPixmap)(pScreen->devPrivate);
-+ fbDestroyPixmap (pScreen->devPrivate);
-+ armsoc_bo_unreference(pARMSOC->scanout);
- pScreen->devPrivate = NULL;
- }
-
---
-2.7.4
-
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch
deleted file mode 100644
index bf2169ee3..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 630a8ea035fe2f075f6ea7f4bad0928f5b541c80 Mon Sep 17 00:00:00 2001
-From: Hyun Kwon <hyun.kwon@xilinx.com>
-Date: Wed, 21 Jan 2015 11:53:19 -0800
-Subject: [PATCH] src: drmmode_xilinx: Add the dumb gem support for Xilinx
-
-Add the dumb gem support for Xilinx
-
-Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
-Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-Upstream-Status: Pending
----
- src/Makefile.am | 3 +-
- src/armsoc_driver.c | 1 +
- src/drmmode_driver.h | 1 +
- src/drmmode_xilinx/drmmode_xilinx.c | 76 +++++++++++++++++++++++++++++++++++++
- 4 files changed, 80 insertions(+), 1 deletion(-)
- create mode 100644 src/drmmode_xilinx/drmmode_xilinx.c
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 3b2601927c..db5f110fb2 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -43,7 +43,8 @@ armsoc_drv_ladir = @moduledir@/drivers
- DRMMODE_SRCS = drmmode_exynos/drmmode_exynos.c \
- drmmode_pl111/drmmode_pl111.c \
- drmmode_kirin/drmmode_kirin.c \
-- drmmode_sti/drmmode_sti.c
-+ drmmode_sti/drmmode_sti.c \
-+ drmmode_xilinx/drmmode_xilinx.c
-
-
- armsoc_drv_la_SOURCES = \
-diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c
-index 83e74a7ed1..3ace3c7be5 100644
---- a/src/armsoc_driver.c
-+++ b/src/armsoc_driver.c
-@@ -737,6 +737,7 @@ static struct drmmode_interface *get_drmmode_implementation(int drm_fd)
- &pl111_interface,
- &kirin_interface,
- &sti_interface,
-+ &xilinx_interface,
- };
- int i;
-
-diff --git a/src/drmmode_driver.h b/src/drmmode_driver.h
-index 879fc60ddc..18245d591a 100644
---- a/src/drmmode_driver.h
-+++ b/src/drmmode_driver.h
-@@ -106,6 +106,7 @@ extern struct drmmode_interface exynos_interface;
- extern struct drmmode_interface pl111_interface;
- extern struct drmmode_interface kirin_interface;
- extern struct drmmode_interface sti_interface;
-+extern struct drmmode_interface xilinx_interface;
-
-
- #endif
-diff --git a/src/drmmode_xilinx/drmmode_xilinx.c b/src/drmmode_xilinx/drmmode_xilinx.c
-new file mode 100644
-index 0000000000..f4faceb0b4
---- /dev/null
-+++ b/src/drmmode_xilinx/drmmode_xilinx.c
-@@ -0,0 +1,76 @@
-+/*
-+ * Xilinx X11 ARMSOC driver
-+ *
-+ * Author: Hyun Woo Kwon <hyun.kwon@xilinx.com>
-+ *
-+ * Copyright (C) 2014 Xilinx, Inc.
-+ *
-+ * Based on drmmode_exynos.c
-+ *
-+ * Copyright © 2013 ARM Limited.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ *
-+ */
-+
-+#include <stdlib.h>
-+
-+#include <drm.h>
-+#include <xf86drm.h>
-+
-+#include "../drmmode_driver.h"
-+
-+static int create_custom_gem(int fd, struct armsoc_create_gem *create_gem)
-+{
-+ struct drm_mode_create_dumb arg;
-+ int ret;
-+
-+ memset(&arg, 0, sizeof(arg));
-+ arg.height = create_gem->height;
-+ arg.width = create_gem->width;
-+ arg.bpp = create_gem->bpp;
-+
-+ ret = drmIoctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg);
-+ if (ret)
-+ return ret;
-+
-+ create_gem->height = arg.height;
-+ create_gem->width = arg.width;
-+ create_gem->bpp = arg.bpp;
-+ create_gem->handle = arg.handle;
-+ create_gem->pitch = arg.pitch;
-+ create_gem->size = arg.size;
-+
-+ return 0;
-+}
-+
-+struct drmmode_interface xilinx_interface = {
-+ "xlnx" /* name of drm driver */,
-+ 1 /* use_page_flip_events */,
-+ 1 /* use_early_display */,
-+ 0 /* cursor width */,
-+ 0 /* cursor_height */,
-+ 0 /* cursor padding */,
-+ HWCURSOR_API_NONE /* cursor_api */,
-+ NULL /* init_plane_for_cursor */,
-+ 0 /* vblank_query_supported */,
-+ create_custom_gem /* create_custom_gem */,
-+};
-+
---
-2.11.0
-
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
deleted file mode 100644
index 955398a3f..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/xf86-video-armsoc:"
-
-SRC_URI_append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \
- file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \
- "
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/zynqmp/xorg.conf b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/zynqmp/xorg.conf
deleted file mode 100644
index 9ef39462a..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/zynqmp/xorg.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-Section "InputDevice"
- Identifier "System Mouse"
- Driver "mouse"
- Option "Device" "/dev/input/mouse0"
-EndSection
-
-Section "InputDevice"
- Identifier "System Keyboard"
- Driver "kbd"
- Option "Device" "/dev/input/event0"
-EndSection
-
-Section "Device"
- Identifier "ZynqMP"
- Driver "armsoc"
- Option "DRI2" "true"
- Option "DRI2_PAGE_FLIP" "false"
- Option "DRI2_WAIT_VSYNC" "true"
- Option "SWcursorLCD" "false"
- Option "DEBUG" "false"
-EndSection
-
-Section "Screen"
- Identifier "DefaultScreen"
- Device "ZynqMP"
- DefaultDepth 16
-EndSection
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend
deleted file mode 100644
index 72d991c7e..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"