OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
Steven Thomas [Tue, 18 Jul 2017 00:23:24 +0000 (00:23 +0000)]
Merge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
am: 87cd11513f

Change-Id: I00d0a5267913c284eddd97bfe7eefb15b9ee403e

7 years agoMerge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
Steven Thomas [Tue, 18 Jul 2017 00:19:04 +0000 (00:19 +0000)]
Merge "Fix concurrent writes to the hardware composer" into oc-dr1-dev

7 years agoFix concurrent writes to the hardware composer
Steven Thomas [Mon, 17 Jul 2017 20:59:23 +0000 (13:59 -0700)]
Fix concurrent writes to the hardware composer

Stale hardware composer layers were causing concurrent writes to the
Composer object from the surface flinger and vr flinger threads, a big
no-no. The concurrent writes would sometimes stomp on each other,
causing the hardware composer service to fail to read the command buffer
containing surface flinger's composer commands, leading to all sorts of
issues.

Bug: 62925812

Test: Locally added logs to surface flinger to catch the concurrent
writes, and confirmed the logs are no longer present with this patch
applied. Went through a bunch of sleep/wake cycles and confirmed the
device continues to function normally.

Change-Id: I70929c4a3c71142f5e9083cac294c122d127aa27

7 years agoMerge "Fix memory leak." into oc-dr1-dev
Corey Tabaka [Mon, 17 Jul 2017 21:44:14 +0000 (21:44 +0000)]
Merge "Fix memory leak." into oc-dr1-dev
am: 02b37f7594

Change-Id: If382353979a9a31c2d46fd7398ec59b086d97ac6

7 years agoMerge "Fix memory leak." into oc-dr1-dev
TreeHugger Robot [Mon, 17 Jul 2017 21:35:38 +0000 (21:35 +0000)]
Merge "Fix memory leak." into oc-dr1-dev

7 years agoMerge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
Dan Stoza [Fri, 14 Jul 2017 20:45:47 +0000 (20:45 +0000)]
Merge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
am: 607b5d1b40

Change-Id: I51b25a25bae1517f64edf9ce072244addd1b3544

7 years agoMerge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
Dan Stoza [Fri, 14 Jul 2017 20:38:46 +0000 (20:38 +0000)]
Merge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev

* changes:
  SF: Move screenshot Surface ops off main thread
  SF: Add ImageHolder for screenshot code
  SF: Add WindowDisconnector for screenshot code

7 years agoMerge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
Jesse Hall [Fri, 14 Jul 2017 19:40:55 +0000 (19:40 +0000)]
Merge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
am: 2f83627449

Change-Id: I0462d321276c9315fba82d8cc97b9889c0e5a88c

7 years agoMerge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
TreeHugger Robot [Fri, 14 Jul 2017 19:33:18 +0000 (19:33 +0000)]
Merge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev

7 years agoFix memory leak.
Corey Tabaka [Fri, 14 Jul 2017 18:43:49 +0000 (11:43 -0700)]
Fix memory leak.

A missing destructor caused a memory leak in the UDS backend for PDX.
Add the destructor and use std namespace for realloc/malloc/free.

Bug: 63026993
Test: Ran pdx_benchmarks for 400M iterations before and after fix.
      Confirmed that heap grows before fix and is stable after fix.
      Confirmed that VR service reported in the bug now have stable
      memory use.

Change-Id: If870a5db50dfaf5f212285824a1803f34acdabc7

7 years agoSF: Move screenshot Surface ops off main thread
Dan Stoza [Thu, 1 Jun 2017 23:40:30 +0000 (16:40 -0700)]
SF: Move screenshot Surface ops off main thread

This change rearranges the various operations that correspond to
capturing a screenshot such that all of the Surface-related ones
(connect, dequeue, queue, disconnect) are performed on the incoming
Binder thread rather than on SurfaceFlinger's main thread. This has two
major benefits:

  1) It reduces the amount of time that the SurfaceFlinger main thread
     is blocked while performing a screenshot, often by a considerable
     amount. This should reduce the risk of jank when screenshots are
     taken, such as for task snapshots during window transitions.
  2) It means that the SurfaceFlinger main thread is not susceptible to
     being blocked by a badly-performing BufferQueue consumer. This
     also enables us to remove the GraphicProducerWrapper class, which
     was previously performing a similar role.

Finally, this change also adds a mechanism that detects if the
screenshot would have been performed between the two phases of normal
SurfaceFlinger operation (invalidate and refresh), and defers it if
this condition is detected. This should further reduce the risk of jank
as a screenshot will only occur between frames rather than in the
middle of a frame.

Bug: 62257775
Test: SurfaceFlinger_test and manual verification that screenshots
      still work
Change-Id: I23e6f088b4d6e477472dfc2a6c36ef3dd930c047

7 years agoMerge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
Jiwen 'Steve' Cai [Fri, 14 Jul 2017 01:59:40 +0000 (01:59 +0000)]
Merge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
am: c3e0cdb28a

Change-Id: I5ed228cd0f98a6324b799b506377df750238e549

7 years agoMerge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
TreeHugger Robot [Fri, 14 Jul 2017 01:53:23 +0000 (01:53 +0000)]
Merge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev

