From eafa8684a3ccdbad39a3fcf8cf0b6d6d79d11c5c Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 22 Feb 2019 16:22:24 +0100 Subject: [PATCH] imx-gpu-viv: remove GPU driver kernel module and dependencies The driver now builds directly from the kernel source and the fixes are already included in the kernel tree so there is no need to build the module externally. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-6460 (cherry picked from commit a0990a7e1dcd03af239efb620b83b7dee126484e) --- .../conf/machine/include/imx-digi-base.inc | 1 - ...mmended-values-for-minimum-GPU-frequ.patch | 72 ---- .../Add-makefile.patch | 326 ------------------ .../kernel-module-imx-gpu-viv_%.bbappend | 7 - .../kernel-module-imx-gpu-viv_6.2.4.p2.3.bb | 20 -- .../imx-gpu-viv/imx-gpu-viv-v6.inc | 1 - 6 files changed, 427 deletions(-) delete mode 100644 meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch delete mode 100644 meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/Add-makefile.patch delete mode 100644 meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend delete mode 100644 meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p2.3.bb diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index bd5857043..9064a273c 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -51,7 +51,6 @@ MACHINE_SOCARCH_FILTER_append_mx8 = " \ INHERIT += "fsl-dynamic-packagearch" SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS_append = " \ - imx-gpu-viv->kernel-module-imx-gpu-viv \ libimxvpuapi->imx-vpu \ imx-vpuwrap->imx-vpu \ imx-codec->imx-vpu \ diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch deleted file mode 100644 index 4304905c8..000000000 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Arturo Buzarra -Date: Thu, 10 Jan 2019 17:57:54 +0000 -Subject: [PATCH] mxc: gpu: use recommended values for minimum GPU frequency - divisor - -Freescale recommends the following default minimum GPU frequency divisors -depending on the CPU family: - - 3 for Dual/Quad - - 8 for DualLite/Solo - -Adapted for the external Vivante GPU driver from commit a790ad3 in linux -git repository. - -Signed-off-by: Javier Viguera -Signed-off-by: Arturo Buzarra ---- - .../src/hal/os/linux/kernel/gc_hal_kernel_driver.c | 14 +++++++++++++- - .../src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c | 2 +- - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/src/hal/os/linux/kernel/gc_hal_kernel_driver.c b/src/hal/os/linux/kernel/gc_hal_kernel_driver.c -index 615939827730..7c9939c65836 100644 ---- a/src/hal/os/linux/kernel/gc_hal_kernel_driver.c -+++ b/src/hal/os/linux/kernel/gc_hal_kernel_driver.c -@@ -54,6 +54,7 @@ - - - #include -+#include - #include - #include - #include -@@ -214,7 +215,7 @@ static uint type = 0; - module_param(type, uint, 0664); - MODULE_PARM_DESC(type, "0 - Char Driver (Default), 1 - Misc Driver"); - --static int gpu3DMinClock = 1; -+static int gpu3DMinClock = 0; - - static int contiguousRequested = 0; - -@@ -986,6 +987,17 @@ static int gpu_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - _UpdateModuleParam(&moduleParam); - } - -+ /* If undefined, set Freescale recommended value. Else use the min freq. */ -+ if (gpu3DMinClock == 0) { -+ if (of_machine_is_compatible("fsl,imx6dl")) -+ gpu3DMinClock = 8; -+ else if (of_machine_is_compatible("fsl,imx6q") || -+ of_machine_is_compatible("fsl,imx6qp")) -+ gpu3DMinClock = 3; -+ else -+ gpu3DMinClock = 1; -+ } -+ - ret = drv_init(); - - if (!ret) -diff --git a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c -index 62624d69b4a4..4d1b1961838d 100644 ---- a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c -+++ b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c -@@ -124,7 +124,7 @@ extern int unregister_thermal_notifier(struct notifier_block *nb); - # define gcdFSL_CONTIGUOUS_SIZE (4 << 20) - #endif - --static int initgpu3DMinClock = 1; -+static int initgpu3DMinClock = 0; - module_param(initgpu3DMinClock, int, 0644); - - struct platform_device *pdevice; diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/Add-makefile.patch b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/Add-makefile.patch deleted file mode 100644 index 63f408c5a..000000000 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/Add-makefile.patch +++ /dev/null @@ -1,326 +0,0 @@ -Index: git/Makefile -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/Makefile 2017-06-27 12:07:11.931698672 -0500 -@@ -0,0 +1,17 @@ -+obj-m := galcore.o -+ -+SRC := $(shell pwd) -+ -+all: -+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC)/src AQROOT=${PWD}/src -+ cp $(SRC)/src/Module.symvers $(PWD) -+ cp $(SRC)/src/modules.order $(PWD) -+ -+modules_install: -+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC)/src modules_install -+ -+clean: -+ find . -name '*.o' -delete -+ rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c -+ rm -f Module.markers Module.symvers modules.order -+ rm -rf .tmp_versions Modules.symvers -Index: git/src/hal/kernel/arch/makefile.linux -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/src/hal/kernel/arch/makefile.linux 2017-06-27 11:44:06.004826232 -0500 -@@ -0,0 +1,91 @@ -+############################################################################## -+# -+# The MIT License (MIT) -+# -+# Copyright (c) 2014 - 2017 Vivante Corporation -+# -+# 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 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. -+# -+############################################################################## -+# -+# The GPL License (GPL) -+# -+# Copyright (C) 2014 - 2017 Vivante Corporation -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# -+############################################################################## -+# -+# Note: This software is released under dual MIT and GPL licenses. A -+# recipient may use this file under the terms of either the MIT license or -+# GPL License. If you wish to use only one license not the other, you can -+# indicate your decision by deleting one of the above license notices in your -+# version of this file. -+# -+############################################################################## -+ -+ -+# -+# Linux build file for architecture dependent kernel HAL layer. -+# -+ -+################################################################################ -+# Include common definitions. -+ -+include $(AQROOT)/makefile.linux.def -+ -+################################################################################ -+# Define a shortcut for the main target. -+ -+STATIC = 1 -+TARGET_NAME = libhalarchkernel.a -+ -+################################################################################ -+# Supply additional include directories. -+ -+INCLUDE += -I$(AQROOT)/hal/kernel/inc -+INCLUDE += -I$(AQROOT)/hal/kernel/inc -+INCLUDE += -I$(AQROOT)/hal/kernel -+INCLUDE += -I$(AQROOT)/hal/kernel/arch -+ifeq ($(VIVANTE_ENABLE_VG),1) -+INCLUDE += -I$(AQROOT)/hal/kernel/archvg -+endif -+ -+CFLAGS += $(INCLUDE) -Werror -ansi -+ -+ -+################################################################################ -+# Describe object files. -+ -+OBJECTS = $(OBJ_DIR)/gc_hal_kernel_context.o \ -+ $(OBJ_DIR)/gc_hal_kernel_hardware.o -+ -+include $(AQROOT)/common.target -Index: git/src/hal/kernel/archvg/makefile.linux -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/src/hal/kernel/archvg/makefile.linux 2017-06-27 11:44:06.004826232 -0500 -@@ -0,0 +1,91 @@ -+############################################################################## -+# -+# The MIT License (MIT) -+# -+# Copyright (c) 2014 - 2017 Vivante Corporation -+# -+# 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 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. -+# -+############################################################################## -+# -+# The GPL License (GPL) -+# -+# Copyright (C) 2014 - 2017 Vivante Corporation -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# -+############################################################################## -+# -+# Note: This software is released under dual MIT and GPL licenses. A -+# recipient may use this file under the terms of either the MIT license or -+# GPL License. If you wish to use only one license not the other, you can -+# indicate your decision by deleting one of the above license notices in your -+# version of this file. -+# -+############################################################################## -+ -+ -+# -+# Linux build file for architecture dependent kernel HAL layer. -+# -+ -+################################################################################ -+# Include common definitions. -+ -+include $(AQROOT)/makefile.linux.def -+ -+################################################################################ -+# Define a shortcut for the main target. -+ -+STATIC = 1 -+ -+TARGET_NAME = libhalarchkernelvg.a -+ -+################################################################################ -+# Supply additional include directories. -+ -+INCLUDE += -I$(AQROOT)/hal/inc -+INCLUDE += -I$(AQROOT)/hal/user -+INCLUDE += -I$(AQROOT)/hal/kernel -+INCLUDE += -I$(AQROOT)/hal/kernel/arch -+ifeq ($(VIVANTE_ENABLE_VG), 1) -+INCLUDE += -I$(AQROOT)/hal/kernel/archvg -+endif -+ -+CFLAGS += $(INCLUDE) -Werror -ansi -+ -+################################################################################ -+# Describe object files. -+ -+OBJECTS = $(OBJ_DIR)/gc_hal_kernel_hardware_vg.o \ -+ $(OBJ_DIR)/gc_hal_kernel_hardware_command_vg.o -+ -+include $(AQROOT)/common.target -Index: git/src/hal/kernel/makefile.linux -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/src/hal/kernel/makefile.linux 2017-06-27 11:44:06.004826232 -0500 -@@ -0,0 +1,107 @@ -+############################################################################## -+# -+# The MIT License (MIT) -+# -+# Copyright (c) 2014 - 2017 Vivante Corporation -+# -+# 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 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. -+# -+############################################################################## -+# -+# The GPL License (GPL) -+# -+# Copyright (C) 2014 - 2017 Vivante Corporation -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# -+############################################################################## -+# -+# Note: This software is released under dual MIT and GPL licenses. A -+# recipient may use this file under the terms of either the MIT license or -+# GPL License. If you wish to use only one license not the other, you can -+# indicate your decision by deleting one of the above license notices in your -+# version of this file. -+# -+############################################################################## -+ -+ -+# -+# Linux build file for architecture dependent kernel HAL layer. -+# -+# -+ -+ -+################################################################################ -+# Include common definitions. -+ -+include $(AQROOT)/makefile.linux.def -+ -+################################################################################ -+# Define a shortcut for the main target. -+ -+STATIC = 1 -+TARGET_NAME = libhalkernel.a -+ -+################################################################################ -+# Supply additional include directories. -+ -+INCLUDE += -I$(AQROOT)/hal/kernel/inc -+INCLUDE += -I$(AQROOT)/hal/kernel/inc -+INCLUDE += -I$(AQROOT)/hal/kernel/arch -+INCLUDE += -I$(AQROOT)/hal/kernel -+ifeq ($(VIVANTE_ENABLE_VG),1) -+INCLUDE += -I$(AQROOT)/hal/kernel/archvg -+endif -+INCLUDE += -I$(AQROOT)/hal/os/linux/kernel -+CFLAGS += $(INCLUDE) -Werror -ansi -+ -+ -+################################################################################ -+# Describe object files. -+ -+OBJECTS = $(OBJ_DIR)/gc_hal_kernel_command.o \ -+ $(OBJ_DIR)/gc_hal_kernel_db.o \ -+ $(OBJ_DIR)/gc_hal_kernel_debug.o \ -+ $(OBJ_DIR)/gc_hal_kernel_event.o \ -+ $(OBJ_DIR)/gc_hal_kernel_heap.o \ -+ $(OBJ_DIR)/gc_hal_kernel.o \ -+ $(OBJ_DIR)/gc_hal_kernel_mmu.o \ -+ $(OBJ_DIR)/gc_hal_kernel_video_memory.o -+ -+ifeq ($(VIVANTE_ENABLE_VG),1) -+OBJECTS += \ -+ $(OBJ_DIR)/gc_hal_kernel_command_vg.o \ -+ $(OBJ_DIR)/gc_hal_kernel_interrupt_vg.o \ -+ $(OBJ_DIR)/gc_hal_kernel_mmu_vg.o \ -+ $(OBJ_DIR)/gc_hal_kernel_vg.o -+endif -+ -+include $(AQROOT)/common.target diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend deleted file mode 100644 index ac10b669d..000000000 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2017-2018 Digi International - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI += " \ - file://0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch \ -" diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p2.3.bb b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p2.3.bb deleted file mode 100644 index d983bb706..000000000 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p2.3.bb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2015-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP - -require recipes-kernel/linux/linux-dey-src.inc - -SUMMARY = "Kernel loadable module for Vivante GPU" -DESCRIPTION = "Builds the Vivante GPU kernel driver as a loadable kernel module, \ -allowing flexibility to use a newer graphics release with an older kernel." -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI .= \ - ";subpath=drivers/mxc/gpu-viv;destsuffix=git/src \ - file://Add-makefile.patch \ -" - -inherit module - -EXTRA_OEMAKE += "CONFIG_MXC_GPU_VIV=m" - -KERNEL_MODULE_AUTOLOAD = "galcore" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc index 33eaa67f7..b2682eda9 100644 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc @@ -300,7 +300,6 @@ FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/ FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}" FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL" -RDEPENDS_libgal-imx += "kernel-module-imx-gpu-viv" RPROVIDES_libgal-imx += "libgal-imx" INSANE_SKIP_libgal-imx += "build-deps"