jacinto6: sgx-bin: update sgx binaries and source for kernel 3.14
authorVishal Mahaveer <vishalm@ti.com>
Wed, 12 Nov 2014 20:23:25 +0000 (14:23 -0600)
committerVishal Mahaveer <vishalm@ti.com>
Wed, 12 Nov 2014 20:23:25 +0000 (14:23 -0600)
Update SGX binaries and kernel module source for Kernel 3.14

Change-Id: I9b88401f77ba2f43a16ac0959913c518024da2de
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
jacinto6/README.SGX
jacinto6/sgx.tgz
jacinto6/sgx/Android.mk
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c

index 7927d366dbddcd19459ddc5c040023161ac4a18f..6f01818d4d7e408710fcff2bdd867f64b70d8185 100644 (file)
@@ -16,11 +16,11 @@ sgx.tgz a set of binaries built for SGX544.
 [DDK Version]
     1.12/2917986
 [DDK commit ID]
-    a9240e6 SGX-UM: Adding logcat entries for pvrsrvinit.
+    a0d3db4 tmp: Changes for Android L
 [Branch]
-    android/1.12/2917986
+    android/1.12/2917986_k3.14_L
 [Kernel modules built against]
-    Kernel Version: 3.8.y with CONFIG_MODVERSIONS=y
+    Kernel Version: 3.14.y with CONFIG_MODVERSIONS=y
 
 #===========================================================================
 #   Building SGX Kernel Modules
index 4342b4be5bcebebb82ce6a7adb6402e69d5607ce..da4b37679239cf40c910d68650af62cfb5294133 100644 (file)
Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ
index 1740ffd120646781232caa22f4156e134928bddb..862dffb008df4f06e6b1fef4442fd86837f2d878 100644 (file)
@@ -116,8 +116,7 @@ prebuilt_sgx_vendor_bins := \
 #      etc/powervr.ini
 
 prebuilt_sgx_vendor_km := \
-       modules/pvrsrvkm.ko \
-       modules/omaplfb.ko
+       modules/pvrsrvkm.ko
 
 prebuilt_sgx_modules := \
   $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc) $(prebuilt_sgx_vendor_km),\
index 088d47fb1b45374055c1e8416f4d90b082812055..0b40526ddc231e00978a08cfc1fc59e636c83c3f 100644 (file)
@@ -186,9 +186,8 @@ endif
 # We also need to support IMPLEMENTATION_DEFINED so gralloc allocates
 # framebuffers and GPU buffers in a 'preferred' format.
 #
-# FB HAL is still being used in TI post JB MR1 releases.
-SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
 ifeq ($(is_at_least_jellybean_mr1),0)
+SUPPORT_ANDROID_FRAMEBUFFER_HAL := 1
 else
 PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED := 1
 endif
index 3f761cf22731e5f3e09bb5b54b2f5a6ecade019c..052c35eec057d7bfea67084fdb8ade09d5a6e000 100644 (file)
@@ -512,7 +512,7 @@ ifneq ($(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES),0)
 PVR_LINUX_MEM_AREA_USE_VMAP ?= 1
 include ../kernel_version.mk
 ifeq ($(call kernel-version-at-least,3,0),true)
-PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 1
+PVR_LINUX_MEM_AREA_POOL_ALLOW_SHRINK ?= 0
 endif
 endif
 $(eval $(call KernelConfigC,PVR_LINUX_MEM_AREA_POOL_MAX_PAGES,$(PVR_LINUX_MEM_AREA_POOL_MAX_PAGES)))
index 7a2d7c7f4b6a919a09562e37d0f818430f614262..191544750b05a7358eba7b86a8b5afde800f079b 100644 (file)
@@ -95,7 +95,7 @@ SUPPORT_LINUX_USING_WORKQUEUES := 1
 SUPPORT_PVRSRV_ANDROID_SYSTRACE := 0
 
 ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
-DISPLAY_CONTROLLER := omaplfb
+#DISPLAY_CONTROLLER := omaplfb
 endif
 
 PVR_SYSTEM := omap
@@ -144,7 +144,7 @@ OMAP_NON_FLIP_DISPLAY := 1
 endif
 else # LDM_PLATFORM != 1
 ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
-DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
+#DISPLAY_CONTROLLER_COMPONENT := dc_omapfb3_linux
 endif
 endif # LDM_PLATFORM != 1
 
