OSDN Git Service

android-x86/frameworks-native.git
8 years agovulkan: update vk_layer_interface.h
Chia-I Wu [Wed, 13 Apr 2016 01:32:24 +0000 (09:32 +0800)]
vulkan: update vk_layer_interface.h

Update to match vk_layer.h in Vulkan-LoaderAndValidationLayers.
Specifically,

 - VK_LAYER_FUNCTION_DEVICE is removed
 - VK_LAYER_FUNCTION_INSTANCE is removed
 - VK_LAYER_FUNCTION_DATA_CALLBACK is added

We do not use VK_LAYER_FUNCTION_DEVICE and VK_LAYER_FUNCTION_INSTANCE
anymore.  They were internal to the desktop loader as well.  Hopefully no
layer ever uses them.

Bug: 28015368
Change-Id: I4f3f91e8224eb943caca4792d74b63aef0b23ad2

8 years agoMerge "vulkan: fix vkGetDeviceProcAddr for intercepted commands" into nyc-dev
Chia-I Wu [Wed, 13 Apr 2016 00:14:07 +0000 (00:14 +0000)]
Merge "vulkan: fix vkGetDeviceProcAddr for intercepted commands" into nyc-dev

8 years agoDrop compatibility with pre 2012 adb clients
Nick Kralevich [Tue, 12 Apr 2016 23:32:33 +0000 (16:32 -0700)]
Drop compatibility with pre 2012 adb clients

On very old versions of adb, when "adb bugreport" was executed,
the command "adb shell dumpstate" was run. This was later changed
to "adb shell bugreport". Change
1e339878c128ef47271278779c2685a8dfa49cd1 added a backwards
compatibility hack (see bug 6391938).

It turns out that nobody has been able to execute
/system/bin/dumpstate as a non-root user for 2 releases now due
to SELinux restrictions, so maintaining the code bloat to support
this workaround is pointless.

Delete the code.

Bug: 6391938
Change-Id: I49eebcca1fcec5a39593c53e2e6d23ec87f65a35

8 years agovulkan: fix vkGetDeviceProcAddr for intercepted commands
Chia-I Wu [Tue, 12 Apr 2016 03:16:17 +0000 (11:16 +0800)]
vulkan: fix vkGetDeviceProcAddr for intercepted commands

This allows vulkan::api::DestroyDevice to properly unreference layers.

Bug: 28077754
Change-Id: I194925d29dee3489b63f4a44669c791d378afa39

8 years agovulkan: fix support for unknown extensions
Chia-I Wu [Tue, 12 Apr 2016 01:40:06 +0000 (09:40 +0800)]
vulkan: fix support for unknown extensions

Never set the bit ProcHook::EXTENSION_UNKNOWN, otherwise std::out_of_range
will be thrown.

Change-Id: I0a1343079647162bf17494acaaa69f1fa26b72f8

8 years agoMerge "libvulkan: Use a stub HAL when no real Vulkan HAL is present" into nyc-dev
Jesse Hall [Tue, 12 Apr 2016 00:36:45 +0000 (00:36 +0000)]
Merge "libvulkan: Use a stub HAL when no real Vulkan HAL is present" into nyc-dev

8 years agolibvulkan: Use a stub HAL when no real Vulkan HAL is present
Jesse Hall [Mon, 11 Apr 2016 20:51:38 +0000 (13:51 -0700)]
libvulkan: Use a stub HAL when no real Vulkan HAL is present

This stub HAL enumerates zero VkPhysicalDevices. This allows a
VkInstane to be created and queried for physical devices successfully
even on devices without a Vulkan driver. Handling this with a stub HAL
avoids the need for NULL HAL and NULL driver function pointer checks
in many places throughout the loader, which would be more error-prone.

Fixes bug: 28100673
Change-Id: I76bea975929a85eda354730d6c815567b412b160

8 years agoMerge "Setting v1-dev4 as default." into nyc-dev
Felipe Leme [Mon, 11 Apr 2016 22:07:45 +0000 (22:07 +0000)]
Merge "Setting v1-dev4 as default." into nyc-dev

8 years agoSetting v1-dev4 as default.
Felipe Leme [Mon, 11 Apr 2016 20:45:18 +0000 (13:45 -0700)]
Setting v1-dev4 as default.

BUG: 27618668
Change-Id: I59c3a7c256c4d059ae3c29411120d3e9c9a5d995

8 years agoMerge changes I33360e15,I2f102fa9,If44c40f8,Ic7bc29ef into nyc-dev
Chia-I Wu [Mon, 11 Apr 2016 20:36:47 +0000 (20:36 +0000)]
Merge changes I33360e15,I2f102fa9,If44c40f8,Ic7bc29ef into nyc-dev

* changes:
  vulkan: use CamelCase() for CreateInfoWrapper
  vulkan: use CamelCase() for LayerChain
  vulkan: use CamelCase() for OverrideExtensionNames
  vulkan: use CamelCase() for OverrideLayerNames

8 years agoMerge "Refactor sensor list in SensorService" into nyc-dev
Peng Xu [Mon, 11 Apr 2016 19:32:42 +0000 (19:32 +0000)]
Merge "Refactor sensor list in SensorService" into nyc-dev

8 years agoRefactor sensor list in SensorService
Peng Xu [Wed, 6 Apr 2016 06:46:03 +0000 (23:46 -0700)]
Refactor sensor list in SensorService

