summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmds/dumpstate/utils.c2
-rw-r--r--libs/binder/tests/binderDriverInterfaceTest.cpp30
-rw-r--r--opengl/libagl/Android.mk2
-rw-r--r--opengl/libagl/fp.cpp2
-rw-r--r--opengl/libagl/matrix.h4
-rw-r--r--services/inputflinger/Android.mk7
-rw-r--r--services/inputflinger/EventHub.cpp4
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp15
8 files changed, 29 insertions, 37 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index e3042eb2b..81cdd121c 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -360,7 +360,7 @@ int run_command(const char *title, int timeout_seconds, const char *command, ...
}
if (timeout_seconds && elapsed / NANOS_PER_SEC > timeout_seconds) {
- printf("*** %s: Timed out after %ds (killing pid %d)\n", command, (int) elapsed, pid);
+ printf("*** %s: Timed out after %.3fs (killing pid %d)\n", command, (float) elapsed / NANOS_PER_SEC, pid);
kill(pid, SIGTERM);
return -1;
}
diff --git a/libs/binder/tests/binderDriverInterfaceTest.cpp b/libs/binder/tests/binderDriverInterfaceTest.cpp
index acb7d4992..315f34956 100644
--- a/libs/binder/tests/binderDriverInterfaceTest.cpp
+++ b/libs/binder/tests/binderDriverInterfaceTest.cpp
@@ -58,7 +58,7 @@ class BinderDriverInterfaceTestEnv : public ::testing::Environment {
BC_ENTER_LOOPER,
};
struct binder_write_read bwr = binder_write_read();
- bwr.write_buffer = (intptr_t)bc;
+ bwr.write_buffer = (uintptr_t)bc;
bwr.write_size = sizeof(bc);
ret = ioctl(m_binderFd, BINDER_WRITE_READ, &bwr);
EXPECT_EQ(0, ret);
@@ -111,10 +111,10 @@ class BinderDriverInterfaceTest : public ::testing::Test {
uint32_t br[32];
struct binder_write_read bwr = binder_write_read();
SCOPED_TRACE("TestReadEmpty");
- bwr.read_buffer = (intptr_t)br;
+ bwr.read_buffer = (uintptr_t)br;
bwr.read_size = sizeof(br);
binderTestIoctlErr1(BINDER_WRITE_READ, &bwr, EAGAIN);
- EXPECT_EQ(0, bwr.read_consumed);
+ EXPECT_EQ(0u, bwr.read_consumed);
for (i = 0; i * sizeof(uint32_t) < bwr.read_consumed; i++) {
SCOPED_TRACE(testing::Message() << "i = " << i);
EXPECT_EQ(BR_NOOP, br[i]);
@@ -206,7 +206,7 @@ TEST_F(BinderDriverInterfaceTest, IncRefsAcquireReleaseDecRefs) {
0,
};
struct binder_write_read bwr = binder_write_read();
- bwr.write_buffer = (intptr_t)bc;
+ bwr.write_buffer = (uintptr_t)bc;
bwr.write_size = sizeof(bc);
binderTestIoctl(BINDER_WRITE_READ, &bwr);
EXPECT_EQ(sizeof(bc), bwr.write_consumed);
@@ -241,9 +241,9 @@ TEST_F(BinderDriverInterfaceTest, Transaction) {
} __attribute__((packed)) br;
struct binder_write_read bwr = binder_write_read();
- bwr.write_buffer = (intptr_t)&bc1;
+ bwr.write_buffer = (uintptr_t)&bc1;
bwr.write_size = sizeof(bc1);
- bwr.read_buffer = (intptr_t)&br;
+ bwr.read_buffer = (uintptr_t)&br;
bwr.read_size = sizeof(br);
{
@@ -264,12 +264,12 @@ TEST_F(BinderDriverInterfaceTest, Transaction) {
if (bwr.read_consumed > offsetof(typeof(br), cmd2))
EXPECT_EQ(BR_REPLY, br.cmd2);
if (bwr.read_consumed >= offsetof(typeof(br), pad)) {
- EXPECT_EQ(0, br.arg2.target.ptr);
- EXPECT_EQ(0, br.arg2.cookie);
- EXPECT_EQ(0, br.arg2.code);
- EXPECT_EQ(0, br.arg2.flags);
- EXPECT_EQ(0, br.arg2.data_size);
- EXPECT_EQ(0, br.arg2.offsets_size);
+ EXPECT_EQ(0u, br.arg2.target.ptr);
+ EXPECT_EQ(0u, br.arg2.cookie);
+ EXPECT_EQ(0u, br.arg2.code);
+ EXPECT_EQ(0u, br.arg2.flags);
+ EXPECT_EQ(0u, br.arg2.data_size);
+ EXPECT_EQ(0u, br.arg2.offsets_size);
SCOPED_TRACE("3rd WriteRead");
@@ -283,7 +283,7 @@ TEST_F(BinderDriverInterfaceTest, Transaction) {
.arg1 = br.arg2.data.ptr.buffer,
};
- bwr.write_buffer = (intptr_t)&bc2;
+ bwr.write_buffer = (uintptr_t)&bc2;
bwr.write_size = sizeof(bc2);
bwr.write_consumed = 0;
bwr.read_size = 0;
@@ -329,9 +329,9 @@ TEST_F(BinderDriverInterfaceTest, RequestDeathNotification) {
} __attribute__((packed)) br;
struct binder_write_read bwr = binder_write_read();
- bwr.write_buffer = (intptr_t)&bc;
+ bwr.write_buffer = (uintptr_t)&bc;
bwr.write_size = sizeof(bc);
- bwr.read_buffer = (intptr_t)&br;
+ bwr.read_buffer = (uintptr_t)&br;
bwr.read_size = sizeof(br);
binderTestIoctl(BINDER_WRITE_READ, &bwr);
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 64320cf75..4b08749b2 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -31,7 +31,9 @@ LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils liblog libpixelflinger
LOCAL_SRC_FILES_arm += fixed_asm.S iterators.S
LOCAL_CFLAGS_arm += -fstrict-aliasing
+ifndef ARCH_MIPS_REV6
LOCAL_SRC_FILES_mips += arch-mips/fixed_asm.S
+endif
LOCAL_CFLAGS_mips += -fstrict-aliasing
# The graphics code can generate division by zero
LOCAL_CFLAGS_mips += -mno-check-zero-division
diff --git a/opengl/libagl/fp.cpp b/opengl/libagl/fp.cpp
index aea44493e..a7a4f7b10 100644
--- a/opengl/libagl/fp.cpp
+++ b/opengl/libagl/fp.cpp
@@ -19,7 +19,7 @@
// ----------------------------------------------------------------------------
-#if !defined(__arm__) && !defined(__mips__)
+#if !(defined(__arm__) || (defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6))
GGLfixed gglFloatToFixed(float v) {
return GGLfixed(floorf(v * 65536.0f + 0.5f));
}
diff --git a/opengl/libagl/matrix.h b/opengl/libagl/matrix.h
index 5bd717aed..cafc11905 100644
--- a/opengl/libagl/matrix.h
+++ b/opengl/libagl/matrix.h
@@ -74,7 +74,7 @@ GLfixed vsquare3(GLfixed a, GLfixed b, GLfixed c)
);
return r;
-#elif defined(__mips__)
+#elif defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6
GLfixed res;
int32_t t1,t2,t3;
@@ -160,7 +160,7 @@ static inline GLfixed mla3a( GLfixed a0, GLfixed b0,
);
return r;
-#elif defined(__mips__)
+#elif defined(__mips__) && !defined(__LP64__) && __mips_isa_rev < 6
GLfixed res;
int32_t t1,t2;
diff --git a/services/inputflinger/Android.mk b/services/inputflinger/Android.mk
index 85edbe5db..1af59a3f8 100644
--- a/services/inputflinger/Android.mk
+++ b/services/inputflinger/Android.mk
@@ -31,16 +31,13 @@ LOCAL_SHARED_LIBRARIES := \
libinput \
liblog \
libutils \
- libui \
- libhardware_legacy
+ libui \
+ libhardware_legacy
# TODO: Move inputflinger to its own process and mark it hidden
#LOCAL_CFLAGS += -fvisibility=hidden
-LOCAL_C_INCLUDES := \
- external/openssl/include \
-
LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
index 7a77c305c..93ce0103d 100644
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -858,7 +858,6 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
int(iev.time.tv_sec), int(iev.time.tv_usec));
}
-#ifdef HAVE_POSIX_CLOCKS
// Use the time specified in the event instead of the current time
// so that downstream code can get more accurate estimates of
// event dispatch latency from the time the event is enqueued onto
@@ -909,9 +908,6 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
event->when, time, now);
}
}
-#else
- event->when = now;
-#endif
event->deviceId = deviceId;
event->type = iev.type;
event->code = iev.code;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8daf0f972..6a5a39edb 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2359,18 +2359,15 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
result.appendFormat("Permission Denial: "
"can't dump SurfaceFlinger from pid=%d, uid=%d\n", pid, uid);
} else {
- // Try to get the main lock, but don't insist if we can't
+ // Try to get the main lock, but give up after one second
// (this would indicate SF is stuck, but we want to be able to
// print something in dumpsys).
- int retry = 3;
- while (mStateLock.tryLock()<0 && --retry>=0) {
- usleep(1000000);
- }
- const bool locked(retry >= 0);
+ status_t err = mStateLock.timedLock(s2ns(1));
+ bool locked = (err == NO_ERROR);
if (!locked) {
- result.append(
- "SurfaceFlinger appears to be unresponsive, "
- "dumping anyways (no locks held)\n");
+ result.appendFormat(
+ "SurfaceFlinger appears to be unresponsive (%s [%d]), "
+ "dumping anyways (no locks held)\n", strerror(-err), err);
}
bool dumpAll = true;