####Samsung Galaxy Grand Duos GT-i9082
- The path of the patch is mentioned in the file name of the patch
- Patches can be merged using "git am filename.patch"
From e9098887664088c624492434aada227ce2f4effe Mon Sep 17 00:00:00 2001 | |
From: Shubhang Rathore <[email protected]> | |
Date: Mon, 23 Jun 2014 15:06:18 +0530 | |
Subject: [PATCH] art: disable LTO and fix boot with linaro 4.8 | |
Change-Id: I99bc1a9894fbef6ee1da1c3a954e3bf0bce5ec87 | |
--- | |
dalvikvm/Android.mk | 1 + | |
runtime/Android.mk | 1 + | |
runtime/stack.h | 16 ++++++++++++---- | |
3 files changed, 14 insertions(+), 4 deletions(-) | |
diff --git a/dalvikvm/Android.mk b/dalvikvm/Android.mk | |
index 52584cf..1018d9b 100644 | |
--- a/dalvikvm/Android.mk | |
+++ b/dalvikvm/Android.mk | |
@@ -24,6 +24,7 @@ LOCAL_MODULE_TAGS := optional | |
LOCAL_CPP_EXTENSION := cc | |
LOCAL_SRC_FILES := dalvikvm.cc | |
LOCAL_CFLAGS := $(dalvikvm_cflags) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_SHARED_LIBRARIES := libdl libnativehelper | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
include external/stlport/libstlport.mk | |
diff --git a/runtime/Android.mk b/runtime/Android.mk | |
index a0ae4bf..c3df304 100644 | |
--- a/runtime/Android.mk | |
+++ b/runtime/Android.mk | |
@@ -304,6 +304,7 @@ $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PAT | |
LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN) | |
LOCAL_CFLAGS := $(LIBART_CFLAGS) | |
+ LOCAL_NO_LTO_SUPPORT := true | |
ifeq ($$(art_target_or_host),target) | |
LOCAL_CLANG := $(ART_TARGET_CLANG) | |
LOCAL_CFLAGS += $(ART_TARGET_CFLAGS) | |
diff --git a/runtime/stack.h b/runtime/stack.h | |
index 8ecf8f0..7c87f45 100644 | |
--- a/runtime/stack.h | |
+++ b/runtime/stack.h | |
@@ -138,13 +138,17 @@ class ShadowFrame { | |
int64_t GetVRegLong(size_t i) const { | |
DCHECK_LT(i, NumberOfVRegs()); | |
const uint32_t* vreg = &vregs_[i]; | |
- return *reinterpret_cast<const int64_t*>(vreg); | |
+ // Alignment attribute required for GCC 4.8 | |
+ typedef const int64_t unaligned_int64 __attribute__ ((aligned (4))); | |
+ return *reinterpret_cast<unaligned_int64*>(vreg); | |
} | |
double GetVRegDouble(size_t i) const { | |
DCHECK_LT(i, NumberOfVRegs()); | |
const uint32_t* vreg = &vregs_[i]; | |
- return *reinterpret_cast<const double*>(vreg); | |
+ // Alignment attribute required for GCC 4.8 | |
+ typedef const double unaligned_double __attribute__ ((aligned (4))); | |
+ return *reinterpret_cast<unaligned_double*>(vreg); | |
} | |
mirror::Object* GetVRegReference(size_t i) const { | |
@@ -177,13 +181,17 @@ class ShadowFrame { | |
void SetVRegLong(size_t i, int64_t val) { | |
DCHECK_LT(i, NumberOfVRegs()); | |
uint32_t* vreg = &vregs_[i]; | |
- *reinterpret_cast<int64_t*>(vreg) = val; | |
+ // Alignment attribute required for GCC 4.8 | |
+ typedef int64_t unaligned_int64 __attribute__ ((aligned (4))); | |
+ *reinterpret_cast<unaligned_int64*>(vreg) = val; | |
} | |
void SetVRegDouble(size_t i, double val) { | |
DCHECK_LT(i, NumberOfVRegs()); | |
uint32_t* vreg = &vregs_[i]; | |
- *reinterpret_cast<double*>(vreg) = val; | |
+ // Alignment attribute required for GCC 4.8 | |
+ typedef double unaligned_double __attribute__ ((aligned (4))); | |
+ *reinterpret_cast<unaligned_double*>(vreg) = val; | |
} | |
void SetVRegReference(size_t i, mirror::Object* val) { | |
-- | |
1.9.1 | |
From 65367c84a18f1bec6416878e6473324ae6e4b6ab Mon Sep 17 00:00:00 2001 | |
From: Shubhang Rathore <[email protected]> | |
Date: Mon, 23 Jun 2014 15:00:21 +0530 | |
Subject: [PATCH] bionic: disable LTO for libc and libdl | |
Change-Id: I74f4074f17bc65bb2e28200467695ea755a4aad6 | |
--- | |
libc/Android.mk | 10 ++++++++++ | |
libdl/Android.mk | 4 ++++ | |
2 files changed, 14 insertions(+) | |
mode change 100755 => 100644 libc/Android.mk | |
diff --git a/libc/Android.mk b/libc/Android.mk | |
old mode 100755 | |
new mode 100644 | |
index 86e54d7..16b3cea | |
--- a/libc/Android.mk | |
+++ b/libc/Android.mk | |
@@ -699,6 +699,7 @@ include $(CLEAR_VARS) | |
LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp | |
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libbionic_ssp | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_SYSTEM_SHARED_LIBRARIES := | |
@@ -744,6 +745,7 @@ LOCAL_CFLAGS := \ | |
-I$(LOCAL_PATH)/upstream-freebsd/libc/include \ | |
-include upstream-freebsd/freebsd-compat.h | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc_freebsd | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_SYSTEM_SHARED_LIBRARIES := | |
@@ -767,6 +769,7 @@ LOCAL_CFLAGS := \ | |
-I$(LOCAL_PATH)/upstream-netbsd/libc/include \ | |
-include upstream-netbsd/netbsd-compat.h | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc_netbsd | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_SYSTEM_SHARED_LIBRARIES := | |
@@ -783,6 +786,7 @@ include $(CLEAR_VARS) | |
LOCAL_SRC_FILES := $(libc_bionic_src_files) | |
LOCAL_CFLAGS := $(libc_common_cflags) -Werror | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc_bionic | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_SYSTEM_SHARED_LIBRARIES := | |
@@ -801,6 +805,7 @@ LOCAL_CFLAGS := $(libc_common_cflags) \ | |
-std=gnu99 \ | |
-I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc_common | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_WHOLE_STATIC_LIBRARIES := \ | |
@@ -839,6 +844,7 @@ LOCAL_CFLAGS := $(libc_common_cflags) \ | |
-DLIBC_STATIC \ | |
-std=gnu99 | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc_nomalloc | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | |
@@ -863,6 +869,7 @@ LOCAL_CFLAGS := $(libc_common_cflags) \ | |
-DLIBC_STATIC \ | |
-std=gnu99 | |
LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE := libc | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common | |
@@ -904,6 +911,7 @@ ifeq ($(TARGET_ARCH),arm) | |
arch-arm/bionic/crtend_so.S | |
endif | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE:= libc | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_REQUIRED_MODULES := tzdata | |
@@ -948,6 +956,7 @@ LOCAL_SRC_FILES := \ | |
bionic/malloc_debug_leak.cpp \ | |
bionic/malloc_debug_check.cpp \ | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE:= libc_malloc_debug_leak | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
@@ -976,6 +985,7 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes) | |
LOCAL_SRC_FILES := \ | |
bionic/malloc_debug_qemu.cpp | |
+LOCAL_NO_LTO_SUPPORT := true | |
LOCAL_MODULE:= libc_malloc_debug_qemu | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
diff --git a/libdl/Android.mk b/libdl/Android.mk | |
index e6c6bf4..b213b57 100644 | |
--- a/libdl/Android.mk | |
+++ b/libdl/Android.mk | |
@@ -27,6 +27,8 @@ LOCAL_SRC_FILES:= libdl.c | |
LOCAL_MODULE:= libdl | |
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
+LOCAL_NO_LTO_SUPPORT := true | |
+ | |
# NOTE: libdl needs __aeabi_unwind_cpp_pr0 from libgcc.a but libgcc.a needs a | |
# few symbols from libc. Using --no-undefined here results in having to link | |
# against libc creating a circular dependency which is removed and we end up | |
@@ -53,6 +55,8 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk | |
LOCAL_SHARED_LIBRARIES := libdl | |
+LOCAL_NO_LTO_SUPPORT := true | |
+ | |
include $(BUILD_EXECUTABLE) | |
endif | |
-- | |
1.9.1 | |
From 46349a74afd67d8e39355fc56f17a6b68b955722 Mon Sep 17 00:00:00 2001 | |
From: Shubhang Rathore <[email protected]> | |
Date: Mon, 23 Jun 2014 14:56:00 +0530 | |
Subject: [PATCH] build: enable flags and switch to linaro toolchain | |
- use linaro 4.8 toolchain for full ROM compilation | |
- enable LTO flag | |
- enable O3 flag | |
Change-Id: I1bb1c465b703ec9ad01a89a85883d3cf41e88f3e | |
--- | |
core/binary.mk | 14 ++++++++++++++ | |
core/combo/TARGET_linux-arm.mk | 16 +++++++++++++--- | |
core/llvm_config.mk | 5 ++++- | |
envsetup.sh | 4 ++-- | |
4 files changed, 33 insertions(+), 6 deletions(-) | |
diff --git a/core/binary.mk b/core/binary.mk | |
index 8ce874e..b901d51 100644 | |
--- a/core/binary.mk | |
+++ b/core/binary.mk | |
@@ -125,6 +125,20 @@ ifeq ($(strip $(LOCAL_CLANG)),true) | |
endif | |
#################################################### | |
+## Add LTO flags if LTO is turned on, supported | |
+## and we aren't building a host module. | |
+#################################################### | |
+ifeq ($(strip $(LOCAL_NO_LTO_SUPPORT)),) | |
+ ifeq ($(strip $(LOCAL_CLANG)),) | |
+ ifeq ($(strip $(LOCAL_IS_HOST_MODULE)),) | |
+ LOCAL_CFLAGS += $(TARGET_LTO_CFLAGS) | |
+ LOCAL_CPPFLAGS += $(TARGET_LTO_CFLAGS) | |
+ LOCAL_LDFLAGS += $(TARGET_LTO_CFLAGS) | |
+ endif | |
+ endif | |
+endif | |
+ | |
+#################################################### | |
## Add FDO flags if FDO is turned on and supported | |
#################################################### | |
ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),) | |
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk | |
index ae6623c..9d19a78 100644 | |
--- a/core/combo/TARGET_linux-arm.mk | |
+++ b/core/combo/TARGET_linux-arm.mk | |
@@ -49,7 +49,7 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE) | |
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else | |
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),) | |
-TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION) | |
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/linaro-4.8 | |
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi- | |
endif | |
@@ -68,14 +68,14 @@ endif | |
TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined | |
-TARGET_arm_CFLAGS := -O2 \ | |
+TARGET_arm_CFLAGS := -O3 \ | |
-fomit-frame-pointer \ | |
-fstrict-aliasing \ | |
-funswitch-loops | |
# Modules can choose to compile some source as thumb. | |
TARGET_thumb_CFLAGS := -mthumb \ | |
- -Os \ | |
+ -O3 \ | |
-fomit-frame-pointer \ | |
-fno-strict-aliasing | |
@@ -175,6 +175,16 @@ target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \ | |
-print-file-name=libgcov.a) | |
endif | |
+# Define LTO (Link Time Optimization options | |
+ | |
+ifneq ($(strip $(DISABLE_BUILD_LTO)),) | |
+# Disable global LTO if DISABLE_BUILD_LTO is set. | |
+TARGET_LTO_CFLAGS := -flto \ | |
+ -fno-toplevel-reorder \ | |
+ -flto-compression-level=5 \ | |
+ -fuse-linker-plugin | |
+endif | |
+ | |
# Define FDO (Feedback Directed Optimization) options. | |
TARGET_FDO_CFLAGS:= | |
diff --git a/core/llvm_config.mk b/core/llvm_config.mk | |
index 0fe9f93..7fde2eb 100644 | |
--- a/core/llvm_config.mk | |
+++ b/core/llvm_config.mk | |
@@ -17,7 +17,10 @@ CLANG_CONFIG_EXTRA_CFLAGS := \ | |
-D__compiler_offsetof=__builtin_offsetof \ | |
CLANG_CONFIG_UNKNOWN_CFLAGS := \ | |
- -funswitch-loops | |
+ -funswitch-loops \ | |
+ -fno-toplevel-reorder \ | |
+ -flto-compression-level=5 \ | |
+ -fuse-linker-plugin | |
ifeq ($(TARGET_ARCH),arm) | |
RS_TRIPLE := armv7-none-linux-gnueabi | |
diff --git a/envsetup.sh b/envsetup.sh | |
index 5d8c496..cfa86a1 100644 | |
--- a/envsetup.sh | |
+++ b/envsetup.sh | |
@@ -152,7 +152,7 @@ function setpaths() | |
case $ARCH in | |
x86) toolchaindir=x86/i686-linux-android-$targetgccversion/bin | |
;; | |
- arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin | |
+ arm) toolchaindir=arm/linaro-4.8/bin | |
;; | |
mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin | |
;; | |
@@ -168,7 +168,7 @@ function setpaths() | |
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH | |
case $ARCH in | |
arm) | |
- toolchaindir=arm/arm-eabi-$targetgccversion/bin | |
+ toolchaindir=arm/linaro-4.8/bin | |
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then | |
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir" | |
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir" | |
-- | |
1.9.1 | |
From 1ad8b5f5d66937b50e38782170b00ef61404633e Mon Sep 17 00:00:00 2001 | |
From: Pawit Pornkitprasan <[email protected]> | |
Date: Wed, 11 Dec 2013 20:47:31 +0700 | |
Subject: [PATCH] chromium: disable HW rendering for capri | |
Change-Id: I16b2c14eb15a3efe4d84d603c132434a5f97530a | |
--- | |
android_webview/browser/in_process_view_renderer.cc | 5 +++++ | |
1 file changed, 5 insertions(+) | |
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc | |
index e384584..5e15022 100644 | |
--- a/android_webview/browser/in_process_view_renderer.cc | |
+++ b/android_webview/browser/in_process_view_renderer.cc | |
@@ -133,8 +133,13 @@ class ScopedPixelAccess { | |
}; | |
bool HardwareEnabled() { | |
+// HACK: CAPRI_HWC has problems with GL image upload which can lead to system crash | |
+#ifdef CAPRI_HWC | |
+ static bool g_hw_enabled = false; | |
+#else | |
static bool g_hw_enabled = !CommandLine::ForCurrentProcess()->HasSwitch( | |
switches::kDisableWebViewGLMode); | |
+#endif | |
return g_hw_enabled; | |
} | |
-- | |
1.8.3.4 (Apple Git-47) | |
From 0adf8dfc02fc982ae89e794ee9216f2149e9634e Mon Sep 17 00:00:00 2001 | |
From: Pawit Pornkitprasan <[email protected]> | |
Date: Tue, 17 Dec 2013 13:15:52 +0700 | |
Subject: [PATCH 2/3] OMXCodec: set default input buffer size | |
Broadcom OMX only set the buffer size to 65536 by default which | |
is not enough for higher bitrate video | |
Change-Id: I74372f3d821e41feb38b9bc0cca4ef56aa019493 | |
--- | |
media/libstagefright/OMXCodec.cpp | 12 ++++++++++++ | |
1 file changed, 12 insertions(+) | |
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp | |
index fa4643f..02c45b5 100644 | |
--- a/media/libstagefright/OMXCodec.cpp | |
+++ b/media/libstagefright/OMXCodec.cpp | |
@@ -801,6 +801,18 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { | |
if (meta->findInt32(kKeyMaxInputSize, &maxInputSize)) { | |
setMinBufferSize(kPortIndexInput, (OMX_U32)maxInputSize); | |
} | |
+// Capri's OMX fail to set a reasonable default size from width and height | |
+#ifdef CAPRI_HWC | |
+ else { | |
+ int32_t width; | |
+ int32_t height; | |
+ if (meta->findInt32(kKeyWidth, &width) && meta->findInt32(kKeyHeight, &height)) { | |
+ setMinBufferSize(kPortIndexInput, (width * height * 3) / 2); | |
+ } else { | |
+ ALOGE("Failed to set min buffer size"); | |
+ } | |
+ } | |
+#endif | |
initOutputFormat(meta); | |
-- | |
1.8.3.4 (Apple Git-47) | |
From 3a374db88238ae39b0a38498f49f8327870edc90 Mon Sep 17 00:00:00 2001 | |
From: Pawit Pornkitprasan <[email protected]> | |
Date: Mon, 23 Dec 2013 18:41:44 +0700 | |
Subject: [PATCH 3/3] OMXCodec: set default input buffer size only for BCM | |
decoder | |
Change-Id: Ic554343069b47a4b66ea9e8daee684d4923ecd98 | |
--- | |
media/libstagefright/OMXCodec.cpp | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp | |
index 02c45b5..5d48f39 100644 | |
--- a/media/libstagefright/OMXCodec.cpp | |
+++ b/media/libstagefright/OMXCodec.cpp | |
@@ -803,7 +803,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) { | |
} | |
// Capri's OMX fail to set a reasonable default size from width and height | |
#ifdef CAPRI_HWC | |
- else { | |
+ else if (!strncmp(mComponentName, "OMX.BRCM.vc4.decoder.", 21)) { | |
int32_t width; | |
int32_t height; | |
if (meta->findInt32(kKeyWidth, &width) && meta->findInt32(kKeyHeight, &height)) { | |
-- | |
1.8.3.4 (Apple Git-47) |
From 31518ae60f839087b56d93063494f541c2ac0ef4 Mon Sep 17 00:00:00 2001 | |
From: Shubhang <[email protected]> | |
Date: Tue, 21 Jan 2014 23:27:53 +0530 | |
Subject: [PATCH] I9082: fix hwc issues | |
This is just a rebase on Carbon Kitkat | |
Original patch for CM11- https://gist.github.com/pawitp/7891444 | |
Credits to pawitp for the patch | |
Change-Id: Ib6520123f1e7bcdcb2ec8c73fe1d98e85c26fd1d | |
--- | |
libs/binder/Parcel.cpp | 12 ++++++++++++ | |
services/surfaceflinger/DisplayHardware/HWComposer.cpp | 5 +++++ | |
services/surfaceflinger/Layer.cpp | 3 +++ | |
services/surfaceflinger/SurfaceFlinger.cpp | 9 +++++++++ | |
4 files changed, 29 insertions(+) | |
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp | |
index 38e019c..26e54f1 100644 | |
--- a/libs/binder/Parcel.cpp | |
+++ b/libs/binder/Parcel.cpp | |
@@ -808,6 +808,12 @@ status_t Parcel::writeBlob(size_t len, WritableBlob* outBlob) | |
return status; | |
} | |
+extern "C" status_t _ZN7android6Parcel5writeERKNS0_26FlattenableHelperInterfaceE(void *parcel, void *val); | |
+ | |
+extern "C" status_t _ZN7android6Parcel5writeERKNS_11FlattenableE(void *parcel, void *val) { | |
+ return _ZN7android6Parcel5writeERKNS0_26FlattenableHelperInterfaceE(parcel, val); | |
+} | |
+ | |
status_t Parcel::write(const FlattenableHelperInterface& val) | |
{ | |
status_t err; | |
@@ -1184,6 +1190,12 @@ status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const | |
return NO_ERROR; | |
} | |
+extern "C" status_t _ZNK7android6Parcel4readERNS0_26FlattenableHelperInterfaceE(void *parcel, void *val); | |
+ | |
+extern "C" status_t _ZNK7android6Parcel4readERNS_11FlattenableE(void *parcel, void *val) { | |
+ return _ZNK7android6Parcel4readERNS0_26FlattenableHelperInterfaceE(parcel, val); | |
+} | |
+ | |
status_t Parcel::read(FlattenableHelperInterface& val) const | |
{ | |
// size | |
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp | |
index 02c8f9b..dc14bdc 100644 | |
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp | |
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp | |
@@ -1178,13 +1178,18 @@ public: | |
//getLayer()->compositionType = HWC_FRAMEBUFFER; | |
} | |
virtual void setPlaneAlpha(uint8_t alpha) { | |
+// CAPRI_HWC does not respect planeAlpha despite being v1.2 | |
+#ifndef CAPRI_HWC | |
if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_2)) { | |
getLayer()->planeAlpha = alpha; | |
} else { | |
+#endif | |
if (alpha < 0xFF) { | |
getLayer()->flags |= HWC_SKIP_LAYER; | |
} | |
+#ifndef CAPRI_HWC | |
} | |
+#endif | |
} | |
virtual void setDefaultState() { | |
hwc_layer_1_t* const l = getLayer(); | |
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp | |
index 75fca20..05aa131 100644 | |
--- a/services/surfaceflinger/Layer.cpp | |
+++ b/services/surfaceflinger/Layer.cpp | |
@@ -1186,6 +1186,8 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const | |
void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const { | |
uint32_t orientation = 0; | |
+// CAPRI_HWC has display problem in landscape mode when transform is used | |
+#ifndef CAPRI_HWC | |
if (!mFlinger->mDebugDisableTransformHint) { | |
// The transform hint is used to improve performance, but we can | |
// only have a single transform hint, it cannot | |
@@ -1196,6 +1198,7 @@ void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const { | |
orientation = 0; | |
} | |
} | |
+#endif | |
mSurfaceFlingerConsumer->setTransformHint(orientation); | |
} | |
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp | |
index 339e798..ffe94a9 100644 | |
--- a/services/surfaceflinger/SurfaceFlinger.cpp | |
+++ b/services/surfaceflinger/SurfaceFlinger.cpp | |
@@ -1108,6 +1108,7 @@ void SurfaceFlinger::setUpHWComposer() { | |
sp<const DisplayDevice> hw(mDisplays[dpy]); | |
const int32_t id = hw->getHwcDisplayId(); | |
if (id >= 0) { | |
+#ifdef QCOM_HARDWARE | |
// Get the layers in the current drawying state | |
const LayerVector& layers(mDrawingState.layersSortedByZ); | |
bool freezeSurfacePresent = false; | |
@@ -1127,6 +1128,7 @@ void SurfaceFlinger::setUpHWComposer() { | |
} | |
} | |
} | |
+#endif | |
const Vector< sp<Layer> >& currentLayers( | |
hw->getVisibleLayersSortedByZ()); | |
@@ -1140,6 +1142,7 @@ void SurfaceFlinger::setUpHWComposer() { | |
*/ | |
const sp<Layer>& layer(currentLayers[i]); | |
layer->setPerFrameData(hw, *cur); | |
+#ifdef QCOM_HARDWARE | |
if(freezeSurfacePresent) { | |
// if freezeSurfacePresent, set ANIMATING flag | |
cur->setAnimating(true); | |
@@ -1160,6 +1163,7 @@ void SurfaceFlinger::setUpHWComposer() { | |
} | |
} | |
} | |
+#endif | |
} | |
} | |
} | |
@@ -3157,6 +3161,11 @@ status_t SurfaceFlinger::captureScreenImplLocked( | |
{ | |
ATRACE_CALL(); | |
+// Rotation artifact problems when useReadPixels is false | |
+#ifdef CAPRI_HWC | |
+ useReadPixels = true; | |
+#endif | |
+ | |
// get screen geometry | |
const uint32_t hw_w = hw->getWidth(); | |
const uint32_t hw_h = hw->getHeight(); | |
-- | |
1.8.5.2 |
From bb1dec3b16fd8b1c8ebab6457d33933d134e6151 Mon Sep 17 00:00:00 2001 | |
From: Pawit Pornkitprasan <[email protected]> | |
Date: Sat, 31 May 2014 12:34:56 +0700 | |
Subject: [PATCH] telephony: support for RIL that does not send UNSOL_CALL_RING | |
Samsung Broadcom RIL does not send UNSOL_CALL_RING at all, so it | |
needs to be faked or non loop (e.g. Digital Phone) ringtones | |
won't work. | |
Change-Id: Ib7373d32777f6c42ee488972a7aa63ae8e1cd09b | |
--- | |
.../com/android/internal/telephony/PhoneBase.java | 19 +++++++++++++++++++ | |
1 file changed, 19 insertions(+) | |
diff --git a/src/java/com/android/internal/telephony/PhoneBase.java b/src/java/com/android/internal/telephony/PhoneBase.java | |
index 22c0f43..c450325 100644 | |
--- a/src/java/com/android/internal/telephony/PhoneBase.java | |
+++ b/src/java/com/android/internal/telephony/PhoneBase.java | |
@@ -150,6 +150,7 @@ public abstract class PhoneBase extends Handler implements Phone { | |
boolean mDnsCheckDisabled; | |
public DcTrackerBase mDcTracker; | |
boolean mDoesRilSendMultipleCallRing; | |
+ boolean mDoesRilSendCallRing; | |
int mCallRingContinueToken; | |
int mCallRingDelay; | |
public boolean mIsTheCurrentActivePhone = true; | |
@@ -326,6 +327,11 @@ public abstract class PhoneBase extends Handler implements Phone { | |
TelephonyProperties.PROPERTY_RIL_SENDS_MULTIPLE_CALL_RING, true); | |
Rlog.d(LOG_TAG, "mDoesRilSendMultipleCallRing=" + mDoesRilSendMultipleCallRing); | |
+ // Some RIL do not even send a single RIL_UNSOL_CALL_RING | |
+ mDoesRilSendCallRing = SystemProperties.getBoolean( | |
+ "ro.telephony.call_ring", true); | |
+ Rlog.d(LOG_TAG, "mDoesRilSendCallRing=" + mDoesRilSendCallRing); | |
+ | |
mCallRingDelay = SystemProperties.getInt( | |
TelephonyProperties.PROPERTY_CALL_RING_DELAY, 3000); | |
Rlog.d(LOG_TAG, "mCallRingDelay=" + mCallRingDelay); | |
@@ -1343,6 +1349,18 @@ public abstract class PhoneBase extends Handler implements Phone { | |
protected void notifyNewRingingConnectionP(Connection cn) { | |
if (!mIsVoiceCapable) | |
return; | |
+ | |
+ // Fake RIL_UNSOL_CALL_RING if the RIL doesn't send it. | |
+ // Note that we need the delay to prevent the request from | |
+ // being sent after CallTracker detects "RINGING" state, but | |
+ // before the correct contact-specific ringtone is queried. | |
+ // Otherwise, the incorrect ringtone will be used | |
+ if (!mDoesRilSendCallRing) { | |
+ int token = ++mCallRingContinueToken; | |
+ sendMessageDelayed( | |
+ obtainMessage(EVENT_CALL_RING_CONTINUE, token, 0), mCallRingDelay); | |
+ } | |
+ | |
AsyncResult ar = new AsyncResult(null, cn, null); | |
mNewRingingConnectionRegistrants.notifyRegistrants(ar); | |
} | |
@@ -1484,6 +1502,7 @@ public abstract class PhoneBase extends Handler implements Phone { | |
pw.println(" mDnsCheckDisabled=" + mDnsCheckDisabled); | |
pw.println(" mDcTracker=" + mDcTracker); | |
pw.println(" mDoesRilSendMultipleCallRing=" + mDoesRilSendMultipleCallRing); | |
+ pw.println(" mDoesRilSendCallRing=" + mDoesRilSendCallRing); | |
pw.println(" mCallRingContinueToken=" + mCallRingContinueToken); | |
pw.println(" mCallRingDelay=" + mCallRingDelay); | |
pw.println(" mIsTheCurrentActivePhone=" + mIsTheCurrentActivePhone); | |
-- | |
1.8.5.2 (Apple Git-48) | |
From 525af84628f8db47688de392b13c1c2fa73854bb Mon Sep 17 00:00:00 2001 | |
From: JustArchi <[email protected]> | |
Date: Fri, 3 Jan 2014 05:41:01 +0100 | |
Subject: [PATCH] Turn off errors only | |
--- | |
Android.mk | 2 +- | |
cpu_ref/Android.mk | 2 +- | |
2 files changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/Android.mk b/Android.mk | |
index bdde8a1..6a580b2 100644 | |
--- a/Android.mk | |
+++ b/Android.mk | |
@@ -1,7 +1,7 @@ | |
LOCAL_PATH:=$(call my-dir) | |
-rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable | |
+rs_base_CFLAGS := -Wno-error -Wall -Wno-unused-parameter -Wno-unused-variable | |
ifeq ($(TARGET_BUILD_PDK), true) | |
rs_base_CFLAGS += -D__RS_PDK__ | |
endif | |
diff --git a/cpu_ref/Android.mk b/cpu_ref/Android.mk | |
index 03fdcba..40cb156 100644 | |
--- a/cpu_ref/Android.mk | |
+++ b/cpu_ref/Android.mk | |
@@ -1,7 +1,7 @@ | |
LOCAL_PATH:=$(call my-dir) | |
-rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable | |
+rs_base_CFLAGS := -Wno-error -Wall -Wno-unused-parameter -Wno-unused-variable | |
ifeq ($(TARGET_BUILD_PDK), true) | |
rs_base_CFLAGS += -D__RS_PDK__ | |
endif | |
-- | |
1.9.3 |
From 9ea34a45b82771a564ba9549752d152fbd529acf Mon Sep 17 00:00:00 2001 | |
From: Pawit Pornkitprasan <[email protected]> | |
Date: Tue, 10 Dec 2013 20:09:12 +0700 | |
Subject: [PATCH] libbt: switch to N_BRCM_HCI line disclipline for userial | |
ioctl | |
Change-Id: I12c297c6b26fc0cb6f0a36ed8f5d04d4d36a4092 | |
--- | |
src/userial_vendor.c | 11 +++++++++++ | |
1 file changed, 11 insertions(+) | |
diff --git a/src/userial_vendor.c b/src/userial_vendor.c | |
index 5233d19..86d98e8 100755 | |
--- a/src/userial_vendor.c | |
+++ b/src/userial_vendor.c | |
@@ -183,6 +183,10 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg) | |
uint16_t parity; | |
uint8_t stop_bits; | |
+#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE) | |
+ int ldisc; | |
+#endif | |
+ | |
vnd_userial.fd = -1; | |
if (!userial_to_tcio_baud(p_cfg->baud, &baud)) | |
@@ -252,6 +256,13 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg) | |
tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); | |
#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE) | |
+ // TODO: check for breakage on tuna (Galaxy Nexus). It defines this, | |
+ // but does not contain the kernel code to support it. | |
+ | |
+ // Switch to N_BRCM_HCI line disclipline for ioctl to work | |
+ ldisc = 25; // N_BRCM_HCI | |
+ ioctl(vnd_userial.fd, TIOCSETD, &ldisc); | |
+ | |
userial_ioctl_init_bt_wake(vnd_userial.fd); | |
#endif | |
-- | |
1.8.3.4 (Apple Git-47) | |
diff --git a/res/xml/preference_headers.xml b/res/xml/preference_headers.xml | |
index cdbeb31..6b3ab10 100644 | |
--- a/res/xml/preference_headers.xml | |
+++ b/res/xml/preference_headers.xml | |
@@ -10,12 +10,6 @@ | |
android:fragment="com.carbon.fibers.fragments.ButtonSettings" /> | |
<header | |
- android:id="@+id/more_device_settings" | |
- android:title="@string/more_device_controls_title" | |
- android:icon="@drawable/ic_fibers_device" | |
- android:fragment="com.carbon.fibers.fragments.MoreDeviceSettings" /> | |
- | |
- <header | |
android:key="@+id/interface_settings" | |
android:icon="@drawable/ic_fibers_interface" | |
android:title="@string/user_interface" |
diff --git a/config/common.mk b/config/common.mk | |
index 0ceb221..eeecdf0 100644 | |
--- a/config/common.mk | |
+++ b/config/common.mk | |
@@ -66,29 +66,21 @@ PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0 | |
PRODUCT_PACKAGES += \ | |
BluetoothExt \ | |
Camera \ | |
- Development \ | |
CMFileManager \ | |
- Galaxy4 \ | |
LatinIME \ | |
- LiveWallpapers \ | |
LiveWallpapersPicker \ | |
LockClock \ | |
- NoiseField \ | |
- OmniSwitch \ | |
PhaseBeam \ | |
PhotoTable \ | |
Superuser \ | |
su \ | |
Torch \ | |
- VoicePlus \ | |
libemoji | |
# carbon packages | |
PRODUCT_PACKAGES += \ | |
BlueBalls \ | |
CarbonAbout \ | |
- CarbonDelta \ | |
- ROMStats \ | |
Wallpapers | |
# dsp manager | |
diff --git a/config/common_full.mk b/config/common_full.mk | |
index 09ac659..1069f2e 100644 | |
--- a/config/common_full.mk | |
+++ b/config/common_full.mk | |
@@ -9,11 +9,5 @@ include frameworks/base/data/sounds/AudioPackageNewWave.mk | |
# Optional Carbon packages | |
PRODUCT_PACKAGES += \ | |
- HoloSpiralWallpaper \ | |
- MagicSmokeWallpapers \ | |
- NoiseField \ | |
- Galaxy4 \ | |
- LiveWallpapers \ | |
LiveWallpapersPicker \ | |
- VisualizationWallpapers \ | |
PhaseBeam |