Refactor sensor lists management logic in sensorservice:
  * Factor all sensor list management code into a separate class.
  * Remove error-prone repeated sensor lists.
  * Solve synchronization issue when sensor is added or removed during runtime.
  * Switch to STL containers.

Bug: b/27911774

Change-Id: I94d5571e1fa3166dbe893ffac2a2a7584be6349c

8 years agoMerge "DispSync: Always resync after inactivity" into nyc-dev
Dan Stoza [Mon, 11 Apr 2016 17:43:45 +0000 (17:43 +0000)]
Merge "DispSync: Always resync after inactivity" into nyc-dev

8 years agoMerge "Let's try casting to fix the build." into nyc-dev
Jeff Sharkey [Mon, 11 Apr 2016 06:32:02 +0000 (06:32 +0000)]
Merge "Let's try casting to fix the build." into nyc-dev

8 years agoLet's try casting to fix the build.
Jeff Sharkey [Mon, 11 Apr 2016 06:30:24 +0000 (00:30 -0600)]
Let's try casting to fix the build.

Change-Id: Icd55458caefa27823b770f499a172ca96d1f7a0b

8 years agoMerge "Use inode numbers for CE storage, fix sizes." into nyc-dev
Jeff Sharkey [Mon, 11 Apr 2016 06:12:36 +0000 (06:12 +0000)]
Merge "Use inode numbers for CE storage, fix sizes." into nyc-dev

8 years agovulkan: use CamelCase() for CreateInfoWrapper
Chia-I Wu [Mon, 11 Apr 2016 05:55:56 +0000 (13:55 +0800)]
vulkan: use CamelCase() for CreateInfoWrapper

Change-Id: I33360e15dd0bfb038235d7600587d39d50cea0a8

8 years agovulkan: use CamelCase() for LayerChain
Chia-I Wu [Mon, 11 Apr 2016 05:52:39 +0000 (13:52 +0800)]
vulkan: use CamelCase() for LayerChain

Change-Id: I2f102fa97e3c976fa411b4e6bdc83dacfa243af7

8 years agovulkan: use CamelCase() for OverrideExtensionNames
Chia-I Wu [Mon, 11 Apr 2016 05:47:31 +0000 (13:47 +0800)]
vulkan: use CamelCase() for OverrideExtensionNames

Change-Id: If44c40f87b1e3e2eb69d12543a7f3b3036291c88

8 years agovulkan: use CamelCase() for OverrideLayerNames
Chia-I Wu [Mon, 11 Apr 2016 05:44:13 +0000 (13:44 +0800)]
vulkan: use CamelCase() for OverrideLayerNames

Change-Id: Ic7bc29efc1ae5b734ebfc692c441b9537134ccb2

8 years agoUse inode numbers for CE storage, fix sizes.
Jeff Sharkey [Mon, 11 Apr 2016 02:51:40 +0000 (20:51 -0600)]
Use inode numbers for CE storage, fix sizes.

Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app.  To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together.  So now we only have a single
path to measure for code size.

Start measuring both CE and DE storage data usage for apps, and tweak
the reporting so that empty cache/data directories actually show up
as "0 bytes".

Fix bugs in disk usage counting, since st_blksize has no bearing on
the allocated disk space.  Also don't double-count "." and ".."
directories when measuring storage.

Bug: 2782891527197819
Change-Id: I350b951f5c24165edb253ac663c9aae020c24dc9

8 years agoMerge changes I21f07545,I73c39cbe,I47b1639c,I4a6268d7,I06be9898, ... into nyc-dev
Chia-I Wu [Mon, 11 Apr 2016 02:43:44 +0000 (02:43 +0000)]
Merge changes I21f07545,I73c39cbe,I47b1639c,I4a6268d7,I06be9898, ... into nyc-dev

* changes:
  vulkan: remove unused loader.{cpp.h}
  vulkan: use driver::GetData everywhere
  vulkan: move all _Bottom functions
  vulkan: add swapchain.h
  vulkan: add layers_extensions.h
  vulkan: rework CreateInstance_Bottom and related ones
  vulkan: rework EnumerateDeviceExtensionProperties_Bottom
  vulkan: rework {Create,Destroy}Device_Bottom
  vulkan: move AllocateCommandBuffers_Bottom
  vulkan: move GetDeviceQueue_Bottom
  vulkan: rework DriverDispatchTable
  vulkan: rework driver::Get*ProcAddr
  vulkan: add VK_ANDROID_native_buffer to vulkan.api
  vulkan: move driver::GetDefaultAllocator
  vulkan: move driver::OpenHAL
  vulkan: move driver::Debuggable

8 years agovulkan: remove unused loader.{cpp.h}
Chia-I Wu [Fri, 25 Mar 2016 23:18:53 +0000 (07:18 +0800)]
vulkan: remove unused loader.{cpp.h}

Change-Id: I21f07545cf286f7e5796d9a6c9642cfdd3001f17

8 years agovulkan: use driver::GetData everywhere
Chia-I Wu [Fri, 25 Mar 2016 23:17:34 +0000 (07:17 +0800)]
vulkan: use driver::GetData everywhere

Move away from the one-liners defined in loader.cpp.

Change-Id: I73c39cbe21aa3b2079f67590bb40f0cd55563f84

