summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-10-06 22:38:49 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2015-10-08 09:54:43 -0300
commit4249193fb4da01a9bf4935337a11f9d80ece1a66 (patch)
tree5edd840c7c15ac55f5c199f241a2df336891bb05 /recipes-kernel
parent9c4dbf03bda5af733674b2bc9f37963703f4db73 (diff)
downloadmeta-fsl-arm-4249193fb4da01a9bf4935337a11f9d80ece1a66.tar.gz
kernel-module-imx-gpu-viv: Fork driver for FSL Community
The driver source code provided by Freescale needs fixes. This fork is a community driven development and allow faster development and easier integration of fixes. The "+fslc" suffix is added to the module during probing to make a clear identification. Change-Id: I914f1a7731263effdef75827e3a9fb8daba37ec9 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/updatemakefile.patch158
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/work-around-include-file-rename.patch30
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1+fslc.bb17
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1.bb23
4 files changed, 17 insertions, 211 deletions
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/updatemakefile.patch b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/updatemakefile.patch
deleted file mode 100644
index 2ca10d4..0000000
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/updatemakefile.patch
+++ /dev/null
@@ -1,158 +0,0 @@
1Upstream-Status: Pending
2
3Signed-off-by: Neena Busireddy <neena.busireddy@freescale.com>
4
5diff -Naur kernel-module-imx-gpu-viv-5.0.11.p7.1_org/kernel-module-imx-gpu-viv-src/Makefile kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/Makefile
6--- kernel-module-imx-gpu-viv-5.0.11.p7.1_org/kernel-module-imx-gpu-viv-src/Makefile 2015-09-22 10:46:18.280385659 -0500
7+++ kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/Makefile 2015-09-22 10:46:51.000000000 -0500
8@@ -1,20 +1,54 @@
9 ##############################################################################
10 #
11-# Copyright (C) 2005 - 2014 by Vivante Corp.
12+# The MIT License (MIT)
13 #
14-# This program is free software; you can redistribute it and/or modify
15-# it under the terms of the GNU General Public License as published by
16-# the Free Software Foundation; either version 2 of the license, or
17-# (at your option) any later version.
18+# Copyright (c) 2014 Vivante Corporation
19+#
20+# Permission is hereby granted, free of charge, to any person obtaining a
21+# copy of this software and associated documentation files (the "Software"),
22+# to deal in the Software without restriction, including without limitation
23+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
24+# and/or sell copies of the Software, and to permit persons to whom the
25+# Software is furnished to do so, subject to the following conditions:
26+#
27+# The above copyright notice and this permission notice shall be included in
28+# all copies or substantial portions of the Software.
29+#
30+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
35+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
36+# DEALINGS IN THE SOFTWARE.
37+#
38+##############################################################################
39+#
40+# The GPL License (GPL)
41+#
42+# Copyright (C) 2014 Vivante Corporation
43+#
44+# This program is free software; you can redistribute it and/or
45+# modify it under the terms of the GNU General Public License
46+# as published by the Free Software Foundation; either version 2
47+# of the License, or (at your option) any later version.
48 #
49 # This program is distributed in the hope that it will be useful,
50 # but WITHOUT ANY WARRANTY; without even the implied warranty of
51-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 # GNU General Public License for more details.
54 #
55 # You should have received a copy of the GNU General Public License
56-# along with this program; if not write to the Free Software
57-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
58+# along with this program; if not, write to the Free Software Foundation,
59+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
60+#
61+##############################################################################
62+#
63+# Note: This software is released under dual MIT and GPL licenses. A
64+# recipient may use this file under the terms of either the MIT license or
65+# GPL License. If you wish to use only one license not the other, you can
66+# indicate your decision by deleting one of the above license notices in your
67+# version of this file.
68 #
69 ##############################################################################
70
71@@ -23,16 +57,15 @@
72 # Linux build file for kernel HAL driver.
73 #
74
75-AQROOT ?= .
76-
77 include $(AQROOT)/config
78
79-KERNEL_DIR ?= $(KERNEL_PATH)
80+KERNEL_DIR ?= $(TOOL_DIR)/kernel
81
82 OS_KERNEL_DIR := hal/os/linux/kernel
83 ARCH_KERNEL_DIR := hal/kernel/arch
84 ARCH_VG_KERNEL_DIR := hal/kernel/archvg
85 HAL_KERNEL_DIR := hal/kernel
86+HOST := $(shell hostname)
87
88 # Check and include platform config.
89 ifneq ($(PLATFORM),)
90@@ -63,6 +96,14 @@
91 $(OS_KERNEL_DIR)/gc_hal_kernel_debugfs.o \
92 $(OS_KERNEL_DIR)/gc_hal_kernel_allocator.o \
93
94+ifneq ($(CONFIG_DMA_SHARED_BUFFER),)
95+OBJS += $(OS_KERNEL_DIR)/allocator/default/gc_hal_kernel_allocator_dmabuf.o
96+endif
97+
98+ifneq ($(CONFIG_IOMMU_SUPPORT),)
99+OBJS += $(OS_KERNEL_DIR)/gc_hal_kernel_iommu.o
100+endif
101+
102 ifneq ($(PLATFORM),)
103 OBJS += $(OS_KERNEL_DIR)/gc_hal_kernel_probe.o
104 OBJS += $(OS_KERNEL_DIR)/platform/$(PLATFORM).o
105@@ -83,6 +124,10 @@
106 OBJS += $(ARCH_KERNEL_DIR)/gc_hal_kernel_context.o \
107 $(ARCH_KERNEL_DIR)/gc_hal_kernel_hardware.o
108
109+ifeq ($(VIVANTE_ENABLE_3D), 1)
110+OBJS += $(ARCH_KERNEL_DIR)/gc_hal_kernel_recorder.o
111+endif
112+
113 ifeq ($(VIVANTE_ENABLE_VG), 1)
114 OBJS +=\
115 $(HAL_KERNEL_DIR)/gc_hal_kernel_vg.o\
116@@ -99,10 +144,6 @@
117 OBJS += $(OS_KERNEL_DIR)/gc_hal_kernel_sync.o
118 endif
119
120-ifneq ($(CONFIG_ANDROID),)
121-EXTRA_CFLAGS += -DANDROID
122-endif
123-
124 ifeq ($(SECURITY), 1)
125 OBJS += $(OS_KERNEL_DIR)/gc_hal_kernel_security_channel.o \
126 $(HAL_KERNEL_DIR)/gc_hal_kernel_security.o
127@@ -118,15 +159,16 @@
128
129 # Define targets.
130 all:
131- @make V=$(V) ARCH=$(ARCH_TYPE) -C $(KERNEL_DIR) SUBDIRS=`pwd` modules
132+ @$(MAKE) V=$(V) ARCH=$(ARCH_TYPE) -C $(KERNEL_DIR) SUBDIRS=`pwd` modules
133
134 clean:
135 @rm -rf $(OBJS)
136- @rm -rf modules.order Module.symvers
137+ @rm -rf modules.order Module.symvers .tmp_versions
138 @find $(AQROOT) -name ".gc_*.cmd" | xargs rm -f
139
140 install: all
141 @mkdir -p $(SDK_DIR)/drivers
142+ @cp $(MODULE_NAME).ko $(SDK_DIR)/drivers
143
144 else
145
146@@ -261,8 +303,10 @@
147 EXTRA_CFLAGS += -I$(AQROOT)/hal/kernel/archvg
148 endif
149
150-obj-m += galcore.o
151+EXTRA_CFLAGS += -DHOST=\"$(HOST)\"
152+
153+obj-m = $(MODULE_NAME).o
154
155-galcore-objs := $(OBJS)
156+$(MODULE_NAME)-objs = $(OBJS)
157
158 endif
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/work-around-include-file-rename.patch b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/work-around-include-file-rename.patch
deleted file mode 100644
index 5b92392..0000000
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/work-around-include-file-rename.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From 3ec514cf260b82f4701b6fed521ce470d9faf8c9 Mon Sep 17 00:00:00 2001
2From: Gary Thomas <gary@mlbassoc.com>
3Date: Tue, 6 Oct 2015 09:32:22 -0600
4Subject: [PATCH] kernel-module-imx-gpu-viv: Better work-around for change in name of busfreq-imx.h
5
6The renaming of include/linux/busfreq-imx6.h to include/linux/busfreq-imx.h
7is not consistent over the many kernel versions currently being built. This
8changeset works around this inconsistency by creating a local symbolic link
9to whatever file is actually present in the kernel sources.
10
11Signed-off-by: Gary Thomas <gary@mlbassoc.com>
12Upstream-status: Innapropriate [requires OE recipe support]
13----
14Index: kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
15===================================================================
16--- kernel-module-imx-gpu-viv-5.0.11.p7.1.orig/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
17+++ kernel-module-imx-gpu-viv-5.0.11.p7.1/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
18@@ -74,11 +74,8 @@
19 #include <linux/pm_runtime.h>
20 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
21 #include <mach/busfreq.h>
22-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
23-#include <linux/busfreq-imx6.h>
24-#include <linux/reset.h>
25 #else
26-#include <linux/busfreq-imx.h>
27+#include "busfreq-imx.h"
28 #include <linux/reset.h>
29 #endif
30 #endif
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1+fslc.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1+fslc.bb
new file mode 100644
index 0000000..404615f
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1+fslc.bb
@@ -0,0 +1,17 @@
1# Copyright (C) 2015 O.S. Systems Software LTDA.
2# Copyright (C) 2015 Freescale Semiconductor
3
4SUMMARY = "Kernel loadable module for Vivante GPU"
5DESCRIPTION = "This package uses an exact copy of the GPU kernel driver source code of \
6the same version as base and include fixes and improvements developed by FSL Community"
7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
9
10PV .= "+git${SRCPV}"
11
12inherit module
13
14SRCREV = "eeeb23c0fb1cee01318088d417025263479c44ac"
15SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https"
16
17S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1.bb
deleted file mode 100644
index 7e8414b..0000000
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p7.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1# Copyright (C) 2015 Freescale Semiconductor
2
3SUMMARY = "Kernel loadable module for Vivante GPU"
4DESCRIPTION = "Provides flexibility to switch graphics between different kernels in future \
5releases. This package uses same source code as GPU kernel driver source."
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
8
9inherit module
10
11SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz \
12 file://updatemakefile.patch \
13 file://work-around-include-file-rename.patch \
14"
15
16SRC_URI[md5sum] = "a251a94390986371f75b338ad938e46f"
17SRC_URI[sha256sum] = "9aaef0a62bc2be69dc568228192b060c54970b5c700fee602d83a4d13e04a9b3"
18
19# Work around inconsistent naming of <linux/busfreq-imx.h>
20do_compile_prepend () {
21 ln -sf ${STAGING_KERNEL_DIR}/include/linux/busfreq-imx*.h kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/busfreq-imx.h
22}
23