7 years agoMerge "Add sensor HAL process into dump list" into oc-dr1-dev
Peng Xu [Thu, 13 Jul 2017 23:07:02 +0000 (23:07 +0000)]
Merge "Add sensor HAL process into dump list" into oc-dr1-dev
am: fec340ea0f

Change-Id: I942e3fc98bea55a826e81a90581a5e09ec825742

7 years agoMerge "Add sensor HAL process into dump list" into oc-dr1-dev
TreeHugger Robot [Thu, 13 Jul 2017 23:01:06 +0000 (23:01 +0000)]
Merge "Add sensor HAL process into dump list" into oc-dr1-dev

7 years agoMerge "Add getBinderKernelReferences" am: 4bd6f567d5 -s ours am: 6a505f7ce1 -s...
Colin Cross [Thu, 13 Jul 2017 20:15:43 +0000 (20:15 +0000)]
Merge "Add getBinderKernelReferences" am: 4bd6f567d5  -s ours am: 6a505f7ce1  -s ours
am: 5e1532a8ea  -s ours

Change-Id: I443175be02ff43cdd241b264129441c800aa6af0

7 years agoMerge "Add getBinderKernelReferences" am: 4bd6f567d5 -s ours
Colin Cross [Thu, 13 Jul 2017 20:03:57 +0000 (20:03 +0000)]
Merge "Add getBinderKernelReferences" am: 4bd6f567d5  -s ours
am: 6a505f7ce1  -s ours

Change-Id: I97b5a1471fbf262765869cdf0635dc3d04f723df

7 years agoMerge "Add getBinderKernelReferences"
Colin Cross [Thu, 13 Jul 2017 19:55:08 +0000 (19:55 +0000)]
Merge "Add getBinderKernelReferences"
am: 4bd6f567d5  -s ours

Change-Id: I42dcecfe9d49d60c1552bdb597a2f3c2001fd7ed

7 years agoMerge "Add getBinderKernelReferences"
Colin Cross [Thu, 13 Jul 2017 19:41:25 +0000 (19:41 +0000)]
Merge "Add getBinderKernelReferences"

7 years agoAdd getBinderKernelReferences am: 9d45ccc057
Colin Cross [Thu, 13 Jul 2017 16:11:01 +0000 (16:11 +0000)]
Add getBinderKernelReferences am: 9d45ccc057
am: e318eb1af8

Change-Id: Ia369a97ba24b80d81d81feb6c53646b9f4747424

7 years agoAdd getBinderKernelReferences
Colin Cross [Thu, 13 Jul 2017 16:08:34 +0000 (16:08 +0000)]
Add getBinderKernelReferences
am: 9d45ccc057

Change-Id: I5710b544cb1ce2d07d396aa302d313324d4e3e3b

7 years agoAdd getBinderKernelReferences
Colin Cross [Wed, 21 Jun 2017 00:48:33 +0000 (17:48 -0700)]
Add getBinderKernelReferences

Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)

7 years agoAdd getBinderKernelReferences
Colin Cross [Wed, 21 Jun 2017 00:48:33 +0000 (17:48 -0700)]
Add getBinderKernelReferences

Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)

7 years agoFix ALOGE_IF log in bufferhubqueue
Jiwen 'Steve' Cai [Wed, 12 Jul 2017 22:08:59 +0000 (15:08 -0700)]
Fix ALOGE_IF log in bufferhubqueue

Bug: 63636350
Test: system builds when with TRACE=1 override
Change-Id: Icc1245191b90aafbb553a1d2b0bce3bae4d0a05a

7 years agoSF: Add ImageHolder for screenshot code
Dan Stoza [Thu, 1 Jun 2017 21:37:39 +0000 (14:37 -0700)]
SF: Add ImageHolder for screenshot code

Adds a simple ImageHolder class, which holds an EGLImage and destroys
it either when an explicit destroy() method is called or when the class
is destructed (whichever occurs first). This allows us to reduce the
nesting of, and otherwise simplify, the captureScreenImplLocked method
of SurfaceFlinger.

Bug: 62257775
Test: SurfaceFlinger_test and manually verified that screenshots still
      work
Change-Id: I800208e8f6bedd2ce66827268ecc64968dbe616d

7 years agoSF: Add WindowDisconnector for screenshot code
Dan Stoza [Thu, 1 Jun 2017 21:16:23 +0000 (14:16 -0700)]
SF: Add WindowDisconnector for screenshot code

Adds a simple WindowDisconnector class that holds an ANativeWindow* and
disconnects from it when it goes out of scope. This allows us to
drastically reduce the nesting of the captureScreenImplLocked method
of SurfaceFlinger.

Bug: 62257775
Test: SurfaceFlinger_test and manually verified that screenshots still
      work
Change-Id: I55123a7a6b2036158d0959328b0e6f8b206cce5d

7 years agoAdd sensor HAL process into dump list
Peng Xu [Wed, 12 Jul 2017 04:14:42 +0000 (21:14 -0700)]
Add sensor HAL process into dump list

Test: adb bugreport contains native stack trace for
      /vendor/bin/hw/android.hardware.sensors@1.0-service

Bug: 63096400
Change-Id: I2c24d4fd2fab7ed52dbd12b5324ae03aeaec3cda