8 years agovulkan: move all _Bottom functions
Chia-I Wu [Fri, 25 Mar 2016 23:06:44 +0000 (07:06 +0800)]
vulkan: move all _Bottom functions

Move them to vulkan::driver namespace and drop the _Bottom suffix.

Change-Id: I47b1639c4074adb9c0658816f5f1e126df7f685b

8 years agovulkan: add swapchain.h
Chia-I Wu [Fri, 25 Mar 2016 23:01:55 +0000 (07:01 +0800)]
vulkan: add swapchain.h

Move everything belongs to swapchain.cpp out of loader.h to swapchain.h.

Change-Id: I4a6268d703b60e5661b09917eed129d2d227a63c

8 years agovulkan: add layers_extensions.h
Chia-I Wu [Fri, 25 Mar 2016 22:56:45 +0000 (06:56 +0800)]
vulkan: add layers_extensions.h

Move everything for layers_extensions.cpp out of loader.h to
layers_extensions.h, and into vulkan::api namespace.

Remove now unused InstanceExtensionFromName and DeviceExtensionFromName.

Change-Id: I06be98986f40de35e9dffb5499bc1423e9eb3d48

8 years agovulkan: rework CreateInstance_Bottom and related ones
Chia-I Wu [Thu, 24 Mar 2016 08:05:56 +0000 (16:05 +0800)]
vulkan: rework CreateInstance_Bottom and related ones

The reworked driver::CreateInstance will

 - call HAL's EnumerateInstanceExtensionProperties and filter out
   extensions unknown to HAL, if there is any extension enabled.

We do not expect or enumerate any HAL layer yet as that requires some
works to layers_extensions.cpp.

The reworked driver::EnumerateInstanceExtensionProperties instead will
return all extensions enumerated by HAL, after prepending VK_KHR_surface
and VK_KHR_android_surface to them.  This allows extensions unknown to the
loader to be enumerated.

Change-Id: I73b496582a773e06c7b79f0c5c166700737f2953

8 years agovulkan: rework EnumerateDeviceExtensionProperties_Bottom
Chia-I Wu [Thu, 24 Mar 2016 08:16:21 +0000 (16:16 +0800)]
vulkan: rework EnumerateDeviceExtensionProperties_Bottom

The reworked driver::EnumerateDeviceExtensionProperties will simply return
all extensions enumerated by HAL, with VK_ANDROID_native_buffer replaced
by VK_KHR_swapchain.  This allows extensions unknown to the loader to be
enumerated.

Change-Id: Iceed8ee3f16a968d005ae3ba42f1bd1839c2ab9f

8 years agovulkan: rework {Create,Destroy}Device_Bottom
Chia-I Wu [Thu, 24 Mar 2016 08:38:58 +0000 (16:38 +0800)]
vulkan: rework {Create,Destroy}Device_Bottom

The reworked driver::CreateDevice will

 - use the providied pAllocator,
 - call HAL's EnumerateDeviceExtensionProperties and filter out extensions
   unknown to HAL, if there is any extension enabled.

We do not expect or enumerate any HAL layer yet as that requires some
works to layers_extensions.cpp.

Change-Id: I3ba4019d18dfed994d7037d95825bf54096f2a5d

8 years agoMerge "vulkan: check for unsupported extensions" into nyc-dev
Chia-I Wu [Sun, 10 Apr 2016 22:38:53 +0000 (22:38 +0000)]
Merge "vulkan: check for unsupported extensions" into nyc-dev

8 years agoMerge "vulkan: avoid double-free in InitSharedPtr" into nyc-dev
Chia-I Wu [Sun, 10 Apr 2016 22:37:54 +0000 (22:37 +0000)]
Merge "vulkan: avoid double-free in InitSharedPtr" into nyc-dev

8 years agovulkan: avoid double-free in InitSharedPtr
Chia-I Wu [Thu, 7 Apr 2016 07:01:55 +0000 (15:01 +0800)]
vulkan: avoid double-free in InitSharedPtr

When std::shared_ptr fails to allocate its internal data, it deletes the
managed object automatically.  We should not call obj->common.decRef on
std::bad_alloc.

Bug: 28039233
Change-Id: I1fe00c16e83e426602eac96d8b86afb4fd4830e6

8 years agoMerge "media: update VP9 CodecProfileLevel" into nyc-dev
Hangyu Kuang [Sat, 9 Apr 2016 05:11:43 +0000 (05:11 +0000)]
Merge "media: update VP9 CodecProfileLevel" into nyc-dev

8 years agoDeath to synchronous transactions (1/2)
Jorim Jaggi [Fri, 8 Apr 2016 21:35:12 +0000 (14:35 -0700)]
Death to synchronous transactions (1/2)

Bug: 28068298
Change-Id: I0a9a212a4b19793cf2830193152c53c03b651970

8 years agomedia: update VP9 CodecProfileLevel
Hangyu Kuang [Thu, 7 Apr 2016 22:55:41 +0000 (15:55 -0700)]
media: update VP9 CodecProfileLevel

Bug:27969307
Change-Id: I214e0aeb70e1f5a1520eea9ff206c13abd1a3a2a

8 years agoMerge changes I0f07043f,Ib4635ee4,I472ad9f0 into nyc-dev
Dan Stoza [Fri, 8 Apr 2016 23:13:01 +0000 (23:13 +0000)]
Merge changes I0f07043f,Ib4635ee4,I472ad9f0 into nyc-dev

