* [PATCH v2 1/5] kernel-module-mcc: move to kernel-modules subdir
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
@ 2015-08-20 11:28 ` Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 2/5] kernel-module-imx-gpu-viv: Kernel loadable modules for 5.0.11.p6.3 Otavio Salvador
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-08-20 11:28 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
There are more kernel modules which are going to be packaged so it
makes sense to have them all in same subdirectory.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2: None
.../mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch | 0
.../{kernel-module-mcc => kernel-modules}/kernel-module-mcc_1.06.bb | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename recipes-kernel/{kernel-module-mcc => kernel-modules}/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch (100%)
rename recipes-kernel/{kernel-module-mcc => kernel-modules}/kernel-module-mcc_1.06.bb (100%)
diff --git a/recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch b/recipes-kernel/kernel-modules/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch
similarity index 100%
rename from recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch
rename to recipes-kernel/kernel-modules/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch
diff --git a/recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb b/recipes-kernel/kernel-modules/kernel-module-mcc_1.06.bb
similarity index 100%
rename from recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb
rename to recipes-kernel/kernel-modules/kernel-module-mcc_1.06.bb
--
2.5.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v2 2/5] kernel-module-imx-gpu-viv: Kernel loadable modules for 5.0.11.p6.3
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 1/5] kernel-module-mcc: move to kernel-modules subdir Otavio Salvador
@ 2015-08-20 11:28 ` Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 3/5] fsl-vivante-kernel-driver-handler.bbclass: Handle Vivante kernel driver provider Otavio Salvador
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-08-20 11:28 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
From: Lauren Post <lauren.post@freescale.com>
This is the Vivante kernel driver split from the kernel source code in
order to make it possible to be used in any kernel source since
3.10.53.
The graphic version is 5.0.11.p6.3
Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2:
- Improve commit log (Daiane)
.../kernel-module-imx-gpu-viv_5.0.11.p6.3.bb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
new file mode 100644
index 0000000..db9dcbb
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
@@ -0,0 +1,16 @@
+# Copyright (C) 2015 Freescale Semiconductor
+
+SUMMARY = "Kernel loadable module for Vivante GPU"
+DESCRIPTION = "Provides flexibility to switch graphics between different kernels in future \
+releases. This package uses same source code as GPU kernel driver source."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+inherit module
+
+SRC_URI = "${FSL_MIRROR}/imx-gpu-viv-kernel-${@'${PV}'.replace('5.0.11.p6.3', '5.0.11.p6.3-beta')}.tar.gz"
+
+SRC_URI[md5sum] = "6d46da80de94e98ee68ab1a75f384b89"
+SRC_URI[sha256sum] = "e4b02fc0c9bdbfc7ecc67a0bad0917e788921c8f2444d99bd77daae7f3cd95df"
+
+S = "${WORKDIR}/imx-gpu-viv-kernel-${@'${PV}'.replace('5.0.11.p6.3', '5.0.11.p6.3-beta')}"
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 3/5] fsl-vivante-kernel-driver-handler.bbclass: Handle Vivante kernel driver provider
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 1/5] kernel-module-mcc: move to kernel-modules subdir Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 2/5] kernel-module-imx-gpu-viv: Kernel loadable modules for 5.0.11.p6.3 Otavio Salvador
@ 2015-08-20 11:28 ` Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 4/5] Enable Vivante kernel driver dynamic provider Otavio Salvador
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-08-20 11:28 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
Enable the kernel to provide or not the Vivante kernel driver and
dynamically set the proper providers per machine.
The following options are supported:
MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT
Machine has or not support for the Vivante kernel driver, options
are:
0 - machine does not have Vivante GPU driver support
1 - machine has Vivante GPU driver support
MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE
Machine use the Vivante kernel driver as module, options are:
0 - enable the builtin kernel driver module
1 - enable the external kernel module
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2:
- improve commit log and class documentation for
MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT (Daiane)
classes/fsl-vivante-kernel-driver-handler.bbclass | 67 +++++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 classes/fsl-vivante-kernel-driver-handler.bbclass
diff --git a/classes/fsl-vivante-kernel-driver-handler.bbclass b/classes/fsl-vivante-kernel-driver-handler.bbclass
new file mode 100644
index 0000000..e466b81
--- /dev/null
+++ b/classes/fsl-vivante-kernel-driver-handler.bbclass
@@ -0,0 +1,67 @@
+# Freescale Kernel Vivante Kernel Driver handler
+#
+# Enable the kernel to provide or not the Vivante kernel driver and
+# dynamically set the proper providers per machine.
+#
+# The following options are supported:
+#
+# MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT
+#
+# Machine has or not support for the Vivante kernel driver, options
+# are:
+#
+# 0 - machine does not have Vivante GPU driver support
+# 1 - machine has Vivante GPU driver support
+#
+# MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE
+#
+# Machine use the Vivante kernel driver as module, options are:
+#
+# 0 - enable the builtin kernel driver module
+# 1 - enable the external kernel module
+#
+# Copyright 2015 (C) O.S. Systems Software LTDA.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+# Handle Vivante kernel driver setting
+MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT ?= "0"
+MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6q ?= "1"
+MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6dl ?= "1"
+MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6sx ?= "1"
+MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT_mx6sl ?= "1"
+
+# Use vivante kernel driver module:
+# 0 - enable the builtin kernel driver module
+# 1 - enable the external kernel module
+MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE ??= "1"
+
+python fsl_vivante_kernel_driver_handler () {
+ has_vivante_kernel_driver_support = e.data.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT', True) or "0"
+ use_vivante_kernel_driver_module = e.data.getVar('MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE', True) or "0"
+
+ if has_vivante_kernel_driver_support != "1":
+ return
+
+ if use_vivante_kernel_driver_module != "1":
+ e.data.appendVar('RPROVIDES_kernel-base', ' kernel-module-imx-gpu-viv')
+ e.data.appendVar('RREPLACES_kernel-base', ' kernel-module-imx-gpu-viv')
+ e.data.appendVar('RCONFLICTS_kernel-base', ' kernel-module-imx-gpu-viv')
+}
+
+addhandler fsl_vivante_kernel_driver_handler
+fsl_vivante_kernel_driver_handler[eventmask] = "bb.event.RecipePreFinalise"
+
+do_configure_prepend () {
+ if [ "${MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT}" = "1" ]; then
+ fsl_viv_handler_defconfig="${WORKDIR}/defconfig"
+ if [ -e ${B}/.config ]; then
+ fsl_viv_handler_defconfig="${B}/.config"
+ fi
+ sed -i "/CONFIG_MXC_GPU_VIV[ =]/d" $fsl_viv_handler_defconfig
+ if [ "${MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE}" = "1" ]; then
+ echo "# CONFIG_MXC_GPU_VIV is not set" >> $fsl_viv_handler_defconfig
+ else
+ echo "CONFIG_MXC_GPU_VIV=y" >> $fsl_viv_handler_defconfig
+ fi
+ fi
+}
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 4/5] Enable Vivante kernel driver dynamic provider
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
` (2 preceding siblings ...)
2015-08-20 11:28 ` [PATCH v2 3/5] fsl-vivante-kernel-driver-handler.bbclass: Handle Vivante kernel driver provider Otavio Salvador
@ 2015-08-20 11:28 ` Otavio Salvador
2015-08-20 11:28 ` [PATCH v2 5/5] kernel-module-imx-gpu-viv: Fix build against 3.14-based kernels Otavio Salvador
2015-08-20 13:01 ` [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Ann Thornton
5 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-08-20 11:28 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
The linux-imx.inc based kernels now can dynamically provide the
Vivante kernel driver and satisfy the runtime dependency added for the
Vivante GPU user space libraries. The beauty of this solution is that
it makes ease for 3rd party kernel to reuse the same infrastructure
and use the external module easily.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2: None
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 1 +
recipes-kernel/linux/linux-imx.inc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
index 5de8a3d..b21e9b3 100644
--- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
@@ -260,6 +260,7 @@ FILES_libegl-mx6-dbg = "${libdir}/.debug/libEGL${SOLIBS}"
FILES_libgal-mx6 = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}"
FILES_libgal-mx6-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL"
FILES_libgal-mx6-dbg = "${libdir}/.debug/libGAL${SOLIBS}"
+RDEPENDS_libgal-mx6 += "kernel-module-imx-gpu-viv"
FILES_libvsc-mx6 = "${libdir}/libVSC${SOLIBS}"
diff --git a/recipes-kernel/linux/linux-imx.inc b/recipes-kernel/linux/linux-imx.inc
index d790227..4835e78 100644
--- a/recipes-kernel/linux/linux-imx.inc
+++ b/recipes-kernel/linux/linux-imx.inc
@@ -4,7 +4,7 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-inherit kernel fsl-kernel-localversion
+inherit kernel fsl-kernel-localversion fsl-vivante-kernel-driver-handler
# Put a local version until we have a true SRCREV to point to
LOCALVERSION ?= ""
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 5/5] kernel-module-imx-gpu-viv: Fix build against 3.14-based kernels
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
` (3 preceding siblings ...)
2015-08-20 11:28 ` [PATCH v2 4/5] Enable Vivante kernel driver dynamic provider Otavio Salvador
@ 2015-08-20 11:28 ` Otavio Salvador
2015-08-20 13:01 ` [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Ann Thornton
5 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-08-20 11:28 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
The build fail about the bus frequency header (linux/busfreq-imx6.h)
not being found is caused by the mistaken check for the wrong kernel
version.
This patch fixes it by adding the right kernel version to be checked.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in v2:
- Improve commit log and patch header for clearness (Daiane)
...x-kernel-version-check-for-3.14-based-ker.patch | 35 ++++++++++++++++++++++
.../kernel-module-imx-gpu-viv_5.0.11.p6.3.bb | 3 +-
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/platform-Fix-kernel-version-check-for-3.14-based-ker.patch
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/platform-Fix-kernel-version-check-for-3.14-based-ker.patch b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/platform-Fix-kernel-version-check-for-3.14-based-ker.patch
new file mode 100644
index 0000000..3b92ac8
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/platform-Fix-kernel-version-check-for-3.14-based-ker.patch
@@ -0,0 +1,35 @@
+From 617bdbec386a1237e2a148989318cc4a1360788a Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Tue, 18 Aug 2015 23:08:48 +0000
+Subject: [PATCH] platform: Fix kernel version check for 3.14-based kernels
+Organization: O.S. Systems Software LTDA.
+
+The build fail about the bus frequency header (linux/busfreq-imx6.h)
+not being found is caused by the mistaken check for the wrong kernel
+version.
+
+This patch fixes it by adding the right kernel version to be checked.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ .../os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/imx-gpu-viv-kernel-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c b/imx-gpu-viv-kernel-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
+index a2e72ff..241614a 100644
+--- a/imx-gpu-viv-kernel-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
++++ b/imx-gpu-viv-kernel-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
+@@ -40,7 +40,7 @@
+ #include <linux/pm_runtime.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ #include <mach/busfreq.h>
+-#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
+ #include <linux/busfreq-imx6.h>
+ #include <linux/reset.h>
+ #else
+--
+2.1.4
+
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
index db9dcbb..a27decd 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
inherit module
-SRC_URI = "${FSL_MIRROR}/imx-gpu-viv-kernel-${@'${PV}'.replace('5.0.11.p6.3', '5.0.11.p6.3-beta')}.tar.gz"
+SRC_URI = "${FSL_MIRROR}/imx-gpu-viv-kernel-${@'${PV}'.replace('5.0.11.p6.3', '5.0.11.p6.3-beta')}.tar.gz \
+ file://platform-Fix-kernel-version-check-for-3.14-based-ker.patch"
SRC_URI[md5sum] = "6d46da80de94e98ee68ab1a75f384b89"
SRC_URI[sha256sum] = "e4b02fc0c9bdbfc7ecc67a0bad0917e788921c8f2444d99bd77daae7f3cd95df"
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver
2015-08-20 11:28 [PATCH v2 0/5] Dynamically choose between built-in or external Vivante GPU kernel driver Otavio Salvador
` (4 preceding siblings ...)
2015-08-20 11:28 ` [PATCH v2 5/5] kernel-module-imx-gpu-viv: Fix build against 3.14-based kernels Otavio Salvador
@ 2015-08-20 13:01 ` Ann Thornton
2015-08-20 23:31 ` Otavio Salvador
5 siblings, 1 reply; 8+ messages in thread
From: Ann Thornton @ 2015-08-20 13:01 UTC (permalink / raw)
To: meta-freescale
[-- Attachment #1: Type: text/plain, Size: 2922 bytes --]
Just some minor things:
On 8/20/2015 6:28 AM, Otavio Salvador wrote:
> This patchset implements support to dynamically choose between
> built-in or external Vivante GPU kernel driver.
>
> By default, the external Vivante GPU kernel module is used, however
> every machine can have its own choice for this, or distros can
> override the default value if needed.
>
> The following options are supported:
>
> MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT
>
> Machine has or not support for the Vivante kernel driver, options
> are:
Better: Machine does or does not have support ...
> 0 - machine does not have Vivante GPU driver support
> 1 - machine has Vivante GPU driver support
>
> MACHINE_USE_VIVANTE_KERNEL_DRIVER_MODULE
Better:
MACHINE_USES_VIVANTE_KERNEL_DRIVER_MODULE
> Machine use the Vivante kernel driver as module, options are:
Better: Machine uses the ...
>
> 0 - enable the builtin kernel driver module
> 1 - enable the external kernel module
>
> The patches included in this patchset are:
>
> Changes in v2:
> - Improve commit log (Daiane)
> - improve commit log and class documentation for
> MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT (Daiane)
> - Improve commit log and patch header for clearness (Daiane)
>
> Lauren Post (1):
> kernel-module-imx-gpu-viv: Kernel loadable modules for 5.0.11.p6.3
>
> Otavio Salvador (4):
> kernel-module-mcc: move to kernel-modules subdir
> fsl-vivante-kernel-driver-handler.bbclass: Handle Vivante kernel
> driver provider
> Enable Vivante kernel driver dynamic provider
> kernel-module-imx-gpu-viv: Fix build against 3.14-based kernels
>
> classes/fsl-vivante-kernel-driver-handler.bbclass | 67 ++++++++++++++++++++++
> recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 1 +
> ...x-kernel-version-check-for-3.14-based-ker.patch | 35 +++++++++++
> .../kernel-module-imx-gpu-viv_5.0.11.p6.3.bb | 17 ++++++
> ...h-Only-include-mvf_sema4.h-if-building-in.patch | 0
> .../kernel-module-mcc_1.06.bb | 0
> recipes-kernel/linux/linux-imx.inc | 2 +-
> 7 files changed, 121 insertions(+), 1 deletion(-)
> create mode 100644 classes/fsl-vivante-kernel-driver-handler.bbclass
> create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/platform-Fix-kernel-version-check-for-3.14-based-ker.patch
> create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p6.3.bb
> rename recipes-kernel/{kernel-module-mcc => kernel-modules}/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch (100%)
> rename recipes-kernel/{kernel-module-mcc => kernel-modules}/kernel-module-mcc_1.06.bb (100%)
>
--
Ann Thornton
/Microcontrollers Software and Applications
Freescale Semiconductors
email: Ann.Thornton@freescale.com/
[-- Attachment #2: Type: text/html, Size: 3934 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread