OSDN Git Service
Mike Stroyan [Mon, 8 May 2017 16:47:24 +0000 (10:47 -0600)]
egl: recover from failed eglMakeCurrent
Some drivers don't actually restore current context when
eglMakeCurrent fails. Restore the current context directly.
Bug:
37244059
Change-Id: I857da78078dd212b523d690415cf525ecd463961
Fixes:
37244059
Test: android.server.cts.ActivityManagerDisplayTests
TreeHugger Robot [Sun, 7 May 2017 16:30:05 +0000 (16:30 +0000)]
Merge "libpdx_uds: Always create channel sockets in the server process" into oc-dev
Martijn Coenen [Sat, 6 May 2017 04:46:45 +0000 (04:46 +0000)]
Merge "Correctly set minimum priority on nodes." into oc-dev
Jeff Sharkey [Sat, 6 May 2017 01:58:07 +0000 (01:58 +0000)]
Merge "Clear cached files on external storage." into oc-dev
Jeff Sharkey [Wed, 3 May 2017 17:36:42 +0000 (11:36 -0600)]
Clear cached files on external storage.
When clearing cached files belonging to an app, include any cached
files on external storage. Since we need to keep sdcardfs in the
loop about any file deletions, we always mutate by going through the
sdcardfs layer instead of behind its back.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug:
37486230,
37566983,
37913442,
37914374
Change-Id: If174bf7eaf682da83cf0ab1b4938fe9a5956d464
TreeHugger Robot [Fri, 5 May 2017 20:37:26 +0000 (20:37 +0000)]
Merge changes from topic 'o-compositor-unification' into oc-dev
* changes:
Remove the VR compositor from the framework.
Remove unnecessary clients and rename files.
Support multiple consumer queues.
Return pdx::Status<T> from BufferHubQueue::Dequeue.
Add support for consumer queue initial import and hangup.
TreeHugger Robot [Fri, 5 May 2017 20:32:30 +0000 (20:32 +0000)]
Merge "Revert "Deprecate producer/consumer usage: Step 3"" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 20:02:52 +0000 (20:02 +0000)]
Merge "Switch touch input device on hover events." into oc-dev
Martijn Coenen [Fri, 5 May 2017 18:16:59 +0000 (11:16 -0700)]
Correctly set minimum priority on nodes.
It looks like libbinder has always set the minimum priority
for a node to 0x7f (127). This is an invalid value as far
as the kernel is concerned, since the current driver only
accepts positive nice values (0..19). The effect of using
0xf7 is that the nice value was clamped to MAX_NICE (19) -
so effectively the kernel never raised the priority
based on the min_priority setting of a node. Correct this
by just using MAX_NICE directly.
Additionally, a recent change removed the use of the
gDisableBackgroundScheduling flag, which system_server
used to make sure that incoming transactions were not
executed at a lower priority. That behavior is actually
still desired, so this change sets the min_priorirty
value to 0 for processes that have requested background
scheduling to be disabled. The effect of that is that
all transactions into those nodes will be executed with
a priority of at least nice 0 (and potentially higher,
depending on the priority of the caller).
Bug:
37677242
Test: verified /d/binder output
Change-Id: I7cbfd309d04cbd052f868fbfe0930529ff21a48a
Corey Tabaka [Fri, 5 May 2017 18:14:54 +0000 (18:14 +0000)]
Revert "Deprecate producer/consumer usage: Step 3"
These changes are effectively handled as part of another, higher priority CL.
This reverts commit
7cab28591d5cdc26913a0882df1b28e3f5393066.
Change-Id: I4cf47eee219870b2758997fe5bd6019d83b82451
Jiwen Cai [Fri, 5 May 2017 16:58:47 +0000 (16:58 +0000)]
Merge "Deprecate producer/consumer usage: Step 3" into oc-dev
Daniel Nicoara [Fri, 5 May 2017 15:20:25 +0000 (15:20 +0000)]
Merge "Revert "Remove vr_wm service"" into oc-dev
Daniel Nicoara [Fri, 5 May 2017 15:08:12 +0000 (15:08 +0000)]
Revert "Remove vr_wm service"
This reverts commit
efd3e0873e24f25e855bb64fae8485fc04690d56.
Reason for revert: IVrWindowManager.aidl is still used in frameworks/base
Change-Id: Id52fb8cf482ea5ab141ebf6b304c12b18a9d8070
Daniel Nicoara [Fri, 5 May 2017 14:56:17 +0000 (14:56 +0000)]
Merge "Remove vr_wm service" into oc-dev
Corey Tabaka [Thu, 20 Apr 2017 23:04:07 +0000 (16:04 -0700)]
Remove the VR compositor from the framework.
Remove the VR compositor framework and enable out-of-process VR composition
in VrCore.
This CL seems large due to the ripple effect of changing the VrFlinger
API and protocol types. There are three major modules that require
concurrent changes:
1. Protocol definitions and low-level VrFlinger API in libdisplay.
* Additional changes needed to keep old interfaces working for
a short time while replacing the dependent code (dvrGraphics*).
2. VrFlinger service implementation changes to support VrCore compositor
and the removal of the internal compositor.
3. Changes to libdvr platform library API due to changes in #1 and #2.
Because of the nature of the interdependence of types and other defs it is
difficult to break this CL into smaller chunks. However, review of the three
major modules (libdisplay, libdvr, and libvrflinger) may be done separately
to ease the mental burden on reviewers.
Change Summary:
- Remove obsolete screenshot service. VR screenshots will be implemented
by VrCore.
- Update display protocol definitions for changes in VrFlinger service
requirements. The majority of the changes in libdisplay are a
consequence of these protocol and service changes.
- Update VrFlinger to support two kinds of surfaces:
1. Application - use by VR apps.
2. Direct - used by VrCore (protected by permission check).
- Remove VrFlinger internal compositor and GL context.
- Remove obsolete debug console.
- Update VrFlinger hardware composer interface to handle direct
surfaces only, removing the concept of GPU (compositor) layers.
- Update display manager to expose access to application surface info
to VrCore (protected by permission check).
- Update libdvr platform library interfaces for changes to VrFlinger
API / protocol.
- Clean up libdvr API struct setup using a common include.
- Add C++ header-only helpers for DVR platform library opaque types.
Bug:
36401174
Test: Build; run VrFlinger display test tool.
Change-Id: I15abfde5f72dbb3725a3f58621486afba6b64902
TreeHugger Robot [Fri, 5 May 2017 00:43:40 +0000 (00:43 +0000)]
Merge "surfaceflinger: make EventThread FIFO" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 00:38:32 +0000 (00:38 +0000)]
Merge "Revert "Set the atrace clock to boot when possible and mono otherwise."" into oc-dev
Corey Tabaka [Thu, 20 Apr 2017 21:42:08 +0000 (14:42 -0700)]
Remove unnecessary clients and rename files.
- Remove clients for obsolete services.
- Rename display protocol defs file to match purpose.
- Rename display manager client file. "impl" does not match naming
conventions used by DVR libraries.
- Remove video mesh surface interface. This will be replaced by more
general surface support in the unified O compositor.
Bug:
36401174
Test: Build; run cube sea.
Change-Id: Idb782623319329f6fa1b0aa45005d9fee3b9957d
Corey Tabaka [Thu, 4 May 2017 17:56:05 +0000 (10:56 -0700)]
Support multiple consumer queues.
- Add support for importing posted buffers when spawing a new
consumer queue.
- Correctly handle adding signaled buffers to epoll with edge
triggered mode set.
- Add test for multi-consumer behavior.
Bug:
36401174
Test: buffer_hub_queue-test passes.
Change-Id: Id09f01502a1b18bf80a0ae465c2941b548cde2e4
Ajay Panicker [Thu, 4 May 2017 22:56:16 +0000 (22:56 +0000)]
Merge "Re-enable the zipping of bluetooth logs" into oc-dev
Corey Tabaka [Tue, 25 Apr 2017 23:47:44 +0000 (16:47 -0700)]
Return pdx::Status<T> from BufferHubQueue::Dequeue.
Switch to using Status<T> to return buffers or meaningful errors
from BufferHubQueue::Dequeue. This enables determining whether an
error is normal (e.g. timeout) or abnormal (e.g. disconnect).
Bug:
36401174
Test: buffer_hub_queue-test passes.
Change-Id: Ifef5f737a5e737b70d19bdbffd7544a993438e1c
Corey Tabaka [Thu, 20 Apr 2017 20:42:02 +0000 (13:42 -0700)]
Add support for consumer queue initial import and hangup.
- Add support for consumer queues to import buffers that are created
before the consumer queue is created, making multi-consumer queue
patterns possible. This is essential for VrFlinger operation.
- Add support for notifying consumer queues when the producer queue
hangs up.
- Correct the epoll event loop to check for hangups even when buffers
are available.
- Add method to retrieve the event fd from a queue.
- Add trace logging and minor cleanup.
- Improve bufferhubd dump state output.
Bug:
36401174
Test: build; bufferhub tests pass.
Change-Id: Idd6f38a3341c048192062734e288d11de48bc4d4
TreeHugger Robot [Thu, 4 May 2017 22:16:53 +0000 (22:16 +0000)]
Merge "Deprecate producer/consumer usage: Step 2" into oc-dev
Carmen Jackson [Thu, 4 May 2017 22:01:33 +0000 (15:01 -0700)]
Revert "Set the atrace clock to boot when possible and mono otherwise."
This change broke CTS tests.
This reverts commit
56a2ba0b0009b6a8db7c385489e5fef4c0d32d0a.
Bug:
37906221
Test: cts-tradefed run singleCommand cts-dev --module
CtsAtraceHostTestCases passes locally.
Change-Id: Ia82732eac33fbde8bddc1e8de7a68c20befe760e
Tim Murray [Thu, 4 May 2017 20:38:49 +0000 (13:38 -0700)]
surfaceflinger: make EventThread FIFO
Jitter in EventThread scheduling was contributing to SystemUI jank.
Test: thread is FIFO
bug
36631902
Change-Id: I930c729b27403ef8941e9a1e0ef8ec57a3d323a0
Kevin Schoedel [Wed, 3 May 2017 17:58:56 +0000 (13:58 -0400)]
Switch touch input device on hover events.
On a phone in a Mirage headset, two touch nubs are in continuous
contact with the screen while in VR. In order to pass virtual
touchpad events to embedded 2D content that is confined to the
physical display (e.g. permission dialogues), allow a hover event
(as generated for the user's controller pointer) to initiate a
new event.
Bug:
36686408
Test: manual on device
Change-Id: I868472721599843b183b2615aac8e6cd87a58e8e
TreeHugger Robot [Thu, 4 May 2017 01:44:30 +0000 (01:44 +0000)]
Merge "Correct sensor handle for operation parameter" into oc-dev
TreeHugger Robot [Wed, 3 May 2017 22:45:11 +0000 (22:45 +0000)]
Merge "Fix lshal --init-vintf may have empty <instance> tags." into oc-dev
Peng Xu [Mon, 1 May 2017 22:09:49 +0000 (15:09 -0700)]
Correct sensor handle for operation parameter
Sensor handle 0 is a valid sensor handle. Use SENSORS_HANDLE_BASE - 1
instead in inject_sensor_data for operation parameter.
Test: sensor cts passes
Bug:
37956047
Change-Id: I138c2e21d74f532526a53a76be857866764a3d53
Alex Vakulenko [Tue, 2 May 2017 00:48:35 +0000 (17:48 -0700)]
libpdx_uds: Always create channel sockets in the server process
Whenever a client connects to PDX service endpoint, the connected
socket was being used as the channel connection. This makes it
difficult to ensure that the socket has the appropriate SELinux
label applied.
Changed the implementation to make sure that the actual channel socket
pair is created in one place in the server process.
The new Endpoint::CreateChannelSocketPair() is now being used to
create the channel sockets when an incoming connection is accepted
and when PushChannel request is received.
The newly created channel socket is sent to the client in response
to connection request.
Bug:
37646189
Test: Device boots. CubeSea launches.
Change-Id: Id3158484aeb18007f18b279afc60613076f80f14
Yifan Hong [Wed, 3 May 2017 20:13:23 +0000 (13:13 -0700)]
Fix lshal --init-vintf may have empty <instance> tags.
Test: on bullhead, lshal --init-vintf | grep "<instance></instance>"
Change-Id: Ic6ab977adcdc5293015e9daba506b625629e5352
Fixes:
37311367
Jiwen 'Steve' Cai [Tue, 2 May 2017 22:43:11 +0000 (15:43 -0700)]
Deprecate producer/consumer usage: Step 3
Remove all remaining client side reference to producer/consumer usage
and update dvr_xxx API.
Bug:
37881101
Test: Build, flash, ran particles.apk and dvr_api-test
Change-Id: I6a60b8f97264f131cd5b9a5de8db0ca178d55097
TreeHugger Robot [Wed, 3 May 2017 17:28:01 +0000 (17:28 +0000)]
Merge "Remove newline from "capturing trace..."" into oc-dev
TreeHugger Robot [Wed, 3 May 2017 17:27:09 +0000 (17:27 +0000)]
Merge "SurfaceFlinger: Select which layer state to visit" into oc-dev
TreeHugger Robot [Wed, 3 May 2017 11:56:22 +0000 (11:56 +0000)]
Merge "Revert "Disable input-vdex when doing speed-profile."" into oc-dev
Nicolas Geoffray [Wed, 3 May 2017 08:04:28 +0000 (08:04 +0000)]
Merge "Update installd to new compiler filters." into oc-dev
Carmen Jackson [Tue, 2 May 2017 23:55:33 +0000 (16:55 -0700)]
Remove newline from "capturing trace..."
Turns out this broke a test.
Bug:
37906221
Test: Compiled
Change-Id: I750a2831114071de2627da08de033cbe7924b51b
Jiwen 'Steve' Cai [Tue, 2 May 2017 18:21:18 +0000 (11:21 -0700)]
Deprecate producer/consumer usage: Step 2
Clean up bufferhub_rpc, display_rpc and service side producer/consumer
usage reference.
Next (final) step is to remove all remaining client side reference to
producer/consumer usage and update dvr_xxx API.
This also fixes a minor typo in dvr_named_buffer-test
Bug:
37881101
Test: Build, flash, ran particles.apk and buffer_hub_queue-test
Change-Id: Ibae4376c1fd1ed964843d8b2ad2fb27204fe5e28
Dan Stoza [Thu, 27 Apr 2017 20:42:17 +0000 (13:42 -0700)]
SurfaceFlinger: Select which layer state to visit
Modifies the traverseIn[Reverse]ZOrder methods to also take an enum
value specifying whether to traverse the current state or the drawing
state.
This has the effect of fixing a bug where we weren't performing
transactions on a child layer because its parent was only visiting its
drawing layers (rather than its current layers) and was thus skipping
the child, which had not yet been moved from current to drawing.
Bug:
36858924
Test: ChildLayerTest.Bug36858924 doesn't hang
Change-Id: I1959f40bc07e77864ba024511d429592a398a67a
Jiwen 'Steve' Cai [Tue, 2 May 2017 05:43:21 +0000 (22:43 -0700)]
Deprecate producer/consumer usage: Step 1
Clean up producer/consumer usage from IonBuffer.
Bug:
37881101
Test: Build, flash, ran particles.apk
Change-Id: I66a8c4db2348b014a7b458b69157ed7c150112e1
Nicolas Geoffray [Mon, 24 Apr 2017 13:34:59 +0000 (13:34 +0000)]
Revert "Disable input-vdex when doing speed-profile."
https://android-review.googlesource.com/#/c/377754/ is fixing vdex and delayout.
bug:
37558732
Test: device boots, vdex works on OTA, input-vdex is passed
for speed-profile
This reverts commit
a2dbefc7a51482acb8d5d139c9e2f01306ef9ceb.
(cherry picked from commit
3c95f2da655567d9fcc28d7a35dcc79d75cb61f6)
Change-Id: I4d36ec79ca681e20ffb181ec099ce5b229e38aed
Nicolas Geoffray [Tue, 25 Apr 2017 11:28:28 +0000 (12:28 +0100)]
Update installd to new compiler filters.
bug:
34715556
Test: build and boot aosp bullhead
(cherry picked from commit
4b64ed991b23dc1215ce10fce69c3e2595dd34b7)
Change-Id: Ib94bda97ed131878c3be092d58920500d2d8d556
Jiwen 'Steve' Cai [Sat, 22 Apr 2017 01:49:53 +0000 (18:49 -0700)]
BufferQueue: plumbing mConsumerIsProtected
This replaces current logic in BufferQueue that uses
GRALLOC_USAGE_PROTECTED to indicate whether an ANativeWindow is capable
of handling hardware protected gralloc buffers. Current logic is
problematic as it enforces producer to use protected buffer no matter
whether producer side is capable of writing into a protected buffer.
This new solution, however, introduces a new NATIVE_WINDOW_* flag that
consumer can set on IGraphicBufferConsumer to indicate its capacity,
which can then be queried by producer via Surface::query (or
IGraphicBufferProducer::query).
When consumer is capable of reading protected buffer (e.g. a protected
GL context), the producer can generate either a protected or unprotected
buffer.
When consumer is not capable of reading protected buffer, the producer
should only generate unprotected buffer.
Bug:
35726763
Test: videoplayer-nodrm-protected.apk and videoplayer-drm-protected.apk
both works.
Change-Id: I1bf6814c9f1f81f9e04f0e89646b0733ff1a4758
Yifan Hong [Mon, 1 May 2017 22:02:15 +0000 (22:02 +0000)]
Merge "Fix lshal not to squash HAL entries incorrectly." into oc-dev
TreeHugger Robot [Mon, 1 May 2017 20:26:21 +0000 (20:26 +0000)]
Merge "Call validateDisplay() when skipping frames" into oc-dev
Yifan Hong [Tue, 18 Apr 2017 21:19:40 +0000 (14:19 -0700)]
Fix lshal not to squash HAL entries incorrectly.
Bug:
37311367
Test: lshal --init-vintf
Change-Id: I693b53f5f342c7600e4031d020792fd347e3ae83
TreeHugger Robot [Fri, 28 Apr 2017 22:39:33 +0000 (22:39 +0000)]
Merge "Set the atrace clock to boot when possible and mono otherwise." into oc-dev
Carmen Jackson [Fri, 28 Apr 2017 17:34:50 +0000 (10:34 -0700)]
Set the atrace clock to boot when possible and mono otherwise.
Bug:
32379831
Test: Inspected the trace_clock while running atrace, without including the .rc file change:
$ adb shell
marlin:/ # cat /d/tracing/trace_clock
[local] global counter uptime perf mono boot
marlin:/ # atrace --async_start freq
capturing trace...
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # atrace --async_stop > /dev/null
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # exit
Test: Inspected the trace_clock while running atrace, after the .rc file change:
$ adb shell
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # atrace --async_start freq
capturing trace...
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
Change-Id: I9ec88df109b311b90c9d88fe3a70f9ce090b4d15
Daniel Nicoara [Thu, 20 Apr 2017 21:42:27 +0000 (17:42 -0400)]
Remove vr_wm service
VR Window Manager has moved to VrCore. Removing deprecated code.
Bug:
36051907
Test: Compiled and verified VR still works.
Change-Id: I892c6cf3ffa16c1891c18a0b3f57b00ca0565fc7
Daniel Nicoara [Fri, 28 Apr 2017 15:15:17 +0000 (15:15 +0000)]
Merge changes from topic 'allow-vrcore' into oc-dev
* changes:
Check for caller permissions in virtual touchpad service
Restrict VR HWC access to services with RESTRICTED_VR_ACCESS permission
Mathias Agopian [Wed, 26 Apr 2017 00:38:08 +0000 (17:38 -0700)]
AHardwareBuffer now reports its stride
Test: compile / manual
Bug:
37686713
Change-Id: I1d75c67816717dc5d8ef4c71c1ca45d1d86aefb3
Mathias Agopian [Thu, 20 Apr 2017 23:35:39 +0000 (16:35 -0700)]
Plumb gralloc producer/consumer bits correctly
Bug:
33350696
Test: compile, boot device, cts
Change-Id: I2f078cf4bbdf0db49f2e914b051f55629fb37eb6
TreeHugger Robot [Thu, 27 Apr 2017 22:51:39 +0000 (22:51 +0000)]
Merge "SurfaceFlinger: Correct extra parent scaling with buffer transforms." into oc-dev
Ajay Panicker [Thu, 27 Apr 2017 21:04:32 +0000 (14:04 -0700)]
Re-enable the zipping of bluetooth logs
Bug:
35998031
Test: Enable snoop logs in developer settings then take a bugreport
Change-Id: Id17c27a659b3e53a0435867ce76fa3de110f1c0c
Robert Carr [Thu, 27 Apr 2017 01:32:15 +0000 (18:32 -0700)]
SurfaceFlinger: Correct extra parent scaling with buffer transforms.
We need to account for the buffer transform when calculating the extra
parent scaling.
Bug:
37673612
Test: Regression test included in Transaction_test
Change-Id: Ice21f1ecf3789358646d95c753ee361f50c0d246
TreeHugger Robot [Thu, 27 Apr 2017 19:37:49 +0000 (19:37 +0000)]
Merge "Fix minor corner cases in BufferHubQueueProducer" into oc-dev
Steven Thomas [Wed, 26 Apr 2017 21:34:01 +0000 (14:34 -0700)]
Call validateDisplay() when skipping frames
Layer management was getting screwed up in vr flinger in the following
scenario:
1. In frame X, post a new buffer to layer L.
2. Decide to skip frame X (e.g. because we're behind our target
schedule).
3. In frame X+1, delete layer L.
When we skip the frame in step 2, we weren't calling validateDisplay()
or presentDisplay() on the hardware composer, so the composer's internal
command queue wasn't being flushed. When we called validateDisplay() for
frame X+1 the update buffer call from frame X would be run, referencing
the deleted layer L, causing a crash.
Now we always call validateDisplay() when we change the layer state,
even if we decide to skip the frame.
I also added code to explicitly clear the Composer object's internal
command buffer when we transfer control from surface flinger to vr
flinger and back. There were certain cases where there could be commands
left in the command buffer after the display handoff.
Bug:
37159844
Test: I used an app switcher script that quickly switches vr apps, which
would consistently trigger the setLayerBuffer crash. I confirmed with
this CL applied I can run the app switcher until surface flinger runs
out of file descriptors (that's a separate bug), and I never see the
setLayerBuffer crash. I also confirmed from the log output there are no
additional hardware composer errors.
Change-Id: I85832b87f393754dc6b034eb38f2937d7b58ed74
TreeHugger Robot [Wed, 26 Apr 2017 21:50:15 +0000 (21:50 +0000)]
Merge "Newly create idmap only when it is outdated" into oc-dev
Peng Xu [Wed, 26 Apr 2017 17:42:33 +0000 (17:42 +0000)]
Merge "Sensor: Limit delay to maximum possible value before sending to HAL" into oc-dev
Jaekyun Seok [Wed, 19 Apr 2017 02:01:38 +0000 (11:01 +0900)]
Newly create idmap only when it is outdated
For now, OverlayManagerService calls Installd.idmap() whenever a user
is changed, and then a idmap is re-generated even though there are no
changes on its target apk and overlay apk.
This CL is to avoid such unnecessary re-generation of idmap. Instead
only a group id will be updated when the idmap isn't outdated.
Test: building succeeded and tested on sailfish.
Bug:
37179531
Change-Id: Id726cbbc621bd64f2a329798b2ab5436f0c28d70
Jiwen 'Steve' Cai [Sat, 15 Apr 2017 00:56:55 +0000 (17:56 -0700)]
Fix minor corner cases in BufferHubQueueProducer
1/ Set reasonable return value BufferHubQueueProducer::query.
2/ Don't error out for setSharedBufferMode(false),
setAutoRefresh(false), as they are just setting default values again.
3/ Supports addition buffer metadata: transformt, crop,
data_format (a.k.a. color_format).
4/ This also changes BufferHubQueueProducer to be based of
BnInterface<IGraphicBufferProducer> so that itself can be passed via Binder.
Bug:
37342387
Bug:
36907193
Test: exoplayer_demo
Change-Id: Ie00bb79f6a249e09905ae52f85a85a67744cc90d
Chia-I Wu [Tue, 25 Apr 2017 22:12:56 +0000 (22:12 +0000)]
Merge "VR: fix libvr_hwc-hal build" into oc-dev
TreeHugger Robot [Tue, 25 Apr 2017 20:49:33 +0000 (20:49 +0000)]
Merge "SurfaceFlinger: Fix destruction of relatively Z-ordered layers." into oc-dev
TreeHugger Robot [Tue, 25 Apr 2017 19:59:47 +0000 (19:59 +0000)]
Merge changes from topic 'atrace-pdx' into oc-dev
* changes:
atrace: Poke PDX services using utility class.
libpdx: Add service poke logic to ServiceUtility.
Robert Carr [Tue, 25 Apr 2017 17:54:24 +0000 (10:54 -0700)]
SurfaceFlinger: Fix destruction of relatively Z-ordered layers.
We need to explicitly remove a layer from it's Z-order relative when
the layer is removed from compositing, and not rely on being the last
reference. In particular, at the time we are generating the list
of visible layers by traversing, any layer which had just been removed
will still be alive (but abandoned) with a ref in the previous list
of visible layers. So we will succeed in promotion, and copy it to the new
list. This way the layer achieves eternal life even after onRemoved is called.
Bug:
36693738
Test: Manual from BR
Change-Id: Ic6c3f64ceb0f603e7c0e51b136c23839858aa639
TreeHugger Robot [Tue, 25 Apr 2017 16:16:25 +0000 (16:16 +0000)]
Merge "Enable access to display/manager socket in surfaceflinger" into oc-dev
Courtney Goeltzenleuchter [Tue, 25 Apr 2017 15:46:44 +0000 (15:46 +0000)]
Merge "Dump EGL Extension list" into oc-dev
Ashutosh Joshi [Tue, 25 Apr 2017 12:10:00 +0000 (12:10 +0000)]
Merge "Clamp reported power for each sensor to 1 microAmp." into oc-dev
Chia-I Wu [Thu, 20 Apr 2017 18:30:57 +0000 (11:30 -0700)]
VR: fix libvr_hwc-hal build
libhwcomposer-client was updated to use
android.hardware.graphics.mapper@2.0.
Bug:
37540361
Test: boots
Change-Id: Id9f94087a04890de95711c91ce9d5aa2f6c8e35d
Chris Forbes [Thu, 20 Apr 2017 00:16:48 +0000 (17:16 -0700)]
vr: Adjust for libui gralloc flags change
Change-Id: I24dbe407ad9139ba1d206b9074c7c507537d198c
Bug: b/
33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
Chris Forbes [Thu, 20 Apr 2017 19:43:28 +0000 (12:43 -0700)]
gui: Adjust for libui gralloc flags change
Change-Id: I9f73a1753f9e991eb3a7f0a005c3ab240f0a38b4
Bug: b/
33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
Chris Forbes [Thu, 20 Apr 2017 19:43:04 +0000 (12:43 -0700)]
nativewindow: Adjust for libui gralloc flags change
Change-Id: I451f045b42d1e3e3bfc35f1e30f27dedc35d4da3
Bug: b/
33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
Chris Forbes [Wed, 19 Apr 2017 21:29:54 +0000 (14:29 -0700)]
ui: Rework GraphicBuffer + Allocator for 64bit usage
Removes gralloc1-style flags, and replaces with HIDL-style single 64bit
usage. Internal storage of the usage is still 32bit; to be addressed
with a future change.
Change-Id: I60062208cbb06bc8cf6c293e7c7e1530c1147912
Bug: b/
33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
Luke Song [Sat, 22 Apr 2017 17:30:55 +0000 (17:30 +0000)]
Merge "Remove/Cleanup Obselete References" into oc-dev
TreeHugger Robot [Sat, 22 Apr 2017 09:00:07 +0000 (09:00 +0000)]
Merge "dumpstate: add graphics composer to hal_interfaces_to_dump" into oc-dev
Chia-I Wu [Thu, 20 Apr 2017 21:31:50 +0000 (14:31 -0700)]
dumpstate: add graphics composer to hal_interfaces_to_dump
Bug:
37152880
Test: adb shell dumpstate
Change-Id: Id9679d0f02350bc4f51b11b250c7703703dbdfe7
Jeff Sharkey [Fri, 21 Apr 2017 20:01:36 +0000 (20:01 +0000)]
Merge "Fix external cache and secondary user bugs." into oc-dev
Mike Stroyan [Fri, 21 Apr 2017 18:59:49 +0000 (18:59 +0000)]
Merge "Defer surfaceflinger composition until data latch" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 18:38:19 +0000 (18:38 +0000)]
Merge "Fix AHardwareBuffer 10:10:10:2 format" into oc-dev
Mike Stroyan [Thu, 20 Apr 2017 18:10:48 +0000 (12:10 -0600)]
Defer surfaceflinger composition until data latch
If layer data is not yet ready, latchBuffer will return an empty region.
SurfaceFlinger::handlePageFlip will now check if any layer has a queued
frame which succeeded in latching data.
If no new frame is latched, handlePageFlip will return false.
That will defer refresh until the next vsync.
That reduces HWC and GPU load, improving framerates.
It prevents dEQP tests from timing out on some devices.
Test: dEQP-VK.wsi.android.incremental_present.scale_down.fifo.reference
Bug:
37439915
Change-Id: Id46c82f79953f3a147af77bb0e8e81a395c606b3
Luke Song [Fri, 24 Mar 2017 21:17:31 +0000 (14:17 -0700)]
Remove/Cleanup Obselete References
Bug:
36039686
Bug:
36040117
Bug:
36039685
Bug:
36040550
Test: Build
Change-Id: Ifd5ae90138e39d0a14c6a5a8198a9145f74ec8f6
(cherry picked from commit
8126b9df8987fd9959eab1ae76620c343c32f4fc)
TreeHugger Robot [Fri, 21 Apr 2017 08:09:37 +0000 (08:09 +0000)]
Merge "Pose flicker fix on some devices" into oc-dev
Aniroop Mathur [Wed, 1 Jun 2016 16:47:05 +0000 (22:17 +0530)]
Sensor: Limit delay to maximum possible value before sending to HAL
Currently, all hals/drivers of different manufacturers/vendors have to add check
to modify delay value to maximum possible value if application requests for
delay greater than maximum possible value. Instead of putting this common check
in all different types of drivers/hals, it is best to put it in framework layer only.
For example:
If a sensor has maximum delay capability of 200 ms and application requests for
delay of 1 second then sensor should run at 200 ms and not 1 second. This is
checked by cts application too like in testAccelerometer_1Hz test case.
Test: compile
Bug:
37543280
Change-Id: Ib921056659ea442ed854b69321d8b2ba0e319302
Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
Daniel Nicoara [Thu, 20 Apr 2017 21:40:48 +0000 (17:40 -0400)]
Check for caller permissions in virtual touchpad service
Bug:
37542947
Test: Compiled and ran on device and verified no permission errors in VR
mode
Change-Id: I8e6198faeeb510792238f6fcce879f6bfb572281
Alex Vakulenko [Thu, 20 Apr 2017 21:25:01 +0000 (14:25 -0700)]
Enable access to display/manager socket in surfaceflinger
DisplayManager interface is needed by VrCore. Currently the entry
point for that service is not accessible outside of `graphics` user
group which VrCore is not part of. We need to allow access to that
socket (and subsequently use selinux to fine-tune access rights
in the future).
Bug:
37486608
Test: `lunch sailfish-eng && m -j32` works and device boots
Change-Id: I1d1b545ba85aa6700b409fbbdacc330b8302049b
Daniel Nicoara [Thu, 20 Apr 2017 20:39:35 +0000 (16:39 -0400)]
Restrict VR HWC access to services with RESTRICTED_VR_ACCESS permission
Bug:
37542947
Test: Compiled
Change-Id: I0880e6a2caaf32f111ae70ba1d54f59960796287
TreeHugger Robot [Thu, 20 Apr 2017 18:56:25 +0000 (18:56 +0000)]
Merge "libui: log an error on allocation failure" into oc-dev
Okan Arikan [Wed, 12 Apr 2017 18:32:21 +0000 (11:32 -0700)]
Pose flicker fix on some devices
The issue was that when the sensord starts on some devices, the initial
IMU sensor fusion pose timestamps are 0 (the first 20-30). It then
starts sending the timestamps. But the latency model looks into the
latency in the initial samples and fixes the latency estimate.
Therefore the estimated latency was way off.
The solution is checking the pose timestamps before using it.
Bug:
37278649
Test: Restart device and run a VR app.
Change-Id: Ic472cb43b32de5d4af3b19547bdc32e906fbfa6a
Corey Tabaka [Sat, 15 Apr 2017 00:52:17 +0000 (17:52 -0700)]
atrace: Poke PDX services using utility class.
Poke PDX services to enable tracing in stand-alone services.
Bug:
37432968
Test: build; run systrace with gfx flag; observe bufferhubd traces.
Change-Id: Id03a82fa51c6ca7c595ecc29c15a742295c53d46
Corey Tabaka [Mon, 17 Apr 2017 21:38:59 +0000 (14:38 -0700)]
libpdx: Add service poke logic to ServiceUtility.
Consolidate PDX service poke logic (reload system props) in the
ServiceUtility class. This used by atrace to poke PDX services
during systrace.
Bug:
37432968
Test: build succeeds.
Change-Id: Ia650f81fd5d324529b70f8796c4efbf7b3117327
Ashutosh Joshi [Thu, 20 Apr 2017 06:27:49 +0000 (23:27 -0700)]
Clamp reported power for each sensor to 1 microAmp.
Avoids sensors reporting zero power !
Bug:
28980713
Test: Ensure thar power reported in greater than or equal to
1 microAmperes for all sensors.
Change-Id: I01b40c8a3701d56ded7dcc82e4c7a85b9a8ddc00
Chia-I Wu [Thu, 20 Apr 2017 05:20:55 +0000 (22:20 -0700)]
libui: log an error on allocation failure
This was on the gralloc0/gralloc1 path, but was missing from the HIDL
gralloc path.
Bug:
37444686
Test: allocate an invalid buffer
Change-Id: If1ea0e27c228d82abbcd6f6290eb8fee423828e7
TreeHugger Robot [Thu, 20 Apr 2017 04:11:17 +0000 (04:11 +0000)]
Merge "libpdx_uds: Serialize access to connection socket between threads" into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 04:08:29 +0000 (04:08 +0000)]
Merge "Fix reference loop in IEventQueue implementation." into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 03:57:16 +0000 (03:57 +0000)]
Merge "libpdx_uds: Allow to create Endpoint/ClientChannel from a socket pair" into oc-dev
Peng Xu [Thu, 20 Apr 2017 02:01:37 +0000 (02:01 +0000)]
Merge "Calculate batching param in a smarter way" into oc-dev
Yifan Hong [Thu, 20 Apr 2017 01:45:30 +0000 (18:45 -0700)]
Fix reference loop in IEventQueue implementation.
EventQueue's destructor is never called because
EventQueueLooperCallback has a strong reference to it,
and EventQueueLooperCallback is never destroyed because
the file descriptor is never removed from the looper.
Bug:
37280081
Test: camera works
Test: event queue is destroyed when client removes
its reference (from logcat)
Change-Id: I12347b6d1cca354288382555d2d9a20acfa59233
TreeHugger Robot [Thu, 20 Apr 2017 01:20:01 +0000 (01:20 +0000)]
Merge "Fix default optics" into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 01:19:47 +0000 (01:19 +0000)]
Merge "Remove the lookup distortion class" into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 00:34:55 +0000 (00:34 +0000)]
Merge "Otapreopt: Fix count" into oc-dev