* changes:
  Plumb HDR capabilities up to SurfaceComposerClient
  HWC2: Add getHdrCapabilities to C++ shim
  HWC2: Add getHdrCapabilities stub to adapter

8 years agoPlumb HDR capabilities up to SurfaceComposerClient
Dan Stoza [Thu, 24 Mar 2016 16:31:08 +0000 (09:31 -0700)]
Plumb HDR capabilities up to SurfaceComposerClient

Plumbs HDR capabilities up from HWC2 through SurfaceFlinger and
ISurfaceComposer to SurfaceComposerClient.

Bug: 25684127
Change-Id: I0f07043ff42bfc7a159f785fee3e84936dc3c280

8 years agoHWC2: Add getHdrCapabilities to C++ shim
Dan Stoza [Wed, 16 Mar 2016 19:23:40 +0000 (12:23 -0700)]
HWC2: Add getHdrCapabilities to C++ shim

Adds support for the getHdrCapabilities call to the HWC2 C++ shim.

Bug: 25684127
Change-Id: Ib4635ee437a06b48945e7f0328492c1e74e27aaa

8 years agoMerge "installd: log failed unlinks." into nyc-dev
Narayan Kamath [Fri, 8 Apr 2016 11:47:02 +0000 (11:47 +0000)]
Merge "installd: log failed unlinks." into nyc-dev

8 years agoMerge "batteryservice: Expose Charge Counters." into nyc-dev
Ruchi Kandoi [Fri, 8 Apr 2016 01:09:22 +0000 (01:09 +0000)]
Merge "batteryservice: Expose Charge Counters." into nyc-dev

8 years agoHWC2: Add getHdrCapabilities stub to adapter
Dan Stoza [Wed, 16 Mar 2016 19:33:52 +0000 (12:33 -0700)]
HWC2: Add getHdrCapabilities stub to adapter

Adds a minimal getHdrCapabilities stub to the HWC2On1Adapter, which
always returns 0 supported HDR types (as per the HWC2 spec).

Bug: 25684127
Change-Id: I472ad9f08d1b97d5de69d044790badf3af60da72

8 years agoDispSync: Always resync after inactivity
Dan Stoza [Tue, 5 Apr 2016 23:45:26 +0000 (16:45 -0700)]
DispSync: Always resync after inactivity

Changes DispSync to enable hardware vsync immediately when new frames
arrive after a period of inactivity.

No matter how hard we try, we can't avoid drifting over time without
being able to detect error based on display retire fences. By enabling
hardware vsync immediately, we avoid having a weird period or phase
offset relative to hardware while we retrain the model. Once the model
has locked, we turn hardware vsync back off to save power (until we
detect drift again).

Bug: 26255070
Change-Id: If4dd17c2d541015c730f47d824359d7cb4b52c3c

8 years agoinstalld: log failed unlinks.
Narayan Kamath [Thu, 7 Apr 2016 09:42:41 +0000 (10:42 +0100)]
installd: log failed unlinks.

bug: 28054110
Change-Id: Id46aacba293c81bb3bb6a0b9721b9b4fe11ed652

8 years agovulkan: move AllocateCommandBuffers_Bottom
Chia-I Wu [Thu, 24 Mar 2016 08:29:51 +0000 (16:29 +0800)]
vulkan: move AllocateCommandBuffers_Bottom

Move it from loader.cpp to driver.cpp and rename it to
driver::AllocateCommandBuffers.  No functional change.

Change-Id: I0abdca7dea128df0b313b90cfb5d5825566fc790

8 years agovulkan: move GetDeviceQueue_Bottom
Chia-I Wu [Thu, 24 Mar 2016 08:24:40 +0000 (16:24 +0800)]
vulkan: move GetDeviceQueue_Bottom

Move it from loader.cpp to driver.cpp and rename it to
driver::GetDeviceQueue.  No functional change.

Change-Id: Ide8ebe044e62b8ef6fc64ac03dcc1d920f5bf9a6

8 years agovulkan: rework DriverDispatchTable
Chia-I Wu [Thu, 24 Mar 2016 05:01:16 +0000 (13:01 +0800)]
vulkan: rework DriverDispatchTable

Generate {Instance,Device}DriverTable from code-generator.tmpl to replace
dispatch.tmpl entirely.  The new code avoids initializing
VK_ANDROID_native_buffer entries when the extension is not enabled.  The
separation of instance and device driver tables also allows us to
initialize the device driver table with vkGetDeviceProcAddr, which is
expected to return more efficient function pointers on properly
implemented HALs.

CreateInstance_Bottom always has a potential resource leak when the
HAL-created instance does not contain HWVULKAN_DISPATCH_MAGIC.
CreateDevice_Bottom now has the same issue.  Both of them will be fixed in
following commits.

Change-Id: If7800ef23098121f1fff643a2c5224c2c9be0711

8 years agovulkan: rework driver::Get*ProcAddr
Chia-I Wu [Thu, 24 Mar 2016 01:11:06 +0000 (09:11 +0800)]
vulkan: rework driver::Get*ProcAddr

Introduce driver::ProcHook which is a struct to describe an intercepted
function.  Given a function name, GetProcHook returns a ProcHook if the
function is intercepted.  NULL otherwise.