@@ -176,7 +176,7 @@ SUPPORT_ANDROID_OMAP_NV12 := 1
 
 PVR_ANDROID_USE_WINDOW_TRANSFORM_HINT := 1
 
-PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 1
+PVR_ANDROID_PLATFORM_HAS_LINUX_FBDEV := 0
 
 # Handle Google's OMAP-based products
 #
index 3bd66594fe3b862f433110faa3fd1ba3b81d9369..2f08f27086a7cb5983443d4a1af531d6c3c04e29 100644 (file)
@@ -140,6 +140,28 @@ IMG_VOID IonDeinit(IMG_VOID)
 
 #else /* defined(CONFIG_ION_INCDHAD1) */
 
+#if defined(CONFIG_ION_DUMMY)
+
+/* Real ion with sharing (dummy) */
+
+extern struct ion_device *idev;
+struct ion_device *gpsIonDev;
+
+PVRSRV_ERROR IonInit(IMG_VOID)
+{
+        gpsIonDev = idev;
+        return PVRSRV_OK;
+}
+
+
+IMG_VOID IonDeinit(IMG_VOID)
+{
+        gpsIonDev = IMG_NULL;
+}
+
+#else /* defined(CONFIG_ION_DUMMY) */
+
+
 /* "Reference" ion implementation */
 
 #include SUPPORT_ION_PRIV_HEADER
@@ -240,6 +262,7 @@ IMG_VOID IonDeinit(IMG_VOID)
        kfree(gapsIonHeaps);
        ion_device_destroy(gpsIonDev);
 }
+#endif /* defined(CONFIG_ION_DUMMY) */
 
 #endif /* defined(CONFIG_ION_INCDHAD1) */
 
index a66e927369745d511e4cd81a67c0c38655aad306..1fe1eb17e5ef189ee3761213926c41fabc9b1736 100644 (file)
@@ -79,8 +79,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #if defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
        #define IOREMAP(pa, bytes)      ioremap_cache(pa, bytes)
 #else  
-       #if defined(__arm__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
-               #define IOREMAP(pa, bytes)      ioremap_cached(pa, bytes)
+       #if defined(__arm__)
+               #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+                       #define IOREMAP(pa, bytes)      ioremap_cache(pa, bytes)
+               #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+                       #define IOREMAP(pa, bytes)      ioremap_cached(pa, bytes)
+               #endif
        #else
                #define IOREMAP(pa, bytes)      ioremap(pa, bytes)
        #endif
index c9b577eddbeddeef049c9da340712efc5c20e897..7ffb30c03fda07fb89f101736ffc109ec47e606d 100644 (file)
@@ -105,7 +105,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define ON_EACH_CPU(func, info, wait) on_each_cpu(func, info, 0, wait)
 #endif
 
-#if defined(PVR_LINUX_USING_WORKQUEUES) && !defined(CONFIG_PREEMPT)
+#if defined(PVR_LINUX_USING_WORKQUEUES) && !defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_VOLUNTARY)
 /* 
  * Services spins at certain points waiting for events (e.g. swap
  * chain destrucion).  If those events rely on workqueues running,
index 1febc758c2fba466036bf5ab5f1caa28f6f5f6b4..518aa8a7f87a38d343d684255bfc40be1aaa00e3 100644 (file)
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#include <linux/pm_opp.h>
+#include <linux/of.h>
+#else
 #include <linux/opp.h>
+#endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
 #include <plat/gpu.h>
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#include <linux/pm_voltage_domain.h>
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
 #include <linux/regulator/consumer.h>
 #endif
 
@@ -46,8 +54,13 @@ static struct sgxfreq_data {
        struct clk *per_clk;
        struct clk *gpu_core_clk;
        struct clk *gpu_hyd_clk;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
        struct regulator *gpu_reg;
 #endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+       struct notifier_block *clk_nb;
+#endif
+#endif
 } sfd;
 
 /* Governor init/deinit functions */