7 years agoAdd GraphicBufferMapper::preloadHal
Jesse Hall [Thu, 6 Jul 2017 21:02:29 +0000 (14:02 -0700)]
Add GraphicBufferMapper::preloadHal

Plumbing to allow Zygote to explicitly preload the a.h.graphics.mapper
HAL. An earlier attempt did this implicitly with a static initializer in
libui.so, but the library is also used by non-Zygote processes that
don't have access to HALs. This way, the HIDL libraries and HAL are only
loaded in Zygote and its children, not random other processes.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I4989c8089e3a4cfd627f8940f5552950c1c617fc
(cherry picked from commit 5dac7819ac9461c14f0b7c208597579c5c3fb814)

7 years agoMerge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb
Tom Cherry [Wed, 12 Jul 2017 01:01:21 +0000 (01:01 +0000)]
Merge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb
am: 7dfd2ba2d6

Change-Id: If53e428ad2e3ebd2c6df0468716eb30e27a83fe2

7 years agoMerge "remove extraneous `using namespace android`" am: 8e661076b6
Tom Cherry [Wed, 12 Jul 2017 00:57:50 +0000 (00:57 +0000)]
Merge "remove extraneous `using namespace android`" am: 8e661076b6
am: b765fc92bb

Change-Id: I56c5e1f53e9351ceb85521df00f6baca3c8fa49d

7 years agoMerge "remove extraneous `using namespace android`"
Tom Cherry [Wed, 12 Jul 2017 00:54:21 +0000 (00:54 +0000)]
Merge "remove extraneous `using namespace android`"
am: 8e661076b6

Change-Id: Ie4c4191c448b78afddba31c712c6963238d92169

7 years agoMerge "remove extraneous `using namespace android`"
Tom Cherry [Wed, 12 Jul 2017 00:49:35 +0000 (00:49 +0000)]
Merge "remove extraneous `using namespace android`"

7 years agoMerge "Synchronous resource recover mechanism for ISensorEventConnection" into oc...
Peng Xu [Tue, 11 Jul 2017 21:57:39 +0000 (21:57 +0000)]
Merge "Synchronous resource recover  mechanism for ISensorEventConnection" into oc-dr1-dev
am: 0db05d3448

Change-Id: I21f2f66a84de9d5737e9c41c2cfff7f6295c3c12

7 years agoMerge "Synchronous resource recover mechanism for ISensorEventConnection" into oc...
Peng Xu [Tue, 11 Jul 2017 21:49:59 +0000 (21:49 +0000)]
Merge "Synchronous resource recover  mechanism for ISensorEventConnection" into oc-dr1-dev

7 years agoremove extraneous `using namespace android`
Tom Cherry [Tue, 11 Jul 2017 21:25:01 +0000 (14:25 -0700)]
remove extraneous `using namespace android`

This namespace is not used by this file and its declaration is removed
in a separate CL from the only header that defines it, so remove this
extraneous line.

Test: Build
Change-Id: Ibec16b8889f4d886a9f9ec865d872e2437da034b

7 years agoMerge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
Wei Wang [Tue, 11 Jul 2017 19:56:03 +0000 (19:56 +0000)]
Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
am: 5ebcaf1bb0

Change-Id: I2e51acc6d0c83fd8d3865cdae676e33111d494ee

7 years agoMerge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
Wei Wang [Tue, 11 Jul 2017 19:49:01 +0000 (19:49 +0000)]
Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev

* changes:
  servicemanager: Mark servicemanager as shutdown critical
  servicemanager: Mark vndservicemanager as shutdown critical

7 years agoservicemanager: Mark servicemanager as shutdown critical
Wei Wang [Tue, 11 Jul 2017 17:01:09 +0000 (10:01 -0700)]
servicemanager: Mark servicemanager as shutdown critical

Bug: 629519296351436362845700
Test: Build
Change-Id: Ib1b7aec4b6d3c590eb469daeed40b954d37efa18

7 years agoMerge "Fix BufferHub state machine to return errors on invalid transitions." into...
Corey Tabaka [Tue, 11 Jul 2017 16:57:49 +0000 (16:57 +0000)]
Merge "Fix BufferHub state machine to return errors on invalid transitions." into oc-dr1-dev
am: 2b7b5c34d3

Change-Id: I311d3fa978ca1a7d74bc6403be59705dd9ea995e

7 years agoservicemanager: Mark vndservicemanager as shutdown critical
Roopesh Rajashekharaiah Nataraja [Mon, 10 Jul 2017 23:22:27 +0000 (16:22 -0700)]
servicemanager: Mark vndservicemanager as shutdown critical

vndservicemanager needs to be alive during shutdown to allow vndk
components which may run during shutdown to communicate. The system
ndk servicemanager keeps running throughout shutdown, so this brings
the vndservicemanager on par with that behavior.

Bug: 629519296351436362845700
Test: Build
Change-Id: Iba154820ef69c6491a5cb05747b6b905763a825d

7 years agoMerge "Fix BufferHub state machine to return errors on invalid transitions." into...
TreeHugger Robot [Tue, 11 Jul 2017 16:50:17 +0000 (16:50 +0000)]
Merge "Fix BufferHub state machine to return errors on invalid transitions." into oc-dr1-dev