A ProcHook has three function pointers.  ProcHook::proc points to the real
intercepting function.  ProcHook::disabled_proc points to a no-op function
that logs an error.  ProcHook::checked_proc points to a trampoline that
calls either ProcHook::proc or ProcHook::disabled_proc.

For core functions, driver::Get*ProcAddr simply return ProcHook::proc.
For extension functions, driver::Get*ProcAddr return ProcHook::proc when
the extension is known to be enabled.  They return ProcHook::disabled_proc
when the extension is known to be disabled.  Finally, they return
ProcHook::checked_proc when they do not know if the extension is enabled
or not.

All ProcHooks as well as their disabled_proc/checked_proc are generated in
driver_gen.cpp.  This allows us to get rid of all hand-written "_Disabled"
functions, all no-op "_Bottom" functions, and special cases for
VK_ANDROID_native_buffer.  The reworked driver::Get*ProcAddr also detects
more applications' errors and logs them.

Change-Id: I8e6f476f450688b5547fd75243c66cb603c516b5

8 years agovulkan: add VK_ANDROID_native_buffer to vulkan.api
Chia-I Wu [Mon, 21 Mar 2016 23:38:20 +0000 (07:38 +0800)]
vulkan: add VK_ANDROID_native_buffer to vulkan.api

Change-Id: I5d90918b10264b9d2cf8b73dc7a7c983b6721862

8 years agovulkan: move driver::GetDefaultAllocator
Chia-I Wu [Thu, 24 Mar 2016 07:09:38 +0000 (15:09 +0800)]
vulkan: move driver::GetDefaultAllocator

Move it from loader.cpp to driver.cpp.  No functional change.

Change-Id: I8c9bb5315c29ff69bfd971ac8e1264fb8329a811

8 years agovulkan: move driver::OpenHAL
Chia-I Wu [Thu, 24 Mar 2016 07:01:52 +0000 (15:01 +0800)]
vulkan: move driver::OpenHAL

Move it from loader.cpp to driver.cpp.  HAL loading is now done in
driver.cpp while HAL extension queries are still done in loader.cpp.

Change-Id: I15d7ead98497adacb1bd798522f057ff6bf16909

8 years agovulkan: move driver::Debuggable
Chia-I Wu [Thu, 24 Mar 2016 06:55:27 +0000 (14:55 +0800)]
vulkan: move driver::Debuggable

Move it from loader.cpp to driver.cpp.  No functional change.

Change-Id: I455e798d6001f9719d378ae0295f2b4b181b0c09

8 years agovulkan: check for unsupported extensions
Chia-I Wu [Wed, 6 Apr 2016 06:17:48 +0000 (14:17 +0800)]
vulkan: check for unsupported extensions

Return VK_ERROR_EXTENSION_NOT_PRESENT when an app attempts to enable an
unsupported extension.  This fixes a regression introduced by my top
rewrite (commit 0c20324: vulkan: rewrite top of loader).

Since we do not cache HAL extensions, each vkCreateInstance or
vkCreateDevice call is preceded by two extension enumeration calls
internally.

Change-Id: I5342c1a5c9a5452dd2bc52933a5ee558db174048

8 years agoMerge "Caps Lock toggle with Meta + Alt (1/2)" into nyc-dev
Andrii Kulian [Thu, 7 Apr 2016 01:43:02 +0000 (01:43 +0000)]
Merge "Caps Lock toggle with Meta + Alt (1/2)" into nyc-dev

8 years agobatteryservice: Expose Charge Counters.
Ruchi Kandoi [Thu, 7 Apr 2016 00:53:23 +0000 (17:53 -0700)]
batteryservice: Expose Charge Counters.

Bug: 27174034
Change-Id: Ib45a5258c3a8cbc706d207486310570511a03e6e
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
8 years agoMerge "SF/HWC2: Reorder makeCurrent to avoid deadlock" into nyc-dev
Dan Stoza [Wed, 6 Apr 2016 22:40:21 +0000 (22:40 +0000)]
Merge "SF/HWC2: Reorder makeCurrent to avoid deadlock" into nyc-dev

8 years agoMerge changes from topic 'vkjson' into nyc-dev
Jesse Hall [Wed, 6 Apr 2016 22:01:25 +0000 (22:01 +0000)]
Merge changes from topic 'vkjson' into nyc-dev

* changes:
  GpuService: Add 'help' and 'vkjson' commands
  Add service "gpu" in the SurfaceFlinger process

8 years agoSF/HWC2: Reorder makeCurrent to avoid deadlock
Dan Stoza [Wed, 6 Apr 2016 21:05:37 +0000 (14:05 -0700)]
SF/HWC2: Reorder makeCurrent to avoid deadlock

Now that we are deferring the release of FramebufferSurface buffers
(so that we can return a non-speculative fence), we end up holding
two acquired buffers during the call into HWComposer::commit (whereas
we previously would have only been holding one, with the other having
been released). This means that if the EGL implementation dequeues a
buffer as part of eglMakeCurrent, neither of the FramebufferSurface
buffers will be free, and the call to dequeueBuffer will block.

This change fixes that issue by reordering eglMakeCurrent to occur
after the deferred release.

Bug: 25684127
Change-Id: I6ec55b3f7b7d0e0f5be6029751cb086feeb52fbe

