summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55b4f04)
raw | patch | inline | side by side (parent: 55b4f04)
author | Vishal Mahaveer <vishalm@ti.com> | |
Wed, 12 Nov 2014 20:23:25 +0000 (14:23 -0600) | ||
committer | Vishal 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>
Change-Id: I9b88401f77ba2f43a16ac0959913c518024da2de
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX
index 7927d366dbddcd19459ddc5c040023161ac4a18f..6f01818d4d7e408710fcff2bdd867f64b70d8185 100644 (file)
--- a/jacinto6/README.SGX
+++ b/jacinto6/README.SGX
[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
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index 4342b4be5bcebebb82ce6a7adb6402e69d5607ce..da4b37679239cf40c910d68650af62cfb5294133 100644 (file)
Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ
Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ
index 1740ffd120646781232caa22f4156e134928bddb..862dffb008df4f06e6b1fef4442fd86837f2d878 100644 (file)
--- a/jacinto6/sgx/Android.mk
+++ b/jacinto6/sgx/Android.mk
# 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),\
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk
index 088d47fb1b45374055c1e8416f4d90b082812055..0b40526ddc231e00978a08cfc1fc59e636c83c3f 100644 (file)
# 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
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/config/core.mk
index 3f761cf22731e5f3e09bb5b54b2f5a6ecade019c..052c35eec057d7bfea67084fdb8ade09d5a6e000 100644 (file)
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)))
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile
index 7a2d7c7f4b6a919a09562e37d0f818430f614262..191544750b05a7358eba7b86a8b5afde800f079b 100644 (file)
SUPPORT_PVRSRV_ANDROID_SYSTRACE := 0
ifneq ($(SUPPORT_PVRSRV_DEVICE_CLASS),0)
-DISPLAY_CONTROLLER := omaplfb
+#DISPLAY_CONTROLLER := omaplfb
endif
PVR_SYSTEM := omap
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
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
#
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/ion.c
index 3bd66594fe3b862f433110faa3fd1ba3b81d9369..2f08f27086a7cb5983443d4a1af531d6c3c04e29 100644 (file)
#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
kfree(gapsIonHeaps);
ion_device_destroy(gpsIonDev);
}
+#endif /* defined(CONFIG_ION_DUMMY) */
#endif /* defined(CONFIG_ION_INCDHAD1) */
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutils.h
index a66e927369745d511e4cd81a67c0c38655aad306..1fe1eb17e5ef189ee3761213926c41fabc9b1736 100644 (file)
#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
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c
index c9b577eddbeddeef049c9da340712efc5c20e897..7ffb30c03fda07fb89f101736ffc109ec47e606d 100644 (file)
#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,
diff --git a/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c b/jacinto6/sgx_src/eurasia_km/services4/system/omap/sgxfreq.c
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
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 */
};
/************************ 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;
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) {
goto err1;
}
}
+#endif
ret = clk_set_rate(sfd.gpu_core_clk, freq);
if (ret) {
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) {
goto err4;
}
}
-
+#endif
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
sfd.pdata->device_scale(sfd.dev, sfd.dev, freq);
#else
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;
}
{
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;
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();
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();
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) {
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) {