7 years agoSynchronous resource recover mechanism for ISensorEventConnection
Peng Xu [Mon, 10 Jul 2017 23:41:08 +0000 (16:41 -0700)]
Synchronous resource recover  mechanism for ISensorEventConnection

Add synchronous destroy() function to recover resource used by
remote ISensorEventConnection object.

Bug: 63542033
Test: SensorDirectReportTest pass
Change-Id: If98782ee12c7b1a733eb15a2fd8d7c5dacde243b

7 years agoMerge "Make default permission checks in performance service more restrictive." into...
Corey Tabaka [Mon, 10 Jul 2017 20:42:48 +0000 (20:42 +0000)]
Merge "Make default permission checks in performance service more restrictive." into oc-dr1-dev
am: 9481328acc

Change-Id: I813414e808bc1f7a04ad4f457f291bffddfad43f

7 years agoMerge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
Corey Tabaka [Mon, 10 Jul 2017 20:42:32 +0000 (20:42 +0000)]
Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
am: d90e5399a4

Change-Id: I73730c662401aded83ffcae6430937a2472ae071

7 years agoMerge "Make default permission checks in performance service more restrictive." into...
TreeHugger Robot [Mon, 10 Jul 2017 20:39:01 +0000 (20:39 +0000)]
Merge "Make default permission checks in performance service more restrictive." into oc-dr1-dev

7 years agoMerge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 20:33:44 +0000 (20:33 +0000)]
Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev

7 years agoMerge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
Pat Plunkett [Mon, 10 Jul 2017 19:29:56 +0000 (19:29 +0000)]
Merge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
am: 222b760089

Change-Id: Ic4344b56bf1ea766114bf6a0faaeb0b47c064651

7 years agoMerge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 19:24:27 +0000 (19:24 +0000)]
Merge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev

7 years agoMerge "Validate the size of all dex paths eagerly" into oc-dr1-dev
Calin Juravle [Mon, 10 Jul 2017 19:11:51 +0000 (19:11 +0000)]
Merge "Validate the size of all dex paths eagerly" into oc-dr1-dev
am: c3be65b533

Change-Id: I0f37ecbe7f47fc011b62f366f88d38c3cffa7908

7 years agoMerge "dvrReadBufferQueueDequeue: allow empty metadata" into oc-dr1-dev
Jiwen 'Steve' Cai [Mon, 10 Jul 2017 19:11:26 +0000 (19:11 +0000)]
Merge "dvrReadBufferQueueDequeue: allow empty metadata" into oc-dr1-dev
am: 3a674573f3

Change-Id: Ib9ce46939355fdb46802fe83741a6c10f3c8a4df

7 years agoMerge "Validate the size of all dex paths eagerly" into oc-dr1-dev
Calin Juravle [Mon, 10 Jul 2017 19:07:15 +0000 (19:07 +0000)]
Merge "Validate the size of all dex paths eagerly" into oc-dr1-dev

7 years agoMerge "dvrReadBufferQueueDequeue: allow empty metadata" into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 19:04:32 +0000 (19:04 +0000)]
Merge "dvrReadBufferQueueDequeue: allow empty metadata" into oc-dr1-dev

7 years agoMerge "Include tracking state bits to DvrPose." into oc-dr1-dev
Okan Arikan [Mon, 10 Jul 2017 19:02:26 +0000 (19:02 +0000)]
Merge "Include tracking state bits to DvrPose." into oc-dr1-dev
am: 0d346a0cb1

Change-Id: I1fe407462296a93ba23cc1d00fe95379cae21e05

7 years agoMerge "Include tracking state bits to DvrPose." into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 18:56:20 +0000 (18:56 +0000)]
Merge "Include tracking state bits to DvrPose." into oc-dr1-dev