8 years agoMerge "SensorService: Remove unused function" into nyc-dev
Greg Kaiser [Tue, 5 Apr 2016 22:10:38 +0000 (22:10 +0000)]
Merge "SensorService: Remove unused function" into nyc-dev

8 years agoSensorService: Remove unused function
Greg Kaiser [Tue, 5 Apr 2016 18:45:06 +0000 (11:45 -0700)]
SensorService: Remove unused function

We remove the unused getSensorRecord function.  This function
was accessing the mActiveSensors field without obtaining a lock.
We're looking to simplify this code, so we just remove this instead
of trying to fix it.

Change-Id: I8c4ed3cc7ed17d90aa9a5d7f33f9ab9238f9403f

8 years agoMerge "Updating wearable_core_hardware to support device administration." into nyc-dev
Ashley Smith [Tue, 5 Apr 2016 18:33:20 +0000 (18:33 +0000)]
Merge "Updating wearable_core_hardware to support device administration." into nyc-dev

8 years agoClose profile before leaving android::installd::clear_profile.
Roland Levillain [Tue, 5 Apr 2016 15:41:12 +0000 (16:41 +0100)]
Close profile before leaving android::installd::clear_profile.

The profile file descriptor used to be kept open and to
produce SElinux denials when installd ran dex2oat, as that
file descriptor was passed accross security domains.

Bug: 27943553
Change-Id: Ie025082f97c2736156bd5069d7a22aacde86f039

8 years agoMerge "[sensorservice] temporarily remove Autolock mSensorsLock" into nyc-dev
Peng Xu [Mon, 4 Apr 2016 22:12:41 +0000 (22:12 +0000)]
Merge "[sensorservice] temporarily remove Autolock mSensorsLock" into nyc-dev

8 years ago[sensorservice] temporarily remove Autolock mSensorsLock
Peng Xu [Mon, 4 Apr 2016 20:35:24 +0000 (13:35 -0700)]
[sensorservice] temporarily remove Autolock mSensorsLock

Bug: b/27992752

Change-Id: I3d139c988d1a3522b75374423dcda74c5bd510a3

8 years agoMerge "vulkan: rewrite top of loader" into nyc-dev
Chia-I Wu [Mon, 4 Apr 2016 02:21:02 +0000 (02:21 +0000)]
Merge "vulkan: rewrite top of loader" into nyc-dev

8 years agoMerge "dumpstate: acquire /data/misc/logd/ log contents" into nyc-dev
Mark Salyzyn [Fri, 1 Apr 2016 20:39:25 +0000 (20:39 +0000)]
Merge "dumpstate: acquire /data/misc/logd/ log contents" into nyc-dev

8 years agoMerge "Added option to redirect stdout on run_command_always." into nyc-dev
Felipe Leme [Fri, 1 Apr 2016 20:14:44 +0000 (20:14 +0000)]
Merge "Added option to redirect stdout on run_command_always." into nyc-dev

8 years agoAdded option to redirect stdout on run_command_always.
Felipe Leme [Fri, 1 Apr 2016 17:02:00 +0000 (10:02 -0700)]
Added option to redirect stdout on run_command_always.

There are cases where a command should not write to stdout. For example,
when sending the initial broadcast before the header is printed.

This change adds this option to run_command_always, and uses enums to
make it easier to read what's been passed to it.

BUG: 27953643

Change-Id: I9aed0cb0df4112b31d2079241114e206b9d0bb0c

8 years agodumpstate: acquire /data/misc/logd/ log contents
Mark Salyzyn [Fri, 1 Apr 2016 17:03:14 +0000 (10:03 -0700)]
dumpstate: acquire /data/misc/logd/ log contents

Bug: 27965066
Change-Id: I78c7ef4b45179729f505c3fe5d84c33a22ce41bf

8 years agomedia: update Dolby Vision Profile.
Ronghua Wu [Tue, 29 Mar 2016 21:34:56 +0000 (14:34 -0700)]
media: update Dolby Vision Profile.

Bug: 25684127
Change-Id: I2f712078fa6c40087041b078b2a546181b152a64

8 years agoGpuService: Add 'help' and 'vkjson' commands
Jesse Hall [Fri, 1 Apr 2016 02:29:36 +0000 (19:29 -0700)]
GpuService: Add 'help' and 'vkjson' commands

Bug: 26620936 and 27352427
Change-Id: Id0ad5b7184ddc624eddfb292a0d86546c26fb9ea

8 years agoAdd service "gpu" in the SurfaceFlinger process
Jesse Hall [Sun, 27 Mar 2016 05:20:22 +0000 (22:20 -0700)]
Add service "gpu" in the SurfaceFlinger process

This service will handle shell commands for querying information about
the graphics hardware and driver. It currently does nothing.

Most shell command services are provided by ActivityManagerService. I
didn't want to put this there, because I'd rather not load graphics
drivers in the system_service process (robustness, security, etc.).
SurfaceFlinger is going to have them anyway, and is the only other
global always-running process that makes sense for this.

Change-Id: I27e451ea62b71aed01c6ececefd76d6707912eed

8 years agoMerge "Fix a few known issues in SensorService" into nyc-dev
Peng Xu [Fri, 1 Apr 2016 01:54:37 +0000 (01:54 +0000)]
Merge "Fix a few known issues in SensorService" into nyc-dev

8 years agoFix a few known issues in SensorService
Peng Xu [Tue, 29 Mar 2016 00:55:56 +0000 (17:55 -0700)]
Fix a few known issues in SensorService

