dra7xx-evm: add support for graphics acceleration 37/7137/2
authorKarthik Ramanan <a0393906@ti.com>
Thu, 10 Nov 2016 11:21:08 +0000 (16:51 +0530)
committerKarthik Ramanan <a0393906@ti.com>
Thu, 10 Nov 2016 11:22:14 +0000 (16:52 +0530)
TI Jacinto 6 has a 3D GPU that can used to accelerate the graphics
processing requests. This patch replaces the default graphics
drivers and user space libraries only for the dra7xx-evm MACHINE

Change-Id: I1a53594f0fa4dc8fabd16f9ce2c765dd32b9e142
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend [new file with mode: 0644]
meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch [new file with mode: 0644]
meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_1.9.1.bbappend [new file with mode: 0644]
templates/machine/dra7xx-evm/50_local.conf.inc

diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend
new file mode 100644 (file)
index 0000000..a5a6951
--- /dev/null
@@ -0,0 +1,7 @@
+# Remove GBM support from Mesa
+# TI Platforms provides own GBM library
+
+PACKAGES_remove = "libgbm"
+PACKAGES_remove = "libgbm-dev"
+
+EXTRA_OECONF_remove = "--enable-gbm"
diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch
new file mode 100644 (file)
index 0000000..a72aeed
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
+index 2e65864..e14dbc0 100644
+--- a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
++++ b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
+@@ -244,7 +247,7 @@ bool OpenGLES2App::createEGLContext()
+     m_eglContextStruct.eglSurface = NULL;
+     m_eglContextStruct.eglContext = NULL;
+-    m_eglContextStruct.eglDisplay = eglGetDisplay(m_wlContextStruct.wlDisplay);
++    m_eglContextStruct.eglDisplay = eglGetDisplay((EGLNativeDisplayType)m_wlContextStruct.wlDisplay);
+     eglstatus = eglGetError();
+     if (!m_eglContextStruct.eglDisplay)
+     {
diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_1.9.1.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_1.9.1.bbappend
new file mode 100644 (file)
index 0000000..e9a57d3
--- /dev/null
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+SRC_URI_append = "\
+    file://force-type-conversion.patch \
+    "
index adf577e..05a15c9 100644 (file)
@@ -1,5 +1,29 @@
 MACHINE = "dra7xx-evm"
 
+PACKAGES_GFX_${MACHINE} = "omapdrm-pvr"
+
+# Enable Gfx Pkgs
+MACHINE_FEATURES_append = " sgx"
+MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2"
+
+DEPENDS_remove = "virtual/libgl"
+
+# Preferred providers
+PREFERRED_PROVIDER_virtual/libgles1 = ""
+PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
+PREFERRED_PROVIDER_virtual/egl      = "ti-sgx-ddk-um"
+PREFERRED_PROVIDER_virtual/mesa     = "mesa-gl"
+PREFERRED_PROVIDER_libgbm           = "libgbm"
+
+#Preferred versions
+PREFERRED_VERSION_libgbm            = "10.0.0"
+
+
+# Distribution-specific runtime components
+IMAGE_INSTALL_append = " \
+     ${PACKAGES_GFX}     \
+"
+
 ## ATTENTION, this is needed right now to build meta-ti with AGL: ##
 ## due to meta-ti being based on YP 1.8 instead of YP 2.0
 BBMASK  = "meta-ti/.*eudev"