@@ -202,7 +215,7 @@ static const struct attribute *sgxfreq_attributes[] = {
 };
 
 /************************ end sysfs interface ************************/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
 static int set_volt_for_freq(unsigned long freq)
 {
        struct opp *opp;
@@ -248,6 +261,7 @@ static int __set_freq(void)
        freq = min(sfd.freq_request, sfd.freq_limit);
        if (freq != sfd.freq) {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
                if (freq > sfd.freq) {
                        /* Going up - must scale voltage before clocks */
                        if (set_volt_for_freq(freq) != 0) {
@@ -256,6 +270,7 @@ static int __set_freq(void)
                                goto err1;
                        }
                }
+#endif
 
                ret = clk_set_rate(sfd.gpu_core_clk, freq);
                if (ret) {
@@ -271,6 +286,7 @@ static int __set_freq(void)
                        goto err3;
                }
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
                if (freq < sfd.freq) {
                        /* Going down - must scale voltage after clocks */
                        if(set_volt_for_freq(freq) != 0) {
@@ -279,7 +295,7 @@ static int __set_freq(void)
                                goto err4;
                        }
                }
-
+#endif
 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
                sfd.pdata->device_scale(sfd.dev, sfd.dev, freq);
 #else
@@ -290,16 +306,20 @@ static int __set_freq(void)
                goto noerr;
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
 err4:
+#endif
                ret |= clk_set_rate(sfd.gpu_hyd_clk, sfd.freq);
 
 err3:
                ret |= clk_set_rate(sfd.gpu_core_clk, sfd.freq);
 err2:
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
                if(freq > sfd.freq)
                        ret |= set_volt_for_freq(sfd.freq);
 err1:
 #endif
+#endif
 noerr:
                return ret;
        }
@@ -374,7 +394,13 @@ int sgxfreq_init(struct device *dev)
 {
        int i, ret;
        unsigned long freq;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+       struct dev_pm_opp *opp;
+       struct device_node *np;
+       unsigned int voltage_latency;
+#else
        struct opp *opp;
+#endif
        struct timeval tv;
 
        sfd.dev = dev;
@@ -399,14 +425,38 @@ int sgxfreq_init(struct device *dev)
                 pr_err("sgxfreq: failed to init OPP table: %d\n", ret);
                return -EINVAL;
         }
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
        sfd.freq_cnt = opp_get_opp_count(dev);
+#else
+       sfd.freq_cnt = dev_pm_opp_get_opp_count(dev);
+#endif
 #endif
        if (sfd.freq_cnt < 1) {
+               pr_err("sgxfreq: failed to get operating frequencies\n");
                rcu_read_unlock();
                return -ENODEV;
        }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+       np = of_node_get(dev->of_node);
+        sfd.clk_nb = of_pm_voltdm_notifier_register(dev, np, sfd.gpu_core_clk, "gpu",
+                                                &voltage_latency);
+
+        if (IS_ERR(sfd.clk_nb)) {
+                ret = PTR_ERR(sfd.clk_nb);
+                /* defer probe if regulator is not yet registered */
+                if (ret == -EPROBE_DEFER) {
+                        dev_err(dev,
+                                "gpu clock notifier not ready, retry\n");
+                } else {
+                        dev_err(dev,
+                                "Failed to register gpu clock notifier: %d\n",
+                                ret);
+                }
+               return ret;
+        }
+
+#endif
        sfd.freq_list = kmalloc(sfd.freq_cnt * sizeof(unsigned long), GFP_ATOMIC);
         if (!sfd.freq_list) {
                rcu_read_unlock();
@@ -417,8 +467,11 @@ int sgxfreq_init(struct device *dev)
        for (i = 0; i < sfd.freq_cnt; i++) {
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
                opp = sfd.pdata->opp_find_freq_ceil(dev, &freq);
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
                opp = opp_find_freq_ceil(dev, &freq);
+#else
+               /* 3.14 and later kernels */
+               opp = dev_pm_opp_find_freq_ceil(dev, &freq);
 #endif
                if (IS_ERR_OR_NULL(opp)) {
                        rcu_read_unlock();
@@ -466,6 +519,8 @@ int sgxfreq_init(struct device *dev)
                return ret;
        }
 
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
        sfd.gpu_reg = devm_regulator_get(dev, "gpu");
        if (IS_ERR(sfd.gpu_reg)) {
                if (PTR_ERR(sfd.gpu_reg) == -EPROBE_DEFER) {
@@ -475,6 +530,7 @@ int sgxfreq_init(struct device *dev)
                pr_err("sgxfreq: failed to get gpu regulator: %ld\n", PTR_ERR(sfd.gpu_reg));
                sfd.gpu_reg = NULL;
        }
+#endif
 
        ret = clk_set_parent(sfd.gpu_hyd_clk, sfd.core_clk);
        if (ret != 0) {