This CL fixes a few known issues in sensorservice which is related
to newly added dynamic sensor discovery API.

  * check and ensure handle uniqueness for dynamically discovered
    sensor.
  * add mutex for synchronizing r/w of various sensor lists.
  * ensure dynamic sensor list is reported sorted by handle.
  * code format fix

Bug:
b/27911774

Change-Id: Iec6df90ae150321ea9e4309b2ac1200b8dc37f05

8 years agoUpdating wearable_core_hardware to support device administration.
Ashley Smith [Wed, 30 Mar 2016 17:15:49 +0000 (13:15 -0400)]
Updating wearable_core_hardware to support device administration.

Bug: 27409742
Change-Id: Iaf6d6bbf67834079d4f37d7a84310c75588b3a25
(cherry picked from commit 7feabdebd0cfd92dd2f5bc0c258ebd45269a3d9b)

8 years agoMerge "Add build id as part of bugreport name." into nyc-dev
Felipe Leme [Thu, 31 Mar 2016 21:21:06 +0000 (21:21 +0000)]
Merge "Add build id as part of bugreport name." into nyc-dev

8 years agoAdd build id as part of bugreport name.
Felipe Leme [Thu, 31 Mar 2016 20:17:00 +0000 (13:17 -0700)]
Add build id as part of bugreport name.

Rather than bugreport-DATE, the base bugreport name will be
bugreport-BUILD_ID-DATE, which will make it easier to identify
build associated with the report.

Since this change modifies the bugreport format, its version has been
increased to 'v1-dev4' and it is not enabled by default.

BUG: 27618668
Change-Id: I4492f8234520ee27c2eb0e4b8313fc937c498fea

8 years agoDumps systrace to a file.
Felipe Leme [Thu, 31 Mar 2016 01:51:03 +0000 (18:51 -0700)]
Dumps systrace to a file.

The atrace command can take a while, so rather than use a pipe it's
better to write its output to a temporary file and add that file to the
zip, timing out if necessary.

BUG: 27821761
Change-Id: I09f438077d001167d92da3009016bcab815ce530

8 years agoSF: Disable FenceTracker from makefile
Pablo Ceballos [Wed, 30 Mar 2016 22:28:05 +0000 (15:28 -0700)]
SF: Disable FenceTracker from makefile

- Add tracing to the FenceTracker.
- Disable it by default with #ifdefs, it can be enabled in the
  makefile.

Bug 27882222

Change-Id: I640e028c4dc97b46e800a7f21cdb2cb6a4b4ff18

8 years agoMerge "Add an option to write the trace to a file" into nyc-dev
John Reck [Wed, 30 Mar 2016 20:06:42 +0000 (20:06 +0000)]
Merge "Add an option to write the trace to a file" into nyc-dev

8 years agoRevert "Avoid unlinking app image file"
Mathieu Chartier [Wed, 30 Mar 2016 18:03:41 +0000 (11:03 -0700)]
Revert "Avoid unlinking app image file"

Need unlink or the image file can change while being mmaped.

Bug: 27493510

This reverts commit 310c5e70b2e36df36811b6de7ad5c2ebd82338e5.

Change-Id: Ied09848e0b646f946f20f2ed114cac6b438bcda1

8 years agoAdd an option to write the trace to a file
John Reck [Wed, 30 Mar 2016 16:44:36 +0000 (09:44 -0700)]
Add an option to write the trace to a file

Change-Id: I865a3f2c9f6a1fefa664b8215d1e5c94d7d0d0d3
Fixes: 27821761

8 years agoMerge "Destroy the reference profile during uninstalls" into nyc-dev
Calin Juravle [Wed, 30 Mar 2016 12:32:45 +0000 (12:32 +0000)]
Merge "Destroy the reference profile during uninstalls" into nyc-dev

8 years agoMerge "Do not unlink the profiles if not needed" into nyc-dev
Calin Juravle [Wed, 30 Mar 2016 12:31:54 +0000 (12:31 +0000)]
Merge "Do not unlink the profiles if not needed" into nyc-dev

8 years agovulkan: rewrite top of loader
Chia-I Wu [Tue, 15 Mar 2016 05:44:51 +0000 (13:44 +0800)]
vulkan: rewrite top of loader

The top is responsible for layer discovery and chaining, and the bottom is
like a regular layer that is always enabled and is inserted just before
the driver.  Make the separation clear by rewriting the top and stripping
the layer managment code from loader.cpp.

Change-Id: I64e525e27bd4c297bccd94a1eb9b88e28088e85d

8 years agoCall _exit() instead of exit() on child failure.
Felipe Leme [Tue, 29 Mar 2016 20:29:11 +0000 (13:29 -0700)]
Call _exit() instead of exit() on child failure.

As explained on man _exit:

"The  function  _exit()  terminates  the calling process "immediately".
Any open file descriptors belonging to the process are closed;"

If exit() is called instead, the resulting zip file will be corrupted.

BUG: 27900023
BUG: 27804637
Change-Id: I6591749603753d6016f350c629b7082cf6780ae2

8 years agoDestroy the reference profile during uninstalls
Calin Juravle [Tue, 29 Mar 2016 15:05:40 +0000 (16:05 +0100)]
Destroy the reference profile during uninstalls

