Skip to contentSkip to conversation

Pending changes regarding 3.5.7 update

PATCH New Otavio Salvador 1 participant 12 messages Aug 24, 2013 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

cover Pending changes regarding 3.5.7 update

Hi,

This patchset adds the remaining changes from 3.5.7 BSP and updates the GPU code with the OpenGL ES2.0 backend finally working.

This GPU driver includes following changes/improvements:

- GLES20 window mode performance is optimized for improved performance.

- glmark2-es2 crashed fixed as documented: Workaround [YOCTO: #4954] so it outputs an error. A fix for it is being developed.

- glmark2-es2 performance in windowed mode. Fixes [YOCTO: 4950]

Those changes has been waiting for this fixes to be public to be proposed for merging and I'd like to try to merge them as soon as possible to let us some time to fix any regression and serious issue before the code freeze, in about two weeks.

A couple of patches, for 3.5.7 GPU support for the 3.0.35-4.0.0 kernel, is included in master-next branch of meta-fsl-arm-extra for Wandboard and Boundary Devices recipes.

Lauren Post (1):
gpu-viv-g2d: Add version 3.5.7-1.0.0

Otavio Salvador (10):
gpu-viv-bin-mx6q.inc: Fix soname of libGL library gpu-viv-bin-mx6q.inc: Fix soname of libEGL library
gpu-viv-bin-mx6q: Add DirectFB backend package gpu-viv-bin-mx6q (3.5.7-1.0.0-alpha.2): Add Hard and Soft Float-Point
releases
linux-imx (3.0.35): Add support to Vivante 4.6.9p12 GPU code
xf86-video-imxfb-vivante: Upgrade to 3.5.7-1.0.0-alpha.2
xserver-xorg: Remove backport of 1.11.4
imx-base.inc: Set default tune of i.MX6 to use Hard Float-Point imx-lib.inc: Add .so files in imx-lib package
libdrm: Add fix to avoid GPU freeze

 conf/machine/include/imx-base.inc                  |    5 +-
 recipes-bsp/imx-lib/imx-lib.inc                    |    8 +
 .../drm/libdrm/mx6/drm-update-arm.patch            |   32 +
 recipes-graphics/drm/libdrm_2.4.46.bbappend        |    5 +
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          |   24 +-
 .../gpu-viv-bin-mx6q_3.0.35-4.0.0.bb               |   17 -
 .../gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-hfp.bb    |   12 +
 .../gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-sfp.bb    |   12 +
 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d.inc       |   43 +
 .../gpu-viv-g2d/gpu-viv-g2d_3.5.7-1.0.0.bb         |    9 +
 .../xf86-dri-vivante/fix-libdrm-link.patch         |   33 -
 .../xorg-driver/xf86-dri-vivante_3.0.35-4.0.0.bb   |   48 -
 .../Makefile-fix-cross-compile.patch               |   23 +
 ...on-t-force-things-decided-by-build-system.patch |   82 +
 .../xf86-video-imxfb-vivante_3.0.35-4.0.0.bb       |   54 -
 ...xf86-video-imxfb-vivante_3.5.7-1.0.0-alpha.2.bb |   59 +
 .../xserver-xorg-1.11.4/crosscompile.patch         |   22 -
 .../fix_open_max_preprocessor_error.patch          |   15 -
 .../xserver-xorg-1.11.4/macro_tweak.patch          |   25 -
 .../xserver-xorg-1.11.4/mips64-compiler.patch      |   29 -
 .../xserver-xorg-1.11.4/pkgconfig-deps.patch       |   70 -
 .../xorg-xserver/xserver-xorg_1.11.4.bb            |   25 -
 ...8-4.6.9p11.1-gpu-GPU-Kernel-driver-integr.patch | 1040 ++++++++++
 ...5-gpu-Add-global-value-for-minimum-3D-clo.patch |   62 +
 ...4-4-gpu-use-new-PU-power-on-off-interface.patch |   53 +
 ...8-1-GPU-Integrate-4.6.9p12-release-kernel.patch | 2006 ++++++++++++++++++++
 ...5-GPU-Correct-suspend-resume-calling-afte.patch |   61 +
 ...0-gpu-Correct-section-mismatch-in-gpu-ker.patch |   60 +
 ...m-vivante-Add-00-sufix-in-returned-bus-Id.patch |   31 +
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    9 +
 30 files changed, 3632 insertions(+), 342 deletions(-)
 create mode 100644 recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
 create mode 100644 recipes-graphics/drm/libdrm_2.4.46.bbappend
 delete mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-hfp.bb
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-sfp.bb
 create mode 100644 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d.inc
 create mode 100644 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d_3.5.7-1.0.0.bb
 delete mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante/fix-libdrm-link.patch
 delete mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/Makefile-fix-cross-compile.patch
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/build-Don-t-force-things-decided-by-build-system.patch
 delete mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.5.7-1.0.0-alpha.2.bb
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/crosscompile.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/fix_open_max_preprocessor_error.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/macro_tweak.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/mips64-compiler.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/pkgconfig-deps.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg_1.11.4.bb
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0001-ENGR00255688-4.6.9p11.1-gpu-GPU-Kernel-driver-integr.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0002-ENGR00265465-gpu-Add-global-value-for-minimum-3D-clo.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0003-ENGR00261814-4-gpu-use-new-PU-power-on-off-interface.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0004-ENGR00264288-1-GPU-Integrate-4.6.9p12-release-kernel.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0006-ENGR00265130-gpu-Correct-section-mismatch-in-gpu-ker.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/drm-vivante-Add-00-sufix-in-returned-bus-Id.patch
Signature · 1 line
1.8.4.rc1
#1 lore raw

PATCH 1/11 gpu-viv-g2d: Add version 3.5.7-1.0.0

From: Lauren Post <[email protected]>

GPU 2D API libraries and sample applications

Change-Id Id94b33879119e882f939668bad61a1a7364db89d
---
 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d.inc       | 43 ++++++++++++++++++++++
 .../gpu-viv-g2d/gpu-viv-g2d_3.5.7-1.0.0.bb         |  9 +++++
 2 files changed, 52 insertions(+)
 create mode 100644 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d.inc
 create mode 100644 recipes-graphics/gpu-viv-g2d/gpu-viv-g2d_3.5.7-1.0.0.bb
recipes-graphics/gpu-viv-g2d/gpu-viv-g2d.inc new file +43 -0
new file mode 100644
index 0000000..a6b7a5e
@@ -0,0 +1,43 @@
+# Copyright (C) 2013 Freescale Semiconductor
+
+DESCRIPTION = "GPU Vivante G2D library and sample applications for imx6"
+SECTION = "libs"
+LICENSE = "Proprietary"
+PROVIDES += "virtual/libg2d"
+
+inherit fsl-eula-unpack
+
+PE = "1"
+
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
+
+PACKAGES = "gpu-viv-g2d gpu-viv-g2d-dev gpu-viv-g2d-dbg"
+
+# Inhibit warnings about files being stripped.
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+S = "${WORKDIR}/${PN}-${PV}"
+
+do_install () {
+    install -d ${D}${libdir}
+    install -d ${D}${includedir}
+
+    cp ${S}/usr/lib/*.so ${D}${libdir}
+    cp -axr ${S}/usr/include/* ${D}${includedir}
+    cp -axr ${S}/opt ${D}
+
+    find ${D}${libdir} -type f -exec chmod 644 {} \;
+    find ${D}${includedir} -type f -exec chmod 644 {} \;
+}
+
+# FIXME: The provided binary doesn't provide soname. If in future BSP
+# release the libraries are fixed, we can drop this hack.
+REALSOLIBS := "${SOLIBS}"
+SOLIBS = "${SOLIBSDEV}"
+
+FILES_${PN} = "/opt ${libdir}/libg2d${SOLIBS} "
+FILES_${PN}-dev = "${includedir}"
+FILES_${PN}-dbg = "${libdir}/.debug/libg2d${SOLIBS}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mx6)"
recipes-graphics/gpu-viv-g2d/gpu-viv-g2d_3.5.7-1.0.0.bb new file +9 -0
new file mode 100644
index 0000000..349cb2e
@@ -0,0 +1,9 @@
+# Copyright (C) 2013 Freescale Semiconductor
+
+include gpu-viv-g2d.inc
+
+LIC_FILES_CHKSUM = "file://usr/include/g2d.h;endline=7;md5=861ebad4adc7236f8d1905338abd7eb2"
+
+SRC_URI[md5sum] = "cb1939d1de300bbe334e6e8e0137ae57"
+SRC_URI[sha256sum] = "460d0df171766edbea1fe6781a38346596ad13f748eb971296c04c261cec5450"
+
Signature · 1 line
1.8.4.rc1
#2 lore raw

PATCH 2/11 gpu-viv-bin-mx6q.inc: Fix soname of libGL library

In reply to Otavio Salvador

The soname used by mesa is 1.2.0 while the Vivante binary lacked the minor version so sometimes we might end fetching the wrong package because of this.

Change-Id I581c573f2b794923baa96829a483cd6d6f5393e0
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 3 +++
 1 file changed, 3 insertions(+)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +3 -0
index 38c8db5..42cd964 100644
@@ -130,6 +130,9 @@ do_install () {
 
     # We'll only have one backend here so we rename it to generic name
     # and avoid rework in other packages, when possible
+    mv ${D}${libdir}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2.0
+    ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2
+    ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so
     mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1
     ln -sf libEGL.so.1 ${D}${libdir}/libEGL.so
     mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so
Signature · 1 line
1.8.4.rc1
#3 lore raw

PATCH 3/11 gpu-viv-bin-mx6q.inc: Fix soname of libEGL library

In reply to Otavio Salvador

The soname of libEGL should be 1.0 so we fix it at install time. The fix has been contributed by Evan Kotara <[email protected]>.

Change-Id I99dad005f4a01b6e902e0e605d16630ebebd554d
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +3 -2
index 42cd964..f60cfb5 100644
@@ -133,8 +133,9 @@ do_install () {
     mv ${D}${libdir}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2.0
     ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2
     ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so
-    mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1
-    ln -sf libEGL.so.1 ${D}${libdir}/libEGL.so
+    mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1.0
+    ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so.1
+    ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so
     mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so
     mv ${D}${libdir}/libVIVANTE-${backend}.so ${D}${libdir}/libVIVANTE.so
 
Signature · 1 line
1.8.4.rc1
#4 lore raw

PATCH 4/11 gpu-viv-bin-mx6q: Add DirectFB backend package

In reply to Otavio Salvador

This change has been based on changes done in meta-fsl-bsp-release, 3.5.7 dylan branch, by Lauren Post <[email protected]> and Evan Kotara <[email protected]>.

Change-Id I2f1bf93181e9f3246e6319f6e89f4fe842ca3da5
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 4 ++++
 1 file changed, 4 insertions(+)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +4 -0
index f60cfb5..d9032b2 100644
@@ -37,6 +37,7 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libgal-mx6 libgal-mx6-dev libgal-mx6-dbg \
 	libvivante-mx6 libvivante-mx6-dev libvivante-mx6-dbg \
 	libvivante-dri-mx6 \
+	libvivante-dfb-mx6 \
 	libwayland-viv-mx6 libwayland-viv-mx6-dev libwayland-viv-mx6-dbg \
 	libgc-wayland-protocol-mx6 libgc-wayland-protocol-mx6-dev libgc-wayland-protocol-mx6-dbg \
 	libwayland-egl-mx6-dev \
@@ -121,6 +122,7 @@ do_install () {
         install -m 0644 ${WORKDIR}/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
 
         if [ "${USE_DFB}" = "yes" ]; then
+            cp -r ${S}/usr/lib/directfb-1.6-0 ${D}${libdir}
             backend=dfb
         else
             # Regular framebuffer
@@ -207,6 +209,8 @@ FILES_libvivante-mx6-dbg = "${libdir}/.debug/libVIVANTE${SOLIBS}"
 
 FILES_libvivante-dri-mx6 = "${libdir}/dri/vivante_dri.so"
 
+FILES_libvivante-dfb-mx6 = "${libdir}/directfb-1.6-0/gfxdrivers/libdirectfb_gal.so"
+
 INSANE_SKIP_libwayland-viv-mx6 += "dev-so"
 FILES_libwayland-viv-mx6 =  "${libdir}/libwayland-viv${REALSOLIBS}  ${libdir}/libwayland-viv${SOLIBS}"
 FILES_libwayland-viv-mx6-dev = "${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc"
Signature · 1 line
1.8.4.rc1
#5 lore raw

PATCH 5/11 gpu-viv-bin-mx6q (3.5.7-1.0.0-alpha.2): Add Hard and Soft Float-Point releases

In reply to Otavio Salvador

Include the 3.5.7-1.0.0-alpha.2 version of GPU and the mechanism to allow this to be matched for compatibility. When adding a package of:

Hard Float-Point, set:

PACKAGE_FP_TYPE = "hardfp"

Soft Float-Point, set:

PACKAGE_FP_TYPE = "softfp"

This GPU driver includes following changes/improvements:

- GLES20 window mode performance is optimized for improved performance.

- glmark2-es2 crashed fixed as documented: Workaround [YOCTO: #4954] so it outputs an error. A fix for it is being developed.

- glmark2-es2 performance in windowed mode. Fixes [YOCTO: 4950]

This change has been based on changes done in meta-fsl-bsp-release, 3.5.7 dylan branch, by Lauren Post <[email protected]> and Evan Kotara <[email protected]>.

Change-Id If71a18df232282862ecd551d96e627b975238134
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc  | 12 ++++++++++++
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.0.35-4.0.0.bb   | 17 -----------------
 .../gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-hfp.bb         | 12 ++++++++++++
 .../gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-sfp.bb         | 12 ++++++++++++
 4 files changed, 36 insertions(+), 17 deletions(-)
 delete mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-hfp.bb
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-sfp.bb
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +12 -0
index d9032b2..0a53900 100644
@@ -43,6 +43,18 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libwayland-egl-mx6-dev \
 "
 
+# Skip package if it does not match the machine float-point type in use
+python __anonymous () {
+        is_machine_hardfp = base_contains("TUNE_FEATURES", "callconvention-hard", True, False, d)
+        is_package_hardfp = d.getVar("PACKAGE_FP_TYPE", True) == "hardfp"
+
+        if is_package_hardfp != is_machine_hardfp:
+                PN = d.getVar("PN", True)
+                PV = d.getVar("PV", True)
+                bb.debug(1, "Skipping %s (%s) as machine and package float-point does not match" % (PN, PV))
+                raise bb.parse.SkipPackage("Package Float-Point is not compatible with the machine")
+}
+
 USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
 USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
 USE_WL = "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.0.35-4.0.0.bb deleted +0 -17
deleted file mode 100644
index d8e00ef..0000000
@@ -1,17 +0,0 @@
-# Copyright (C) 2012-2013 Freescale Semiconductor
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-PR = "r5.0"
-
-include gpu-viv-bin-mx6q.inc
-
-SRC_URI += "file://0001-change-header-path-to-HAL.patch \
-            file://gc_hal_eglplatform-remove-xlib-undefs.patch \
-            file://fix-conflicting-TLS-definition.patch"
-
-SRC_URI[md5sum] = "2bb7d2f4bdff79ae99ce0c9fc2540701"
-SRC_URI[sha256sum] = "48d04d11c6fec11411bcd97c47199caea517ebcd86db6c70f1964b3358a68924"
-
-# FIXME: 3.0.35-4.0.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so
-# disable it for now
-USE_DFB = "no"
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-hfp.bb new file +12 -0
new file mode 100644
index 0000000..a55e988
@@ -0,0 +1,12 @@
+# Copyright (C) 2013 Freescale Semiconductor
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+include gpu-viv-bin-mx6q.inc
+
+SRC_URI += "file://0001-change-header-path-to-HAL.patch \
+            file://gc_hal_eglplatform-remove-xlib-undefs.patch"
+
+SRC_URI[md5sum] = "f5f4e2e7767c784315461c132929e7d3"
+SRC_URI[sha256sum] = "f16747ee5ae2e88631cc1494db98f7b5762940c7db25795906b7cc8f87405caf"
+
+PACKAGE_FP_TYPE = "hardfp"
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_3.5.7-1.0.0-alpha.2-sfp.bb new file +12 -0
new file mode 100644
index 0000000..2383fb7
@@ -0,0 +1,12 @@
+# Copyright (C) 2013 Freescale Semiconductor
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+include gpu-viv-bin-mx6q.inc
+
+SRC_URI += "file://0001-change-header-path-to-HAL.patch \
+            file://gc_hal_eglplatform-remove-xlib-undefs.patch"
+
+SRC_URI[md5sum] = "ef08a4ad04c7886a44af16e826d0f444"
+SRC_URI[sha256sum] = "e212e361044eb1f9089761e115e71b27dab67c832ebb1ddbc830c17d2b1e2fba"
+
+PACKAGE_FP_TYPE = "softfp"
Signature · 1 line
1.8.4.rc1
#6 lore raw

PATCH 6/11 linux-imx (3.0.35): Add support to Vivante 4.6.9p12 GPU code

In reply to Otavio Salvador

This backport the support for Vivante 4.6.9p12 GPU from 3.5.7 kernel while Freescale does not make a new 3.0.35 release with this.

Change-Id I34a4d2a6a2afa5437ab444e2259a43b523123438
---
 ...8-4.6.9p11.1-gpu-GPU-Kernel-driver-integr.patch | 1040 ++++++++++
 ...5-gpu-Add-global-value-for-minimum-3D-clo.patch |   62 +
 ...4-4-gpu-use-new-PU-power-on-off-interface.patch |   53 +
 ...8-1-GPU-Integrate-4.6.9p12-release-kernel.patch | 2006 ++++++++++++++++++++
 ...5-GPU-Correct-suspend-resume-calling-afte.patch |   61 +
 ...0-gpu-Correct-section-mismatch-in-gpu-ker.patch |   60 +
 ...m-vivante-Add-00-sufix-in-returned-bus-Id.patch |   31 +
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    9 +
 8 files changed, 3322 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0001-ENGR00255688-4.6.9p11.1-gpu-GPU-Kernel-driver-integr.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0002-ENGR00265465-gpu-Add-global-value-for-minimum-3D-clo.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0003-ENGR00261814-4-gpu-use-new-PU-power-on-off-interface.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0004-ENGR00264288-1-GPU-Integrate-4.6.9p12-release-kernel.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/0006-ENGR00265130-gpu-Correct-section-mismatch-in-gpu-ker.patch
 create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/drm-vivante-Add-00-sufix-in-returned-bus-Id.patch
recipes-kernel/linux/linux-imx-3.0.35/0001-ENGR00255688-4.6.9p11.1-gpu-GPU-Kernel-driver-integr.patch new file +1040 -0
new file mode 100644
index 0000000..9c7cd44
@@ -0,0 +1,1040 @@
+From 46e3a6de5adb9379f9d6eef2c038c2f18637d407 Mon Sep 17 00:00:00 2001
+From: Loren Huang <[email protected]>
+Date: Mon, 25 Mar 2013 15:43:57 +0800
+Subject: [PATCH 1/6] ENGR00255688 4.6.9p11.1 [gpu]GPU Kernel driver
+ integration
+
+4.6.9p11.1 GPU kernel driver integration
+Cherry pick from imx_3.0.35
+
+Upstream-Status: Backport [3.5.7-1.0.0]
+
+Signed-off-by: Loren Huang <[email protected]>
+Acked-by: Lily Zhang
+---
+ drivers/mxc/gpu-viv/Kbuild                         |   2 +-
+ .../arch/XAQ2/hal/kernel/gc_hal_kernel_context.c   |   2 +-
+ .../arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c  |   7 +-
+ drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h     |   2 +-
+ drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c  |  53 ++++--
+ .../mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c   |   5 +-
+ drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c | 178 ++++++++++++---------
+ .../hal/kernel/gc_hal_kernel_video_memory.c        |   3 +-
+ .../gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h    |  13 +-
+ drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h |  25 +++
+ .../mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h    |  35 ++++
+ .../mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h    |   2 +-
+ .../hal/os/linux/kernel/gc_hal_kernel_driver.c     |   2 +-
+ .../hal/os/linux/kernel/gc_hal_kernel_linux.h      |   6 +
+ .../gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c |  82 +++++++++-
+ 15 files changed, 304 insertions(+), 113 deletions(-)
+
+diff --git a/drivers/mxc/gpu-viv/Kbuild b/drivers/mxc/gpu-viv/Kbuild
+index 0b18a7b..93b1259 100644
+--- a/drivers/mxc/gpu-viv/Kbuild
++++ b/drivers/mxc/gpu-viv/Kbuild
+@@ -1,6 +1,6 @@
+ ##############################################################################
+ #
+-#    Copyright (C) 2005 - 2012 by Vivante Corp.
++#    Copyright (C) 2005 - 2013 by Vivante Corp.
+ #
+ #    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
+diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c
+index 22e1f27..24003e7 100644
+--- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c
++++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c
+@@ -471,7 +471,7 @@ _InitializeContextBuffer(
+     index += _SwitchPipe(Context, index, gcvPIPE_3D);
+ 
+     /* Current context pointer. */
+-#if gcdDEBUG 
++#if gcdDEBUG
+     index += _State(Context, index, 0x03850 >> 2, 0x00000000, 1, gcvFALSE, gcvFALSE);
+ #endif
+ 
+diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
+index a87259e..3829999 100644
+--- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
++++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
+@@ -232,7 +232,8 @@ _IdentifyHardware(
+     }
+ 
+     /* Exception for GC1000, revision 5035 &  GC800, revision 4612 */
+-    if (((Identity->chipModel == gcv1000) && (Identity->chipRevision == 0x5035))
++    if (((Identity->chipModel == gcv1000) && ((Identity->chipRevision == 0x5035)
++                                           || (Identity->chipRevision == 0x5036)))
+ 	 || ((Identity->chipModel == gcv800) && (Identity->chipRevision == 0x4612)))
+     {
+         Identity->superTileMode = 1;
+@@ -751,7 +752,7 @@ gckHARDWARE_Construct(
+     /* Initialize the fast clear. */
+     gcmkONERROR(gckHARDWARE_SetFastClear(hardware, -1, -1));
+ 
+-#if !gcdENABLE_128B_MERGE  
++#if !gcdENABLE_128B_MERGE
+ 
+     if (((((gctUINT32) (hardware->identity.chipMinorFeatures2)) >> (0 ? 21:21) & ((gctUINT32) ((((1 ? 21:21) - (0 ? 21:21) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 21:21) - (0 ? 21:21) + 1)))))) == (0x1  & ((gctUINT32) ((((1 ? 21:21) - (0 ? 21:21) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 21:21) - (0 ? 21:21) + 1))))))))
+     {
+@@ -1027,7 +1028,7 @@ gckHARDWARE_InitializeHardware(
+                                       0x00424,
+                                       baseAddress));
+ 
+-#if !VIVANTE_PROFILER 
++#if !VIVANTE_PROFILER
+     {
+         gctUINT32 data;
+ 
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h
+index 1da80b7..5896e93 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h
++++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h
+@@ -186,7 +186,7 @@ typedef struct _gcsDATABASE
+     gctUINT64                           idle;
+ 
+     /* Pointer to database. */
+-    gcsDATABASE_RECORD_PTR              list;
++    gcsDATABASE_RECORD_PTR              list[48];
+ 
+ #if gcdSECURE_USER
+     /* Secure cache. */
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
+index 1fb18fb..bc5f083 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
++++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
+@@ -26,6 +26,9 @@
+ /*******************************************************************************
+ ***** Private fuctions ********************************************************/
+ 
++#define _GetSlot(database, x) \
++    (gctUINT32)(((gcmPTR_TO_UINT64(x) >> 7) % gcmCOUNTOF(database->list)))
++
+ /*******************************************************************************
+ **  gckKERNEL_NewDatabase
+ **
+@@ -56,6 +59,7 @@ gckKERNEL_NewDatabase(
+     gcsDATABASE_PTR database;
+     gctBOOL acquired = gcvFALSE;
+     gctSIZE_T slot;
++    gcsDATABASE_PTR existingDatabase;
+ 
+     gcmkHEADER_ARG("Kernel=0x%x ProcessID=%d", Kernel, ProcessID);
+ 
+@@ -63,6 +67,21 @@ gckKERNEL_NewDatabase(
+     gcmkONERROR(gckOS_AcquireMutex(Kernel->os, Kernel->db->dbMutex, gcvINFINITE));
+     acquired = gcvTRUE;
+ 
++    /* Compute the hash for the database. */
++    slot = ProcessID % gcmCOUNTOF(Kernel->db->db);
++
++    /* Walk the hash list. */
++    for (existingDatabase = Kernel->db->db[slot];
++         existingDatabase != gcvNULL;
++         existingDatabase = existingDatabase->next)
++    {
++        if (existingDatabase->processID == ProcessID)
++        {
++            /* One process can't be added twice. */
++            gcmkONERROR(gcvSTATUS_NOT_SUPPORTED);
++        }
++    }
++
+     if (Kernel->db->freeDatabase != gcvNULL)
+     {
+         /* Allocate a database from the free list. */
+@@ -81,9 +100,6 @@ gckKERNEL_NewDatabase(
+         database = pointer;
+     }
+ 
+-    /* Compute the hash for the database. */
+-    slot = ProcessID % gcmCOUNTOF(Kernel->db->db);
+-
+     /* Insert the database into the hash. */
+     database->next   = Kernel->db->db[slot];
+     Kernel->db->db[slot] = database;
+@@ -350,6 +366,7 @@ static gceSTATUS
+ gckKERNEL_NewRecord(
+     IN gckKERNEL Kernel,
+     IN gcsDATABASE_PTR Database,
++    IN gctUINT32 Slot,
+     OUT gcsDATABASE_RECORD_PTR * Record
+     )
+ {
+@@ -383,8 +400,8 @@ gckKERNEL_NewRecord(
+     }
+ 
+     /* Insert the record in the database. */
+-    record->next   = Database->list;
+-    Database->list = record;
++    record->next         = Database->list[Slot];
++    Database->list[Slot] = record;
+ 
+     /* Release the database mutex. */
+     gcmkONERROR(gckOS_ReleaseMutex(Kernel->os, Kernel->db->dbMutex));
+@@ -449,6 +466,7 @@ gckKERNEL_DeleteRecord(
+     gceSTATUS status;
+     gctBOOL acquired = gcvFALSE;
+     gcsDATABASE_RECORD_PTR record, previous;
++    gctUINT32 slot = _GetSlot(Database, Data);
+ 
+     gcmkHEADER_ARG("Kernel=0x%x Database=0x%x Type=%d Data=0x%x",
+                    Kernel, Database, Type, Data);
+@@ -458,8 +476,9 @@ gckKERNEL_DeleteRecord(
+         gckOS_AcquireMutex(Kernel->os, Kernel->db->dbMutex, gcvINFINITE));
+     acquired = gcvTRUE;
+ 
++
+     /* Scan the database for this record. */
+-    for (record = Database->list, previous = gcvNULL;
++    for (record = Database->list[slot], previous = gcvNULL;
+          record != gcvNULL;
+          record = record->next
+     )
+@@ -490,7 +509,7 @@ gckKERNEL_DeleteRecord(
+     /* Remove record from database. */
+     if (previous == gcvNULL)
+     {
+-        Database->list = record->next;
++        Database->list[slot] = record->next;
+     }
+     else
+     {
+@@ -557,6 +576,7 @@ gckKERNEL_FindRecord(
+     gceSTATUS status;
+     gctBOOL acquired = gcvFALSE;
+     gcsDATABASE_RECORD_PTR record;
++    gctUINT32 slot = _GetSlot(Database, Data);
+ 
+     gcmkHEADER_ARG("Kernel=0x%x Database=0x%x Type=%d Data=0x%x",
+                    Kernel, Database, Type, Data);
+@@ -567,7 +587,7 @@ gckKERNEL_FindRecord(
+     acquired = gcvTRUE;
+ 
+     /* Scan the database for this record. */
+-    for (record = Database->list;
++    for (record = Database->list[slot];
+          record != gcvNULL;
+          record = record->next
+     )
+@@ -642,6 +662,7 @@ gckKERNEL_CreateProcessDB(
+ {
+     gceSTATUS status;
+     gcsDATABASE_PTR database = gcvNULL;
++    gctUINT32 i;
+ 
+     gcmkHEADER_ARG("Kernel=0x%x ProcessID=%d", Kernel, ProcessID);
+ 
+@@ -668,7 +689,11 @@ gckKERNEL_CreateProcessDB(
+     database->mapUserMemory.bytes      = 0;
+     database->mapUserMemory.maxBytes   = 0;
+     database->mapUserMemory.totalBytes = 0;
+-    database->list                  = gcvNULL;
++
++    for (i = 0; i < gcmCOUNTOF(database->list); i++)
++    {
++        database->list[i]              = gcvNULL;
++    }
+ 
+ #if gcdSECURE_USER
+     {
+@@ -848,7 +873,7 @@ gckKERNEL_AddProcessDB(
+     gcmkONERROR(gckKERNEL_FindDatabase(Kernel, ProcessID, gcvFALSE, &database));
+ 
+     /* Create a new record in the database. */
+-    gcmkONERROR(gckKERNEL_NewRecord(Kernel, database, &record));
++    gcmkONERROR(gckKERNEL_NewRecord(Kernel, database, _GetSlot(database, Pointer), &record));
+ 
+     /* Initialize the record. */
+     record->kernel   = Kernel;
+@@ -1086,6 +1111,7 @@ gckKERNEL_DestroyProcessDB(
+     gctPHYS_ADDR physical;
+     gcuVIDMEM_NODE_PTR node;
+     gckKERNEL kernel = Kernel;
++    gctUINT32 i;
+ 
+     gcmkHEADER_ARG("Kernel=0x%x ProcessID=%d", Kernel, ProcessID);
+ 
+@@ -1126,8 +1152,11 @@ gckKERNEL_DestroyProcessDB(
+                        ProcessID);
+     }
+ 
++    for(i = 0; i < gcmCOUNTOF(database->list); i++)
++    {
++
+     /* Walk all records. */
+-    for (record = database->list; record != gcvNULL; record = next)
++    for (record = database->list[i]; record != gcvNULL; record = next)
+     {
+         /* Next next record. */
+         next = record->next;
+@@ -1293,6 +1322,8 @@ gckKERNEL_DestroyProcessDB(
+                                            gcvNULL));
+     }
+ 
++    }
++
+     /* Delete the database. */
+     gcmkONERROR(gckKERNEL_DeleteDatabase(Kernel, database));
+ 
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
+index f78d096..217f7f1 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
++++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
+@@ -959,6 +959,8 @@ gckEVENT_AddList(
+     record->kernel = Event->kernel;
+ #endif
+ 
++    gcmkONERROR(__RemoveRecordFromProcessDB(Event, record));
++
+     /* Acquire the mutex. */
+     gcmkONERROR(gckOS_AcquireMutex(Event->os, Event->eventListMutex, gcvINFINITE));
+     acquired = gcvTRUE;
+@@ -1539,9 +1541,6 @@ gckEVENT_Submit(
+             gcmkONERROR(gckOS_ReleaseMutex(Event->os, Event->eventListMutex));
+             acquired = gcvFALSE;
+ 
+-            gcmkONERROR(__RemoveRecordFromProcessDB(Event,
+-                Event->queues[id].head));
+-
+ #if gcdNULL_DRIVER
+             /* Notify immediately on infinite hardware. */
+             gcmkONERROR(gckEVENT_Interrupt(Event, 1 << id));
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c
+index 0c71e28..43c9297 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c
++++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c
+@@ -97,6 +97,43 @@ static gcsMirrorPageTable_PTR mirrorPageTable = gcvNULL;
+ static gctPOINTER mirrorPageTableMutex = gcvNULL;
+ #endif
+ 
++static void
++_WritePageEntry(
++    IN gctUINT32_PTR PageEntry,
++    IN gctUINT32     EntryValue
++    )
++{
++    static gctUINT16 data = 0xff00;
++
++    if (*(gctUINT8 *)&data == 0xff)
++    {
++        *PageEntry = gcmSWAB32(EntryValue);
++    }
++    else
++    {
++        *PageEntry = EntryValue;
++    }
++}
++
++static gctUINT32
++_ReadPageEntry(
++    IN gctUINT32_PTR PageEntry
++    )
++{
++    static gctUINT16 data = 0xff00;
++    gctUINT32 entryValue;
++
++    if (*(gctUINT8 *)&data == 0xff)
++    {
++        entryValue = *PageEntry;
++        return gcmSWAB32(entryValue);
++    }
++    else
++    {
++        return *PageEntry;
++    }
++}
++
+ static gceSTATUS
+ _FillPageTable(
+     IN gctUINT32_PTR PageTable,
+@@ -108,7 +145,7 @@ _FillPageTable(
+ 
+     for (i = 0; i < PageCount; i++)
+     {
+-        PageTable[i] = EntryValue;
++        _WritePageEntry(PageTable + i, EntryValue);
+     }
+ 
+     return gcvSTATUS_OK;
+@@ -132,16 +169,16 @@ _Link(
+         gctUINT32_PTR pageTable = Mmu->pageTableLogical;
+ 
+         /* Dispatch on node type. */
+-        switch (gcmENTRY_TYPE(pageTable[Index]))
++        switch (gcmENTRY_TYPE(_ReadPageEntry(&pageTable[Index])))
+         {
+         case gcvMMU_SINGLE:
+             /* Set single index. */
+-            pageTable[Index] = (Next << 8) | gcvMMU_SINGLE;
++            _WritePageEntry(&pageTable[Index], (Next << 8) | gcvMMU_SINGLE);
+             break;
+ 
+         case gcvMMU_FREE:
+             /* Set index. */
+-            pageTable[Index + 1] = Next;
++            _WritePageEntry(&pageTable[Index + 1], Next);
+             break;
+ 
+         default:
+@@ -167,13 +204,13 @@ _AddFree(
+     if (Count == 1)
+     {
+         /* Initialize a single page node. */
+-        pageTable[Node] = (~((1U<<8)-1)) | gcvMMU_SINGLE;
++        _WritePageEntry(pageTable + Node, (~((1U<<8)-1)) | gcvMMU_SINGLE);
+     }
+     else
+     {
+         /* Initialize the node. */
+-        pageTable[Node + 0] = (Count << 8) | gcvMMU_FREE;
+-        pageTable[Node + 1] = ~0U;
++        _WritePageEntry(pageTable + Node + 0, (Count << 8) | gcvMMU_FREE);
++        _WritePageEntry(pageTable + Node + 1, ~0U);
+     }
+ 
+     /* Append the node. */
+@@ -196,7 +233,7 @@ _Collect(
+     for (i = 0; i < Mmu->pageTableEntries; ++i)
+     {
+         /* Dispatch based on type of page. */
+-        switch (gcmENTRY_TYPE(pageTable[i]))
++        switch (gcmENTRY_TYPE(_ReadPageEntry(&pageTable[i])))
+         {
+         case gcvMMU_USED:
+             /* Used page, so close any open node. */
+@@ -229,10 +266,10 @@ _Collect(
+             }
+ 
+             /* Advance the count. */
+-            count += pageTable[i] >> 8;
++            count += _ReadPageEntry(&pageTable[i]) >> 8;
+ 
+             /* Advance the index into the page table. */
+-            i     += (pageTable[i] >> 8) - 1;
++            i     += (_ReadPageEntry(&pageTable[i]) >> 8) - 1;
+             break;
+ 
+         default:
+@@ -341,19 +378,20 @@ _FillFlatMapping(
+                 gcmkONERROR(gcvSTATUS_NOT_ALIGNED);
+             }
+ 
+-            *(Mmu->mtlbLogical + mStart)
+-                      = stlb->physBase
+-                        /* 64KB page size */
+-                        | (1 << 2)
+-                        /* Ignore exception */
+-                        | (0 << 1)
+-                        /* Present */
+-                        | (1 << 0);
++            _WritePageEntry(Mmu->mtlbLogical + mStart,
++                            stlb->physBase
++                            /* 64KB page size */
++                            | (1 << 2)
++                            /* Ignore exception */
++                            | (0 << 1)
++                            /* Present */
++                            | (1 << 0)
++                            );
+ #if gcdMMU_TABLE_DUMP
+             gckOS_Print("%s(%d): insert MTLB[%d]: %08x\n",
+                 __FUNCTION__, __LINE__,
+                 mStart,
+-                *(Mmu->mtlbLogical + mStart));
++                _ReadPageEntry(Mmu->mtlbLogical + mStart));
+ #endif
+ 
+             stlb->mtlbIndex = mStart;
+@@ -368,12 +406,12 @@ _FillFlatMapping(
+             while (sStart <= last)
+             {
+                 gcmkASSERT(!(start & gcdMMU_PAGE_64K_MASK));
+-                *(stlb->logical + sStart) = _SetPage(start);
++                _WritePageEntry(stlb->logical + sStart, _SetPage(start));
+ #if gcdMMU_TABLE_DUMP
+                 gckOS_Print("%s(%d): insert STLB[%d]: %08x\n",
+                     __FUNCTION__, __LINE__,
+                     sStart,
+-                    *(stlb->logical + sStart));
++                    _ReadPageEntry(stlb->logical + sStart));
+ #endif
+                 /* next page. */
+                 start += gcdMMU_PAGE_64K_SIZE;
+@@ -428,7 +466,7 @@ OnError:
+         if (pre->mtlbEntryNum != 0)
+         {
+             gcmkASSERT(pre->mtlbEntryNum == 1);
+-            *(Mmu->mtlbLogical + pre->mtlbIndex) = 0;
++            _WritePageEntry(Mmu->mtlbLogical + pre->mtlbIndex, 0);
+         }
+ 
+         gcmkVERIFY_OK(gcmkOS_SAFE_FREE(Mmu->os, pre));
+@@ -493,8 +531,8 @@ _SetupDynamicSpace(
+ 
+     /* Initilization. */
+     pageTable      = Mmu->pageTableLogical;
+-    pageTable[0]   = (Mmu->pageTableEntries << 8) | gcvMMU_FREE;
+-    pageTable[1]   = ~0U;
++    _WritePageEntry(pageTable,     (Mmu->pageTableEntries << 8) | gcvMMU_FREE);
++    _WritePageEntry(pageTable + 1, ~0U);
+     Mmu->heapList  = 0;
+     Mmu->freeNodes = gcvFALSE;
+ 
+@@ -509,18 +547,20 @@ _SetupDynamicSpace(
+     /* Map to Master TLB. */
+     for (; i < gcdMMU_MTLB_ENTRY_NUM; i++)
+     {
+-        Mmu->mtlbLogical[i] = physical
+-                            /* 4KB page size */
+-                            | (0 << 2)
+-                            /* Ignore exception */
+-                            | (0 << 1)
+-                            /* Present */
+-                            | (1 << 0);
++        _WritePageEntry(Mmu->mtlbLogical + i,
++                        physical
++                        /* 4KB page size */
++                        | (0 << 2)
++                        /* Ignore exception */
++                        | (0 << 1)
++                        /* Present */
++                        | (1 << 0)
++                        );
+ #if gcdMMU_TABLE_DUMP
+         gckOS_Print("%s(%d): insert MTLB[%d]: %08x\n",
+                 __FUNCTION__, __LINE__,
+                 i,
+-                *(Mmu->mtlbLogical + i));
++                _ReadPageEntry(Mmu->mtlbLogical + i));
+ #endif
+         physical += gcdMMU_STLB_4K_SIZE;
+     }
+@@ -645,18 +685,11 @@ _Construct(
+         pageTable      = mmu->pageTableLogical;
+ 
+ #if gcdMMU_CLEAR_VALUE
+-        {
+-            gctUINT32 i;
+-
+-            for (i = 0; i < mmu->pageTableEntries; ++i)
+-            {
+-                pageTable[i] = gcdMMU_CLEAR_VALUE;
+-            }
+-        }
++        _FillPageTable(pageTable, mmu->pageTableEntries, gcdMMU_CLEAR_VALUE);
+ #endif
+ 
+-        pageTable[0]   = (mmu->pageTableEntries << 8) | gcvMMU_FREE;
+-        pageTable[1]   = ~0U;
++        _WritePageEntry(pageTable,     (mmu->pageTableEntries << 8) | gcvMMU_FREE);
++        _WritePageEntry(pageTable + 1, ~0U);
+         mmu->heapList  = 0;
+         mmu->freeNodes = gcvFALSE;
+ 
+@@ -797,7 +830,7 @@ _Destroy(
+         if (pre->mtlbEntryNum != 0)
+         {
+             gcmkASSERT(pre->mtlbEntryNum == 1);
+-            *(Mmu->mtlbLogical + pre->mtlbIndex) = 0;
++            _WritePageEntry(Mmu->mtlbLogical + pre->mtlbIndex, 0);
+ #if gcdMMU_TABLE_DUMP
+             gckOS_Print("%s(%d): clean MTLB[%d]\n",
+                 __FUNCTION__, __LINE__,
+@@ -1044,7 +1077,7 @@ _AllocatePages(
+         for (index = Mmu->heapList; !gotIt && (index < Mmu->pageTableEntries);)
+         {
+             /* Check the node type. */
+-            switch (gcmENTRY_TYPE(pageTable[index]))
++            switch (gcmENTRY_TYPE(_ReadPageEntry(&pageTable[index])))
+             {
+             case gcvMMU_SINGLE:
+                 /* Single odes are valid if we only need 1 page. */
+@@ -1056,13 +1089,13 @@ _AllocatePages(
+                 {
+                     /* Move to next node. */
+                     previous = index;
+-                    index    = pageTable[index] >> 8;
++                    index    = _ReadPageEntry(&pageTable[index]) >> 8;
+                 }
+                 break;
+ 
+             case gcvMMU_FREE:
+                 /* Test if the node has enough space. */
+-                if (PageCount <= (pageTable[index] >> 8))
++                if (PageCount <= (_ReadPageEntry(&pageTable[index]) >> 8))
+                 {
+                     gotIt = gcvTRUE;
+                 }
+@@ -1070,7 +1103,7 @@ _AllocatePages(
+                 {
+                     /* Move to next node. */
+                     previous = index;
+-                    index    = pageTable[index + 1];
++                    index    = _ReadPageEntry(&pageTable[index + 1]);
+                 }
+                 break;
+ 
+@@ -1099,36 +1132,36 @@ _AllocatePages(
+         }
+     }
+ 
+-    switch (gcmENTRY_TYPE(pageTable[index]))
++    switch (gcmENTRY_TYPE(_ReadPageEntry(&pageTable[index])))
+     {
+     case gcvMMU_SINGLE:
+         /* Unlink single node from free list. */
+         gcmkONERROR(
+-            _Link(Mmu, previous, pageTable[index] >> 8));
++            _Link(Mmu, previous, _ReadPageEntry(&pageTable[index]) >> 8));
+         break;
+ 
+     case gcvMMU_FREE:
+         /* Check how many pages will be left. */
+-        left = (pageTable[index] >> 8) - PageCount;
++        left = (_ReadPageEntry(&pageTable[index]) >> 8) - PageCount;
+         switch (left)
+         {
+         case 0:
+             /* The entire node is consumed, just unlink it. */
+             gcmkONERROR(
+-                _Link(Mmu, previous, pageTable[index + 1]));
++                _Link(Mmu, previous, _ReadPageEntry(&pageTable[index + 1])));
+             break;
+ 
+         case 1:
+             /* One page will remain.  Convert the node to a single node and
+             ** advance the index. */
+-            pageTable[index] = (pageTable[index + 1] << 8) | gcvMMU_SINGLE;
++            _WritePageEntry(&pageTable[index], (_ReadPageEntry(&pageTable[index + 1]) << 8) | gcvMMU_SINGLE);
+             index ++;
+             break;
+ 
+         default:
+             /* Enough pages remain for a new node.  However, we will just adjust
+             ** the size of the current node and advance the index. */
+-            pageTable[index] = (left << 8) | gcvMMU_FREE;
++            _WritePageEntry(&pageTable[index], (left << 8) | gcvMMU_FREE);
+             index += left;
+             break;
+         }
+@@ -1232,35 +1265,32 @@ _FreePages(
+ #if gcdMMU_CLEAR_VALUE
+     if (Mmu->hardware->mmuVersion == 0)
+     {
+-        gctUINT32 i;
+-
+-        for (i = 0; i < PageCount; ++i)
+-        {
+-            pageTable[i] = gcdMMU_CLEAR_VALUE;
+-        }
++        _FillPageTable(pageTable, PageCount, gcdMMU_CLEAR_VALUE);
+     }
+ #endif
+ 
+     if (PageCount == 1)
+     {
+         /* Single page node. */
+-        pageTable[0] = (~((1U<<8)-1)) | gcvMMU_SINGLE
++        _WritePageEntry(pageTable,
++                        (~((1U<<8)-1)) | gcvMMU_SINGLE
+ #if gcdUSE_MMU_EXCEPTION
+-                     /* Enable exception */
+-                     | (1 << 1)
++                        /* Enable exception */
++                        | 1 << 1
+ #endif
+-                     ;
++                        );
+     }
+     else
+     {
+         /* Mark the node as free. */
+-        pageTable[0] = (PageCount << 8) | gcvMMU_FREE
++        _WritePageEntry(pageTable,
++                        (PageCount << 8) | gcvMMU_FREE
+ #if gcdUSE_MMU_EXCEPTION
+-                     /* Enable exception */
+-                     | (1 << 1)
++                        /* Enable exception */
++                        | 1 << 1
+ #endif
+-                     ;
+-        pageTable[1] = ~0U;
++                       );
++        _WritePageEntry(pageTable + 1, ~0U);
+ 
+ #if gcdUSE_MMU_EXCEPTION
+         /* Enable exception */
+@@ -1509,12 +1539,8 @@ gckMMU_SetPage(
+         data = _SetPage(PageAddress);
+     }
+ 
+-    if (Mmu->hardware->bigEndian)
+-    {
+-        data = gcmSWAB32(data);
+-    }
++    _WritePageEntry(PageEntry, data);
+ 
+-    *PageEntry = data;
+ #if gcdMIRROR_PAGETABLE
+     for (i = 0; i < mirrorPageTable->reference; i++)
+     {
+@@ -1526,11 +1552,11 @@ gckMMU_SetPage(
+ 
+             if (mmu->hardware->mmuVersion == 0)
+             {
+-                *pageEntry = PageAddress;
++                _WritePageEntry(pageEntry, PageAddress);
+             }
+             else
+             {
+-                *pageEntry = _SetPage(PageAddress);
++                _WritePageEntry(pageEntry, _SetPage(PageAddress));
+             }
+         }
+ 
+@@ -1734,7 +1760,7 @@ gckMMU_DumpPageTableEntry(
+               * gcdMMU_STLB_4K_ENTRY_NUM
+               + stlb;
+ 
+-        gcmkPRINT("    Page table entry = 0x%08X", pageTable[index]);
++        gcmkPRINT("    Page table entry = 0x%08X", _ReadPageEntry(pageTable + index));
+     }
+ 
+     gcmkFOOTER_NO();
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+index d49aa64..8a442a2 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
++++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c
+@@ -1027,7 +1027,8 @@ gckVIDMEM_AllocateLinear(
+     )
+     {
+         /* The left memory is for small memory.*/
+-        gcmkONERROR(gcvSTATUS_OUT_OF_MEMORY);
++        status = gcvSTATUS_OUT_OF_MEMORY;
++        goto OnError;
+     }
+ #endif
+ 
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h
+index 496276e..06eea79 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h
++++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h
+@@ -227,7 +227,8 @@ gcoOS_GetDisplayInfoEx(
+     );
+ 
+ gceSTATUS
+-gcoOS_GetNextDisplayInfoEx(
++gcoOS_GetNextDisplayInfoExByIndex(
++    IN gctINT Index,
+     IN HALNativeDisplayType Display,
+     IN HALNativeWindowType Window,
+     IN gctUINT DisplayInfoSize,
+@@ -274,15 +275,15 @@ gcoOS_SetDisplayVirtualEx(
+ 
+ gceSTATUS
+ gcoOS_SetSwapInterval(
+-	IN HALNativeDisplayType Display,
+-	IN gctINT Interval
++    IN HALNativeDisplayType Display,
++    IN gctINT Interval
+ );
+ 
+ gceSTATUS
+ gcoOS_GetSwapInterval(
+-	IN HALNativeDisplayType Display,
+-	IN gctINT_PTR Min,
+-	IN gctINT_PTR Max
++    IN HALNativeDisplayType Display,
++    IN gctINT_PTR Min,
++    IN gctINT_PTR Max
+ );
+ 
+ gceSTATUS
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h
+index d441d1d..249b61b 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h
++++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h
+@@ -1430,6 +1430,16 @@ typedef enum _gceTEXTURE_FACE
+ }
+ gceTEXTURE_FACE;
+ 
++#if gcdFORCE_MIPMAP
++typedef enum
++{
++    gcvForceMipDisabled  = 0,
++    gcvForceMipEnable    = 1,
++    gcvForceMipGenerated = 2,
++    gcvForceMipNever     = 3,
++}gceFORCE_MIPMAP;
++#endif
++
+ typedef struct _gcsTEXTURE
+ {
+     /* Addressing modes. */
+@@ -1446,6 +1456,10 @@ typedef struct _gcsTEXTURE
+     gceTEXTURE_FILTER           mipFilter;
+     gctUINT                     anisoFilter;
+     gctBOOL                     forceTopLevel;
++    gctBOOL                     autoMipmap;
++#if gcdFORCE_MIPMAP
++    gceFORCE_MIPMAP             forceMipmap;
++#endif
+     /* Level of detail. */
+     gctFIXED_POINT              lodBias;
+     gctFIXED_POINT              lodMin;
+@@ -1479,7 +1493,18 @@ gceSTATUS
+ gcoTEXTURE_Destroy(
+     IN gcoTEXTURE Texture
+     );
++#if gcdFORCE_MIPMAP
++gceSTATUS
++gcoTEXTURE_DestroyForceMipmap(
++    IN gcoTEXTURE Texture
++    );
+ 
++gceSTATUS
++gcoTEXTURE_GetMipLevels(
++    IN gcoTEXTURE Texture,
++    OUT gctINT * levels
++    );
++#endif
+ /* Replace a mipmap in gcoTEXTURE object. */
+ gceSTATUS
+ gcoTEXTURE_ReplaceMipMap(
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
+index 86e9133..afe83d0 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
++++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
+@@ -114,6 +114,30 @@
+ #define COMMAND_PROCESSOR_VERSION               1
+ 
+ /*
++    gcdDUMP_KEY
++
++        Set this to a string that appears in 'cat /proc/<pid>/cmdline'. E.g. 'camera'.
++        HAL will create dumps for the processes matching this key.
++*/
++#ifndef gcdDUMP_KEY
++#   define gcdDUMP_KEY                          "process"
++#endif
++
++/*
++    gcdDUMP_PATH
++
++        The dump file location. Some processes cannot write to the sdcard.
++        Try apps' data dir, e.g. /data/data/com.android.launcher
++*/
++#ifndef gcdDUMP_PATH
++#if defined(ANDROID)
++#   define gcdDUMP_PATH                         "/mnt/sdcard/"
++#else
++#   define gcdDUMP_PATH                         "./"
++#endif
++#endif
++
++/*
+     gcdDUMP
+ 
+         When set to 1, a dump of all states and memory uploads, as well as other
+@@ -342,6 +366,17 @@
+ #endif
+ 
+ /*
++    gcdUSER_HEAP_ALLOCATOR
++
++        Set to 1 to enable user mode heap allocator for fast memory allocation
++        and destroying. Otherwise, memory allocation/destroying in user mode
++        will be directly managed by system. Only for linux for now.
++*/
++#ifndef gcdUSER_HEAP_ALLOCATOR
++#   define gcdUSER_HEAP_ALLOCATOR               1
++#endif
++
++/*
+     gcdHEAP_SIZE
+ 
+         Set the allocation size for the internal heaps.  Each time a heap is
+diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h
+index 2881604..808fde0 100644
+--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h
++++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h
+@@ -28,7 +28,7 @@
+ 
+ #define gcvVERSION_PATCH        9
+ 
+-#define gcvVERSION_BUILD     1210
++#define gcvVERSION_BUILD     4651
+ 
+ #define gcvVERSION_DATE      __DATE__
+ 
+diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+index 4e3819c..2ed3d0e 100644
+--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
++++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+@@ -663,7 +663,7 @@ static int drv_mmap(
+ 
+ #if !gcdPAGED_MEMORY_CACHEABLE
+     vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+-    vma->vm_flags    |= VM_IO | VM_DONTCOPY | VM_DONTEXPAND;
++    vma->vm_flags    |= gcdVM_FLAGS;
+ #endif
+     vma->vm_pgoff     = 0;
+ 
+diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
+index 9c0bcd5..3c148f6 100644
+--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
++++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
+@@ -73,6 +73,12 @@
+ 
+ #define GetPageCount(size, offset) 	((((size) + ((offset) & ~PAGE_CACHE_MASK)) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION (3,7,0)
++#define gcdVM_FLAGS (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP)
++#else
++#define gcdVM_FLAGS (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED)
++#endif
++
+ static inline gctINT
+ GetOrder(
+ 	IN gctINT numPages
+diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+index c07ded8..9c2bae6 100644
+--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
++++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+@@ -869,6 +869,60 @@ _UnmapUserLogical(
+ #endif
+ }
+ 
++gceSTATUS
++_QueryProcessPageTable(
++    IN gctPOINTER Logical,
++    OUT gctUINT32 * Address
++    )
++{
++    spinlock_t *lock;
++    gctUINTPTR_T logical = (gctUINTPTR_T)Logical;
++    pgd_t *pgd;
++    pud_t *pud;
++    pmd_t *pmd;
++    pte_t *pte;
++
++    if (!current->mm)
++    {
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    pgd = pgd_offset(current->mm, logical);
++    if (pgd_none(*pgd) || pgd_bad(*pgd))
++    {
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    pud = pud_offset(pgd, logical);
++    if (pud_none(*pud) || pud_bad(*pud))
++    {
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    pmd = pmd_offset(pud, logical);
++    if (pmd_none(*pmd) || pmd_bad(*pmd))
++    {
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    pte = pte_offset_map_lock(current->mm, pmd, logical, &lock);
++    if (!pte)
++    {
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    if (!pte_present(*pte))
++    {
++        pte_unmap_unlock(pte, lock);
++        return gcvSTATUS_NOT_FOUND;
++    }
++
++    *Address = (pte_pfn(*pte) << PAGE_SHIFT) | (logical & ~PAGE_MASK);
++    pte_unmap_unlock(pte, lock);
++
++    return gcvSTATUS_OK;
++}
++
+ /*******************************************************************************
+ **
+ **  gckOS_Construct
+@@ -1106,6 +1160,9 @@ _CreateKernelVirtualMapping(
+                     numPages,
+                     0,
+                     PAGE_KERNEL);
++
++        /* Trigger a page fault. */
++        memset(addr, 0, numPages * PAGE_SIZE);
+     }
+ #else
+     struct page ** pages;
+@@ -1136,6 +1193,9 @@ _CreateKernelVirtualMapping(
+     /* ioremap() can't work on system memory since 2.6.38. */
+     addr = vmap(pages, numPages, 0, gcmkNONPAGED_MEMROY_PROT(PAGE_KERNEL));
+ 
++    /* Trigger a page fault. */
++    memset(addr, 0, numPages * PAGE_SIZE);
++
+     if (free)
+     {
+         kfree(pages);
+@@ -1540,7 +1600,7 @@ gckOS_MapMemory(
+ #else
+ #if !gcdPAGED_MEMORY_CACHEABLE
+         mdlMap->vma->vm_page_prot = gcmkPAGED_MEMROY_PROT(mdlMap->vma->vm_page_prot);
+-        mdlMap->vma->vm_flags |= VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED;
++        mdlMap->vma->vm_flags |= gcdVM_FLAGS;
+ #   endif
+         mdlMap->vma->vm_pgoff = 0;
+ 
+@@ -1987,7 +2047,7 @@ gckOS_AllocateNonPagedMemory(
+         }
+ #else
+         mdlMap->vma->vm_page_prot = gcmkNONPAGED_MEMROY_PROT(mdlMap->vma->vm_page_prot);
+-        mdlMap->vma->vm_flags |= VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED;
++        mdlMap->vma->vm_flags |= gcdVM_FLAGS;
+         mdlMap->vma->vm_pgoff = 0;
+ 
+         if (remap_pfn_range(mdlMap->vma,
+@@ -2367,12 +2427,18 @@ gckOS_GetPhysicalAddress(
+     gcmkVERIFY_OBJECT(Os, gcvOBJ_OS);
+     gcmkVERIFY_ARGUMENT(Address != gcvNULL);
+ 
+-    /* Get current process ID. */
+-    processID = _GetProcessID();
++    /* Query page table of current process first. */
++    status = _QueryProcessPageTable(Logical, Address);
+ 
+-    /* Route through other function. */
+-    gcmkONERROR(
+-        gckOS_GetPhysicalAddressProcess(Os, Logical, processID, Address));
++    if (gcmIS_ERROR(status))
++    {
++        /* Get current process ID. */
++        processID = _GetProcessID();
++
++        /* Route through other function. */
++        gcmkONERROR(
++            gckOS_GetPhysicalAddressProcess(Os, Logical, processID, Address));
++    }
+ 
+     /* Success. */
+     gcmkFOOTER_ARG("*Address=0x%08x", *Address);
+@@ -4139,7 +4205,7 @@ gckOS_LockPages(
+             return gcvSTATUS_OUT_OF_RESOURCES;
+         }
+ 
+-        mdlMap->vma->vm_flags |= VM_RESERVED;
++        mdlMap->vma->vm_flags |= gcdVM_FLAGS;
+ #if !gcdPAGED_MEMORY_CACHEABLE
+         if (Cacheable == gcvFALSE)
+         {
+-- 
+1.8.3.2
+
recipes-kernel/linux/linux-imx-3.0.35/0002-ENGR00265465-gpu-Add-global-value-for-minimum-3D-clo.patch new file +62 -0

62 lines not on this page · raw message

recipes-kernel/linux/linux-imx-3.0.35/0003-ENGR00261814-4-gpu-use-new-PU-power-on-off-interface.patch new file +53 -0

53 lines not on this page · raw message

recipes-kernel/linux/linux-imx-3.0.35/0004-ENGR00264288-1-GPU-Integrate-4.6.9p12-release-kernel.patch new file +2006 -0

1,845 lines not on this page · raw message

recipes-kernel/linux/linux-imx-3.0.35/0005-ENGR00264275-GPU-Correct-suspend-resume-calling-afte.patch new file +61 -0

61 lines not on this page · raw message

recipes-kernel/linux/linux-imx-3.0.35/0006-ENGR00265130-gpu-Correct-section-mismatch-in-gpu-ker.patch new file +60 -0

60 lines not on this page · raw message

recipes-kernel/linux/linux-imx-3.0.35/drm-vivante-Add-00-sufix-in-returned-bus-Id.patch new file +31 -0
new file mode 100644
index 0000000..815d02c

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-imx_3.0.35.bb +9 -0
index edcaa75..c71e08e 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.8.4.rc1

Part of the diff is not shown here. View the raw message.

#7 lore raw

PATCH 7/11 xf86-video-imxfb-vivante: Upgrade to 3.5.7-1.0.0-alpha.2

In reply to Otavio Salvador

The new Xorg driver does not need a DRI library anymore, so we remove the xf86-dri-vivante recipe, but use the DRI code during the Xorg GPU driver build.

This change has been based on changes done in meta-fsl-bsp-release, 3.5.7 dylan branch, by Lauren Post <[email protected]> and Evan Kotara <[email protected]>.

Change-Id I3f666da817fb158b201dc169ae7862b199216ddd
---
 conf/machine/include/imx-base.inc                  |  2 -
 .../xf86-dri-vivante/fix-libdrm-link.patch         | 33 ---------
 .../xorg-driver/xf86-dri-vivante_3.0.35-4.0.0.bb   | 48 -------------
 .../Makefile-fix-cross-compile.patch               | 23 ++++++
 ...on-t-force-things-decided-by-build-system.patch | 82 ++++++++++++++++++++++
 .../xf86-video-imxfb-vivante_3.0.35-4.0.0.bb       | 54 --------------
 ...xf86-video-imxfb-vivante_3.5.7-1.0.0-alpha.2.bb | 59 ++++++++++++++++
 7 files changed, 164 insertions(+), 137 deletions(-)
 delete mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante/fix-libdrm-link.patch
 delete mode 100644 recipes-graphics/xorg-driver/xf86-dri-vivante_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/Makefile-fix-cross-compile.patch
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/build-Don-t-force-things-decided-by-build-system.patch
 delete mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.0.35-4.0.0.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.5.7-1.0.0-alpha.2.bb
conf/machine/include/imx-base.inc +0 -2
index cafdbf7..5d6243a 100644
@@ -20,8 +20,6 @@ UBOOT_ENTRYPOINT_mx6  = "0x10008000"
 UBOOT_ENTRYPOINT_mx6sl = "0x80008000"
 UBOOT_ENTRYPOINT_vf60 = "0x80008000"
 
-PREFERRED_VERSION_xserver-xorg_mx6 ?= "2:1.11.4"
-
 XSERVER_DRIVER = "xf86-video-fbdev"
 XSERVER_DRIVER_mx5 = "xf86-video-imxfb"
 XSERVER_DRIVER_mx6 = "xf86-video-imxfb-vivante"
recipes-graphics/xorg-driver/xf86-dri-vivante/fix-libdrm-link.patch deleted +0 -33
deleted file mode 100644
index fe3e610..0000000
@@ -1,33 +0,0 @@
-This adds a missing link dependency on libdrm
-
-Upstream-Status: Pending
-Signed-off-by: Otavio Salvador <[email protected]>
-
-Index: DRI_1.10.4/configure.ac
-===================================================================
---- DRI_1.10.4.orig/configure.ac
-+++ DRI_1.10.4/configure.ac
-@@ -55,6 +55,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
- 
- # Checks for pkg-config packages
- PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
-+PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.3.0])
- sdkdir=$(pkg-config --variable=sdkdir xorg-server)
- 
- # Checks for libraries.
-Index: DRI_1.10.4/src/Makefile.am
-===================================================================
---- DRI_1.10.4.orig/src/Makefile.am
-+++ DRI_1.10.4/src/Makefile.am
-@@ -11,9 +11,9 @@
- ##############################################################################
- 
- 
--AM_CFLAGS = @XORG_CFLAGS@
-+AM_CFLAGS = @XORG_CFLAGS@ @LIBDRM_CFLAGS@
- libdri_la_LTLIBRARIES = libdri.la
--libdri_la_LDFLAGS = -module -avoid-version
-+libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
- libdri_ladir = @moduledir@/extensions
- libdri_la_SOURCES = \
- 	dri.c \
recipes-graphics/xorg-driver/xf86-dri-vivante_3.0.35-4.0.0.bb deleted +0 -48

48 lines not on this page · raw message

recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/Makefile-fix-cross-compile.patch new file +23 -0
new file mode 100644
index 0000000..ce3a9ae
@@ -0,0 +1,23 @@
+diff --git a/EXA/src/makefile.linux b/EXA/src/makefile.linux
+index 12cb8f3..005b002 100644
+--- a/EXA/src/makefile.linux
++++ b/EXA/src/makefile.linux
+@@ -1,9 +1,6 @@
+ 
+ .PHONY: all clean install
+ 
+-CC  := $(CROSS_COMPILE)gcc
+-LD  := $(CROSS_COMPILE)gcc
+-
+ target := vivante_drv.so
+ 
+ OBJS := vivante_gal/vivante_gal_blit.o \
+@@ -63,7 +60,7 @@ LFLAGS += -L$(sysroot)/usr/lib -lm -ldl -lGAL -Wl,-soname -Wl,vivante_drv.so
+ all: $(target)
+ 
+ $(target): $(OBJS)
+-	$(LD) -shared -fPIC -o $(target) $(OBJS) $(LFLAGS)
++	$(CC) -shared -fPIC -o $(target) $(OBJS) $(LFLAGS)
+ 
+ clean:
+ 	-@rm $(target) $(OBJS)
recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/build-Don-t-force-things-decided-by-build-system.patch new file +82 -0

82 lines not on this page · raw message

recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.0.35-4.0.0.bb deleted +0 -54

54 lines not on this page · raw message

recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.5.7-1.0.0-alpha.2.bb new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
1.8.4.rc1
#8 lore raw

PATCH 8/11 xserver-xorg: Remove backport of 1.11.4

In reply to Otavio Salvador

The new Vivante GPU driver supports the new Xorg API so we don't need to keep this backport around anymore.

Change-Id Ic3a4fa912cfbf51452fbb91b9afbf9e996eb56c0
---
 .../xserver-xorg-1.11.4/crosscompile.patch         | 22 -------
 .../fix_open_max_preprocessor_error.patch          | 15 -----
 .../xserver-xorg-1.11.4/macro_tweak.patch          | 25 --------
 .../xserver-xorg-1.11.4/mips64-compiler.patch      | 29 ---------
 .../xserver-xorg-1.11.4/pkgconfig-deps.patch       | 70 ----------------------
 .../xorg-xserver/xserver-xorg_1.11.4.bb            | 25 --------
 6 files changed, 186 deletions(-)
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/crosscompile.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/fix_open_max_preprocessor_error.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/macro_tweak.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/mips64-compiler.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/pkgconfig-deps.patch
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xorg_1.11.4.bb
recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/crosscompile.patch deleted +0 -22
deleted file mode 100644
index 2f98bb8..0000000
@@ -1,22 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff --git a/configure.ac b/configure.ac
-index b3b752c..600500b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
- dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
- dnl compiling, assume default font path uses standard FONTROOTDIR directories.
- DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
--if test "$cross_compiling" != yes; then
--	AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
--		[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
--		[case $host_os in
-+		case $host_os in
- 			darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
--		esac])
--fi
-+		esac
- AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
- 				[ FONTPATH="$withval" ],
- 				[ FONTPATH="${DEFAULT_FONT_PATH}" ])
recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/fix_open_max_preprocessor_error.patch deleted +0 -15
deleted file mode 100644
index 2f62972..0000000
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: git/os/osdep.h
-===================================================================
---- git.orig/os/osdep.h	2008-10-07 18:38:21.000000000 +0100
-+++ git/os/osdep.h	2008-10-07 18:39:36.000000000 +0100
-@@ -92,7 +92,7 @@
-  * like sysconf(_SC_OPEN_MAX) is not supported.
-  */
- 
--#if OPEN_MAX <= 256
-+#if 0
- #define MAXSOCKS (OPEN_MAX - 1)
- #else
- #define MAXSOCKS 256
recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/macro_tweak.patch deleted +0 -25
deleted file mode 100644
index ec0eea6..0000000
@@ -1,25 +0,0 @@
-This is the revised version of files/macro_tweak.patch for
-xorg-server 1.8.99.904 and newer.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yu Ke <[email protected]>
-
-diff --git a/xorg-server.m4 b/xorg-server.m4
-index bdecf62..040fdb8 100644
---- a/xorg-server.m4
-+++ b/xorg-server.m4
-@@ -28,10 +28,12 @@ dnl
- # Checks for the $1 define in xorg-server.h (from the sdk).  If it
- # is defined, then add $1 to $REQUIRED_MODULES.
- 
-+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
-+
- AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
- 	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
- 	SAVE_CFLAGS="$CFLAGS"
--	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
-+	CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
- 	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include "xorg-server.h"
- #if !defined $1
recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/mips64-compiler.patch deleted +0 -29
deleted file mode 100644
index e6bc95b..0000000
@@ -1,29 +0,0 @@
-on mips64/n64 pointers are 64bit therefore the pointer conversions to int dont work well
-so we end up with incompatible conversion errors
-
-This patch choses the right values for mips64
-
-Signed-off-by: Khem Raj <[email protected]>
-
-Upstream-Status: Pending
-Index: xorg-server-1.11.2/hw/xfree86/common/compiler.h
-===================================================================
---- xorg-server-1.11.2.orig/hw/xfree86/common/compiler.h	2012-05-10 12:19:59.485599046 -0700
-+++ xorg-server-1.11.2/hw/xfree86/common/compiler.h	2012-05-10 12:20:53.109602488 -0700
-@@ -104,6 +104,7 @@
- 
- #  if !defined(__arm__)
- #   if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \
-+      && !defined(__mips64) \
-       && !(defined(__alpha__) && defined(linux)) \
-       && !(defined(__ia64__) && defined(linux)) \
- 
-@@ -708,7 +709,7 @@
- }
- 
- #   elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
--#    ifdef __arm32__
-+#    if defined (__arm32__) || defined (__mips64)
- #     define PORT_SIZE long
- #    else
- #     define PORT_SIZE short
recipes-graphics/xorg-xserver/xserver-xorg-1.11.4/pkgconfig-deps.patch deleted +0 -70

70 lines not on this page · raw message

recipes-graphics/xorg-xserver/xserver-xorg_1.11.4.bb deleted +0 -25
deleted file mode 100644
index 59a751b..0000000
@@ -1,25 +0,0 @@
-require recipes-graphics/xorg-xserver/xserver-xorg.inc
-
-# This has change in newer release
-LIC_FILES_CHKSUM = "file://COPYING;md5=74df27b6254cc88d2799b5f4f5949c00"
-
-# Misc build failure for master HEAD
-SRC_URI += "file://crosscompile.patch \
-            file://fix_open_max_preprocessor_error.patch \
-            file://mips64-compiler.patch \
-            file://pkgconfig-deps.patch \
-           "
-
-SRC_URI[md5sum] = "256325e9b17dff479d92bed97f6b0adb"
-SRC_URI[sha256sum] = "3e2935bc400612df58d5b5e6840829e2c63af02c2e7d2893092500358a4366fc"
-
-PR = "${INC_PR}.0"
-
-do_install_append_mx6 () {
-    # FIXME: This is a workaround to ensure we use Vivante DRI
-    rm ${D}${includedir}/xorg/dri.h \
-       ${D}${includedir}/xorg/sarea.h \
-       ${D}${includedir}/xorg/dristruct.h
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
1.8.4.rc1
#9 lore raw

PATCH 9/11 imx-base.inc: Set default tune of i.MX6 to use Hard Float-Point

In reply to Otavio Salvador

The default now is to use Hard Float-Point to every i.MX6 SoC but it is very easy to change back to Soft Float-Point, if it is the case, you can set:

,----[ Soft Float-Point setting ]
| DEFAULTTUNE_mx6 = "cortexa9-neon"
`----

In your local.conf or machine board file.

Change-Id I8379dd95cbd0ab9b9ae61ffe8e173f8b0b7db9ae
---
 conf/machine/include/imx-base.inc | 3 +++
 1 file changed, 3 insertions(+)
conf/machine/include/imx-base.inc +3 -0
index 5d6243a..d8d0771 100644
@@ -30,6 +30,9 @@ XSERVER = "xserver-xorg \
 # Ship kernel modules
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
+# Float-Point setting
+DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+
 # Firmware
 MACHINE_FIRMWARE ?= ""
 MACHINE_FIRMWARE_append_mx6q = " firmware-imx-vpu-imx6q"
Signature · 1 line
1.8.4.rc1
#10 lore raw

PATCH 10/11 imx-lib.inc: Add .so files in imx-lib package

In reply to Otavio Salvador

The libfslcodec-standalone-bin package requires the .so files to run so we're forced to provide it in the main package. This must be fixed by Freescale as the source code of it is closed.

Change-Id I610e48dd55c02d8005a35c362158085d81e3daab
---
 recipes-bsp/imx-lib/imx-lib.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
recipes-bsp/imx-lib/imx-lib.inc +8 -0
index 95ffb88..7374c41 100644
@@ -30,3 +30,11 @@ do_compile () {
 do_install () {
     oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
 }
+
+# FIXME: The libfslcodec-standalone-bin package requires the .so files
+#        to run so we're forced to provide it in the main package.
+#        This must be fixed by Freescale as the source code of it is
+#        closed.
+PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-staticdev"
+FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
+INSANE_SKIP_${PN} += "dev-so"
Signature · 1 line
1.8.4.rc1
#11 lore raw

PATCH 11/11 libdrm: Add fix to avoid GPU freeze

In reply to Otavio Salvador

Add ARM support into xf86drm.h. This provides support for Xorg interface. Without this the vivante samples will hang during close requiring a reboot

Change-Id I60ea3c87c35fadaa00c64baffd24f74f41dfbb9b
---
 .../drm/libdrm/mx6/drm-update-arm.patch            | 32 ++++++++++++++++++++++
 recipes-graphics/drm/libdrm_2.4.46.bbappend        |  5 ++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
 create mode 100644 recipes-graphics/drm/libdrm_2.4.46.bbappend
recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch new file +32 -0
new file mode 100644
index 0000000..bb0eac9
@@ -0,0 +1,32 @@
+Add ARM support into xf86drm.h.  This provides support for Xorg interface.
+Without this the vivante samples will hang during close requiring a reboot
+
+Upstream-Status: Pending
+
+Signed-off-by: Lauren Post <[email protected]>
+
+diff --git a/xf86drm.h b/xf86drm.h
+--- a/xf86drm.h
++++ b/xf86drm.h
+@@ -455,6 +455,21 @@ do {       register unsigned int __old __asm("o0");                \
+                : "cr0", "memory");                     \
+        } while (0)
+
++#elif defined(__arm__)
++       #undef DRM_DEV_MODE
++       #define DRM_DEV_MODE     (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
++
++       #define DRM_CAS(lock,old,new,__ret)             \
++       do {                                            \
++               __asm__ __volatile__ (                  \
++                       "1: ldrex %0, [%1]\n"           \
++                       "   teq %0, %2\n"               \
++                       "   strexeq %0, %3, [%1]\n"     \
++               : "=&r" (__ret)                         \
++               : "r" (lock), "r" (old), "r" (new)      \
++               : "cc","memory");                       \
++       } while (0)
++
+ #endif /* architecture */
+ #endif /* __GNUC__ >= 2 */
+
recipes-graphics/drm/libdrm_2.4.46.bbappend new file +5 -0
new file mode 100644
index 0000000..8c8ea6b
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_mx6 = "file://drm-update-arm.patch"
+
+PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}"
Signature · 1 line
1.8.4.rc1