7 years agoMerge "vulkan: update Vulkan headers to 1.0.53" am: 38bcc110b8 am: d0b439e33a
Jesse Hall [Mon, 10 Jul 2017 14:44:59 +0000 (14:44 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.53" am: 38bcc110b8 am: d0b439e33a
am: 06ac13f0e5

Change-Id: Ie5587cd9ad0dee432ae3e50eff347a4d7d8602cd

7 years agoMerge "vulkan: update Vulkan headers to 1.0.53" am: 38bcc110b8
Jesse Hall [Mon, 10 Jul 2017 14:36:40 +0000 (14:36 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.53" am: 38bcc110b8
am: d0b439e33a

Change-Id: I6f5b93b8b6a56e90a51d8779c7d76a4ac321cf9a

7 years agoMerge "vulkan: update Vulkan headers to 1.0.53"
Jesse Hall [Mon, 10 Jul 2017 14:29:17 +0000 (14:29 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.53"
am: 38bcc110b8

Change-Id: I986ac1445697fb93fd72ab196087145a6b9945a0

7 years agoMerge "vulkan: update Vulkan headers to 1.0.53"
Treehugger Robot [Mon, 10 Jul 2017 14:19:19 +0000 (14:19 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.53"

7 years agoMerge "Add target binderDriverInterfaceTest_IPC_32" am: 86c1fa9527 am: 940286e38f
Hsin-Yi Chen [Mon, 10 Jul 2017 09:22:52 +0000 (09:22 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32" am: 86c1fa9527 am: 940286e38f
am: ceb942b99f

Change-Id: If0c39eda327dc49e08ab13dc6e0da2038c6ae815

7 years agoMerge "Add target binderDriverInterfaceTest_IPC_32" am: 86c1fa9527
Hsin-Yi Chen [Mon, 10 Jul 2017 09:18:52 +0000 (09:18 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32" am: 86c1fa9527
am: 940286e38f

Change-Id: Iaefd8b3a1e9c0f4bde0b3e04342233be93eb7b18

7 years agoMerge "Add target binderDriverInterfaceTest_IPC_32"
Hsin-Yi Chen [Mon, 10 Jul 2017 09:13:53 +0000 (09:13 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32"
am: 86c1fa9527

Change-Id: I86a28976f575c314bcd74cb8edc18334ced9c575

7 years agoMerge "Add target binderDriverInterfaceTest_IPC_32"
Hsin-Yi Chen [Mon, 10 Jul 2017 09:06:14 +0000 (09:06 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32"

7 years agoAdd target binderDriverInterfaceTest_IPC_32
Hsin-Yi Chen [Wed, 7 Jun 2017 10:05:05 +0000 (18:05 +0800)]
Add target binderDriverInterfaceTest_IPC_32

Add the target binderDriverInterfaceTest_IPC_32 which tests 32-bit
kernel and is independent from product_variables.

Bug: 62124459
Test: vts-tradefed run commandAndExit vts -m VtsKernelBinderTest
Change-Id: Ifad9ef24c35060179650955e24d1f046af7b7385

7 years agovulkan: update Vulkan headers to 1.0.53
Jesse Hall [Sat, 8 Jul 2017 00:13:23 +0000 (17:13 -0700)]
vulkan: update Vulkan headers to 1.0.53

Key changes since 1.0.49:
* Rename some extension enumerants to conform to naming style
* Add VK_EXT_sampler_filter_minmax
* Add VK_EXT_blend_operation_advanced
* Add VK_AMD_texture_gather_bias_lod
* Add VK_AMD_gpu_shader_int16
* Add VK_NV_fragment_coverage_to_color
* Add VK_NV_framebuffer_mixed_samples
* Add VK_NV_fill_rectangle

Test: build
Change-Id: I6b7931f4b7dfe4cae4fbc85fa961249534ccc11e

7 years agoMerge "vulkan: update Vulkan headers to 1.0.49" am: fa3c1590b9 -s ours am: 08fa90eaa...
Jesse Hall [Sat, 8 Jul 2017 05:16:04 +0000 (05:16 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.49" am: fa3c1590b9  -s ours am: 08fa90eaab  -s ours
am: 56d1521b02  -s ours

Change-Id: I355b8cb7488b6878ec49a8d09f85512d69ad72b8

7 years agoMerge "vulkan: update Vulkan headers to 1.0.49" am: fa3c1590b9 -s ours
Jesse Hall [Sat, 8 Jul 2017 05:13:32 +0000 (05:13 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.49" am: fa3c1590b9  -s ours
am: 08fa90eaab  -s ours

Change-Id: Ibd45109195a20a14435e9caceb8b5197f2265164

7 years agoMerge "vulkan: update Vulkan headers to 1.0.49"
Jesse Hall [Sat, 8 Jul 2017 05:11:03 +0000 (05:11 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.49"
am: fa3c1590b9  -s ours

Change-Id: I1d22e6ffa33b6cd4479d6b09bb9d54c67f72ebfa

7 years agoMerge "vulkan: update Vulkan headers to 1.0.49"
Treehugger Robot [Sat, 8 Jul 2017 05:08:30 +0000 (05:08 +0000)]
Merge "vulkan: update Vulkan headers to 1.0.49"

7 years agoValidate the size of all dex paths eagerly
Calin Juravle [Thu, 6 Jul 2017 23:29:11 +0000 (16:29 -0700)]
Validate the size of all dex paths eagerly

Also, increase the PKG_PATH_MAX which is used as the max path length to
1024. This should accommodate reasonably long dex path (to cover for
longer secondary dex files paths).

If a dex path  exceeds 1024 characters the dex file will not be compiled.

Bug: 63285397
Test: manual
1) create an artifical long paths under gmscore:
2) update /data/system/package-dex-usage.list to simulate the use of those
dex file
3) run `adb shell cmd package compile -r bg-dexopt --secondary-dex
com.google.android.gms`
4) observe that a 256+ characters dex path is ok while a 1024+ long one
fails.
5) run `adb shell cmd package reconcile-secondary-dex-files
com.google.android.gms` and check no errors are present.

Change-Id: I23b34013e32c5c64ca9c1381cc4d8d67e7121cc8

7 years agoFix BufferHub state machine to return errors on invalid transitions.
Corey Tabaka [Fri, 7 Jul 2017 01:04:27 +0000 (18:04 -0700)]
Fix BufferHub state machine to return errors on invalid transitions.

The consumer side of the BufferHub flow did not have an adequate
state machine to track transitions and return errors when Acquire
or Release are requested from the wrong state. This bug allowed
other buggy usage to go unnoticed.

- Fix the consumer state machine to correctly validate all requests.
- Add tests to verify correctness of the fix.

Tested BufferHub with the new test before and after the fix and
verified that the test catches the problem and that the fix solves
the problem.

Bug: 62886596
Bug: 63149525
Test: bufferhub_tests passes.
Change-Id: I802679ed74c7f505b9243ba4048824350d4e37be

7 years agoRestore PDX support to atrace.
Corey Tabaka [Fri, 7 Jul 2017 00:34:22 +0000 (00:34 +0000)]
Restore PDX support to atrace.
am: a6c0a721bd

Change-Id: I39bd28bde2cad630c8891727670724df3c234ab6

7 years agoRestore PDX support to atrace.
Corey Tabaka [Wed, 31 May 2017 23:37:40 +0000 (16:37 -0700)]
Restore PDX support to atrace.

Restore PDX service tracing in atrace. This time only enable poking PDX services
when the "pdx" trace category is included.

Bug: 62882199
Test: Run systrace with/without pdx category and observe correct poke behavior.

Change-Id: I478332a661c3b8bc6061fda43f64b75d8113b305

7 years agoFix concurrent access bug in VrFlinger.
Corey Tabaka [Thu, 6 Jul 2017 22:39:49 +0000 (15:39 -0700)]
Fix concurrent access bug in VrFlinger.

VR surface queues have erroneous concurrent access from two threads
because of misplaced lock guards. Move the locking to cover the
queue accesses.

Bug: 62886596
Bug: 63149525
Test: Extensive logging shows that buffers are accessed in the
 correct order and that the consistency of the queues is now
 maintained.

Change-Id: I649e3d75a2230cf3aff50886df9958917d3aa4bf

7 years agoClear callbacks when destroying DvrHwcClient
Pat Plunkett [Thu, 29 Jun 2017 22:40:41 +0000 (15:40 -0700)]
Clear callbacks when destroying DvrHwcClient

When a DvrHwcClient is destroyed, the VrComposer retains a reference to its
observer. Because registerObserver returns a non-OK status if an observer
is already registered, this was causing subsequent DvrHwcClients to not be
created.

This was an issue with the CompatibilityUiOverlay app on standalone
headsets. CompatibilityUiOverlay was destroying its DvrHwcClient when turning
the screen off, but upon turning the screen back on, CompatibilityUiOverlay
was unable to create another DvrHwcClient.

Bug: 63139142
Test: Turn the screen off/on for a standalone headset, observe
CompatibilityUiOverlay running.

Change-Id: Ie45e961d2bf977ab9a661e23c558354d3a96ae20

7 years agodvrReadBufferQueueDequeue: allow empty metadata
Jiwen 'Steve' Cai [Sat, 1 Jul 2017 00:04:28 +0000 (17:04 -0700)]
dvrReadBufferQueueDequeue: allow empty metadata

Currently, when there is no metadata on the read buffer queue, we have
to pass in dummy out_metadata; otherwise the API always return
-EINVAL. This CL allows (nullptr, 0) as legit input and add test to
cover that.

Bug: 62958474
Test: Ran the updated DvrBufferQueueTest
Change-Id: I0ad666006a5d93b67a48b9c34f27e325dfa9a419

7 years agosurfaceflinger: refresh after latching any buffer
Chia-I Wu [Fri, 30 Jun 2017 23:24:33 +0000 (23:24 +0000)]
surfaceflinger: refresh after latching any buffer
am: a36bf92663

Change-Id: If437e00a4c8aeda42f26150066a4fd7baaad485e

7 years agosurfaceflinger: refresh after latching any buffer
Chia-I Wu [Fri, 30 Jun 2017 19:51:05 +0000 (12:51 -0700)]
surfaceflinger: refresh after latching any buffer

We should not skip refresh when a latched buffer happens to have an
empty dirty region.  Also, we should signal a layer update when we
skip refresh.

Bug: 62752640
Test: manual
Change-Id: Ia603e7eeb37491c6ece7ea08d5d1e3b7ba93e6fa

7 years agoMake default permission checks in performance service more restrictive.
Corey Tabaka [Fri, 30 Jun 2017 18:27:57 +0000 (11:27 -0700)]
Make default permission checks in performance service more restrictive.

- Check sending process in unrestricted policies.
- Allow IsTrustedUid() to cache results for better runtime efficiency.
- Update tests to verify unrestricted policy behavior.

Bug: 62468109
Test: performance_service_tests passes.
Change-Id: I0614879c8bde35ffeda2f673a3da68092433dc1a

7 years agoMerge "Fix potential access to invalid memory during shutdown" into oc-dr1-dev
Daniel Nicoara [Fri, 30 Jun 2017 15:46:07 +0000 (15:46 +0000)]
Merge "Fix potential access to invalid memory during shutdown" into oc-dr1-dev
am: 77e9eeba69

Change-Id: I5b5703ab3b70755d3f8b8e2674c7c32ce0e1c05b

7 years agoMerge "Fix potential access to invalid memory during shutdown" into oc-dr1-dev
TreeHugger Robot [Fri, 30 Jun 2017 15:36:48 +0000 (15:36 +0000)]
Merge "Fix potential access to invalid memory during shutdown" into oc-dr1-dev

7 years agoMerge "Add dvr api entries for sensor enable/disable" into oc-dr1-dev
Luke Song [Fri, 30 Jun 2017 02:20:48 +0000 (02:20 +0000)]
Merge "Add dvr api entries for sensor enable/disable" into oc-dr1-dev
am: 0a9bae53bc

Change-Id: I8ad0fedbac9cf950bf6917a524cb50839b41a362

7 years agoMerge "Add dvr api entries for sensor enable/disable" into oc-dr1-dev
Luke Song [Fri, 30 Jun 2017 02:14:54 +0000 (02:14 +0000)]
Merge "Add dvr api entries for sensor enable/disable" into oc-dr1-dev

7 years agoMerge "Trust navbar panel and accessibility overlays" into oc-dr1-dev
Phil Weaver [Fri, 30 Jun 2017 02:04:48 +0000 (02:04 +0000)]
Merge "Trust navbar panel and accessibility overlays" into oc-dr1-dev
am: b5f0e91c4c

Change-Id: Ia00e2b0cbaba95b3265171bbe1e13cb86813c511

7 years agoMerge "Trust navbar panel and accessibility overlays" into oc-dr1-dev
Phil Weaver [Fri, 30 Jun 2017 01:57:31 +0000 (01:57 +0000)]
Merge "Trust navbar panel and accessibility overlays" into oc-dr1-dev

7 years agoInclude tracking state bits to DvrPose.
Okan Arikan [Mon, 26 Jun 2017 17:57:24 +0000 (10:57 -0700)]
Include tracking state bits to DvrPose.

These will be used internally for debugging so VrCore
has an idea about what's going on with Tango.

Bug: 62917278
Test: No functional change.
Change-Id: I7f5f7a2ccad4f0259ee5219726bf0e6890f34187

7 years agoAdd dvr api entries for sensor enable/disable
Luke Song [Tue, 27 Jun 2017 21:03:45 +0000 (14:03 -0700)]
Add dvr api entries for sensor enable/disable

Follow-up to ag/2263549 because we want to use it in VrCore now.

Bug: 63070540
Test: Api call in VrCore
Change-Id: Ic3b2c68ade31008ada8078a74ebe2945748143ae

7 years agoFix potential access to invalid memory during shutdown
Daniel Nicoara [Fri, 23 Jun 2017 16:48:01 +0000 (12:48 -0400)]
Fix potential access to invalid memory during shutdown

Since binder threads have a reference to the callback, need to make sure
it is properly reset before deleting the DvrHwcClient object.

Bug: 63139142
Test: Ran on device to ensure VrCore restart don't result in crashes in
DvrHwcClient
Change-Id: I559844a70d4483fee3148526f704d234994a96d4

7 years agoMerge changes Id4647e54,I66b6edbd into oc-dr1-dev
Corey Tabaka [Thu, 29 Jun 2017 18:50:09 +0000 (18:50 +0000)]
Merge changes Id4647e54,I66b6edbd into oc-dr1-dev
am: bf72631a10

Change-Id: Ib1f5d7cc4841124c4f5fc1ea543ce3984dc26d16

7 years agoMerge changes I9047b298,Id9554d6b into oc-dr1-dev
Corey Tabaka [Thu, 29 Jun 2017 18:49:52 +0000 (18:49 +0000)]
Merge changes I9047b298,Id9554d6b into oc-dr1-dev
am: e6ffd49479

Change-Id: I8ac6a10b071dd5293dda9347d590b92c9cea0124

7 years agoMerge changes Id4647e54,I66b6edbd into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 18:44:52 +0000 (18:44 +0000)]
Merge changes Id4647e54,I66b6edbd into oc-dr1-dev

* changes:
  Fix VR surface attributes.
  DVR API: Implement support for deleting surface attributes.

7 years agoMerge changes I9047b298,Id9554d6b into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 18:44:35 +0000 (18:44 +0000)]
Merge changes I9047b298,Id9554d6b into oc-dr1-dev

* changes:
  libdvr: Add performance API to platform library.
  libpdx_uds: Fix uninitialized variable bug.

7 years agoMerge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev
Karthik Ravi Shankar [Thu, 29 Jun 2017 04:28:27 +0000 (04:28 +0000)]
Merge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev
am: ae11e71bb7

Change-Id: Ic3ac3d8b16a14aed3fb3553616c4adec23044f7a

7 years agoMerge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 04:21:05 +0000 (04:21 +0000)]
Merge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev

7 years agoFix VR surface attributes.
Corey Tabaka [Fri, 23 Jun 2017 03:39:42 +0000 (20:39 -0700)]
Fix VR surface attributes.

VR surface attributes had two issues that prevented the full extent
of their use:
1. The older clang version missed that templated copy constructor
   and assignment operators do not override the default ones in
   the Variant class. This caused issues with certain types when
   copy constructing / assigning from another Variant of the same
   type. This was noticed by running tests with a newer version of
   clang which provided warnings.
2. C++ rules about implicit conversion to bool from types that
   decay to pointers causes subtle issues with Variants that have
   bool elements.

   For example this assignment compiles but produces the wrong
   result:

   const int array[3] = { 1, 2, 3};
   Variant<int, bool, std::array<int, 3>> variant = array;
   EXPECT_FALSE(variant.is<bool>()); // Actually true.

   Here the programmer might accidentally think that the std::array
   element of the variant can be assigned from the regular array.
   This doesn't work, but instead the compiler decays the array to
   a pointer and assigns the bool element to true.

The first issue is addressed by defining copy/move constructors /
assignment operators on Variant and deleting the default ones from
the internal Union type for extra safety.

The second issue is addressed by making a more restrictive version
of the std::is_constructible trait that rejects bool construction
from types that decay to pointers. Once this was put in place the
erroneous use cases no longer compiled and is fixed as part of
this CL.

Tests are updated to verify the fixes to these issues.

Bug: 62557221
Test: pdx_tests and dvr_api-test passes.
Change-Id: Id4647e54e0a7b1753217fe7fe351462fe5bcfd83

7 years agolibdvr: Add performance API to platform library.
Corey Tabaka [Fri, 23 Jun 2017 23:20:07 +0000 (16:20 -0700)]
libdvr: Add performance API to platform library.

- Add dvrPerformanceSetSchedulerPolicy API. Only this API is exposed
  through the DVR platform library, the older API will be deprecated.
- Add permission checks to all performanced APIs.
- Allow services with android.permission.RESTRICTED_VR_ACCESS to change
  scheduler policy for VR apps.
- Minor updates to use the updated PDX service API. The older API will
  be deprecated soon.
- Add tests for permission checks and policy API.

Most of the tests are automatic however, there is one manual step for
testing the android.permission.RESTRICTED_VR_ACCESS (e.g. trusted uid)
check. Because there is no reliable way to determine the UID of VrCore
from the gtest, instead the gtest looks for an env var named
GTEST_TRUSTED_UID; if this is set the value is used as a uid and the
trusted uid tests are enabled.

Bug: 62468109
Test: 'GTEST_TRUSTED_UID=<VrCore UID> performance_service_tests' passes.
Change-Id: I9047b298a015a69535b655a299ca26c179e2d57d

7 years agoDVR API: Implement support for deleting surface attributes.
Corey Tabaka [Thu, 8 Jun 2017 21:29:58 +0000 (14:29 -0700)]
DVR API: Implement support for deleting surface attributes.

- Implement support for deleting surface attributes using the "NONE"
  attribute type.
- Add tests for attribute events and attribute deletion.

Bug: 62456002
Test: dvr_api-test passes.
Change-Id: I66b6edbd35077596d89e85829bcbe7c52829ef5b

7 years agoAdd VrFlinger dumpsys to SurfaceFlinger
Karthik Ravi Shankar [Wed, 28 Jun 2017 22:40:24 +0000 (15:40 -0700)]
Add VrFlinger dumpsys to SurfaceFlinger

When we do dumpsys SurfaceFlinger, we get no information about the
layers/what is composed when the device is in VR mode.

Bug: 63113212
Test:
VrFlinger state:
Application Surfaces:
Surface 0: surface_id=11 process_id=5550 user_id=10104 visible=1
z_order=0 queue_ids=29,37
Surface 1: surface_id=13 process_id=5035 user_id=10130 visible=1
z_order=0 queue_ids=53,65

Direct Surfaces:
Surface 0: surface_id=8 process_id=5563 user_id=10104 visible=1
z_order=0 queue_ids=17

Display metrics:     1440x2880 537.882x537.882 dpi @ 60 Hz
Post thread resumed: 1
Active layers:       1

Layer 0: type=Device surface_id=8 buffer_id=19

Hardware Composer Debug Info:
-------------------------------
HWC2 display_id: 0
layer:   30 z: 0 compositon: Device/Device alpha: 255 format:
RGBA_8888_UBWC dataspace:0x00000000 transform: 0/0/0 buffer_id:
0x70b4877500
color modes supported: 0 7 9 current mode: 7
current transform:
  1.08  -0.02  -0.02   0.00
  -0.07   1.03  -0.07   0.00
  -0.01  -0.01   1.09   0.00
  0.00   0.00   0.00   1.00
-------------------------------

This section doesn't appear when the device is not in VR mode.

Change-Id: I2961a05fc3ea303e070be08de355fb6e56c3d0db
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
7 years agoMerge "Add telephony related dumpsys in the telephony monitor bugreports" into oc...
Jayachandran C [Wed, 28 Jun 2017 19:11:19 +0000 (19:11 +0000)]
Merge "Add telephony related dumpsys in the telephony monitor bugreports" into oc-dr1-dev
am: d16d297825

Change-Id: Id02616a3d6084a18bdf6a3b87868eb1e1f905a9a

7 years agoMerge "Add telephony related dumpsys in the telephony monitor bugreports" into oc...
TreeHugger Robot [Wed, 28 Jun 2017 19:01:17 +0000 (19:01 +0000)]
Merge "Add telephony related dumpsys in the telephony monitor bugreports" into oc-dr1-dev

7 years agolibpdx_uds: Fix uninitialized variable bug.
Corey Tabaka [Mon, 26 Jun 2017 23:51:43 +0000 (16:51 -0700)]
libpdx_uds: Fix uninitialized variable bug.

In this code path epoll_wait() returns 0 when the operation times
out, but there is no condition to catch this and return the
approptiate status. This allows the event value to be used
uninitialized, which returns a junk pending event mask.

This bug results in BufferHub queues sometimes thinking that the
producer side of the buffer hung up, when the junk value happens
to have the EPOLLHUP bit set.

Bug: 62886596
Test: Observe VR app switching stability.
Change-Id: Id9554d6bf224fd27815ff042ac145f59041d0aae