Bug: 27896463
Change-Id: I6b182e2c3276f6228a2ed70ee2c6f0c49c638760

8 years agoDo not unlink the profiles if not needed
Calin Juravle [Tue, 29 Mar 2016 14:36:34 +0000 (15:36 +0100)]
Do not unlink the profiles if not needed

It's enough to just clear the profiles. The app might still run and we
will see misleading warning or we might miss recording profile
information.

Bug: 27895342
Change-Id: I04961f09e0965a3e4af87acb95a7c74773f7a44a

8 years agoMerge changes I653b84e7,Ieafdc14a into nyc-dev
Rob Carr [Tue, 29 Mar 2016 17:35:38 +0000 (17:35 +0000)]
Merge changes I653b84e7,Ieafdc14a into nyc-dev

* changes:
  Apply position updates immediately.
  Move crop outside of geometry state.

8 years agoMerge "Define typical sensor sample rate in native code" into nyc-dev
Peng Xu [Mon, 28 Mar 2016 22:01:33 +0000 (22:01 +0000)]
Merge "Define typical sensor sample rate in native code" into nyc-dev

8 years agoApply position updates immediately.
Robert Carr [Mon, 28 Mar 2016 02:59:19 +0000 (19:59 -0700)]
Apply position updates immediately.

Restores the behavior prior to moving transform
in to geometry state. Now geometry state and scaling
mode only control parameters which would cause
buffer scaling.

Bug: 27729195
Bug: 27687126

Change-Id: I653b84e74407f2533c92f7647e2609fc043ed0a4

8 years agoMove crop outside of geometry state.
Robert Carr [Fri, 25 Mar 2016 22:08:13 +0000 (15:08 -0700)]
Move crop outside of geometry state.

Prior to this CL, if Layer crop is changed while a
surface resize is pending, the crop will not be
applied until a buffer latches at the new size. This
CL makes the crop apply immediately. We can see this
is the desired behavior by looking at the two cases
where a resize is pending.

1. A resize is pending to make the surface smaller.
  In this case we need to be able to immediately update the crop so that
  we can shrink the visible region of the surface at an interactive rate
  with input. The window manager currently uses big surfaces and scaling
  modes to accomplish this.
2. A resize is pending to make the surface larger.
  In this case it doesn't matter. If we expand the crop immediately to
  the new surface size, then we have simply uncropped an area which is
  by definition transparent pixels (as we haven't latched a buffer
  at the new size yet).

This change has conceptual soundness as well. We can see that the
scaling mode will not affect properties that affect scaling (transform,
width/height) but not properties which do not (crop).

Bug: 27729195
Bug: 27687126
Change-Id: Ieafdc14aeecb23085793e3056a746d6f344781df

8 years agoDefine typical sensor sample rate in native code
Peng Xu [Thu, 17 Mar 2016 01:05:35 +0000 (18:05 -0700)]
Define typical sensor sample rate in native code

Porting typical sensor sample rate (e.g. SENSOR_DELAY_UI)
defined in Java API to native code.

Change-Id: I8b59216415bc952b4e953ca6e8058beb1dd3c645

8 years agoMerge "Rename single buffer mode to shared buffer mode" into nyc-dev
Pablo Ceballos [Mon, 28 Mar 2016 19:34:27 +0000 (19:34 +0000)]
Merge "Rename single buffer mode to shared buffer mode" into nyc-dev

8 years agoMerge "Dumping a trace isn't an error" into nyc-dev
John Reck [Mon, 28 Mar 2016 19:34:16 +0000 (19:34 +0000)]
Merge "Dumping a trace isn't an error" into nyc-dev

8 years agoDumping a trace isn't an error
John Reck [Mon, 28 Mar 2016 18:25:30 +0000 (11:25 -0700)]
Dumping a trace isn't an error

Change-Id: I6180c4f72b45b3d64c44a197e7bda3809a69c8fc

8 years agoIncreased estimated max progress of bugreports.
Felipe Leme [Mon, 28 Mar 2016 18:15:22 +0000 (11:15 -0700)]
Increased estimated max progress of bugreports.

The initial estimate was based on earlier work done before new sections
were added, and it was too slow.

Ideally we should have a per-device estimate, but for N we'll just
increase the common max.

BUG: 26373682
Change-Id: I1a8ce7f09fc6588ac1513a20fa1149aab8c38351

8 years agoDon't report errors when trying to delete a non-existing profile dir
Calin Juravle [Mon, 28 Mar 2016 14:11:01 +0000 (15:11 +0100)]
Don't report errors when trying to delete a non-existing profile dir

Also, put destroy_app_current_profiles behind FLAG_STORAGE_DE flag.

Bug: 27081617
Change-Id: Ib8b9ff292784c659259ceb4339b803e3580da7ed

8 years agodumpstate: Add /data/misc/recovery
Mark Salyzyn [Fri, 25 Mar 2016 19:56:39 +0000 (12:56 -0700)]
dumpstate: Add /data/misc/recovery

(cherry picked from commit 23e86e91ff971a00f62954833a17df2dad1a13af)

Bug: 27176738
Change-Id: Ibc2342c6a29e5aebcac4875d7c2eed48fa8af7de

8 years agoMerge "Remove spurious log" into nyc-dev
Chris Tate [Fri, 25 Mar 2016 21:19:58 +0000 (21:19 +0000)]
Merge "Remove spurious log" into nyc-dev