Commit graph

80041 commits

Author SHA1 Message Date
Ady Abraham
3c17badba9 Merge changes If3b52582,I97a24b74 into rvc-dev
* changes:
  SurfaceFlinger: stabilize heuristic refresh rate calculation
  SurfaceFlinger: define a known frame rates list
2020-06-11 20:36:05 +00:00
Dan Stoza
e4c16cee02 Merge "VSR: Only ignore Composer when rate isn't changing" into rvc-dev 2020-06-11 20:30:18 +00:00
mhasank
16c74562f3 arc: Implement smaller dumpstate output am: d451a47124
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11829060

Change-Id: Ic3da15f36d681bc576c842cdf2de5e68acbd7bdb
2020-06-11 19:53:07 +00:00
Ady Abraham
0ccd79b10b SurfaceFlinger: stabilize heuristic refresh rate calculation
When calculating layer's refresh rate heuristically, also store
a history of the last refresh rate calculated. We use this list to
determine how consistent is the refresh rate. If the refresh rate is
not consistent, then we keep reporting the last consistent refresh rate
and wait for the refresh rate to stabilize again.

Test: Play at 60fps video in XPlayer
Bug: 157540021

Change-Id: If3b525820d298cc5835dddf73f327501c8a18964
2020-06-11 11:17:09 -07:00
mhasank
d451a47124 arc: Implement smaller dumpstate output
Adds a -L commandline option to indicate a much smaller set of
dumpstate output safe for feedback reports.

Implements output of system logcat, event logs, networking, and dropbox
system server crash/system app crashes only.

Bug: 142684959
Bug: 136273873
Test: atest dumpstate_test
Change-Id: I1d564b949d0a44ff9cc014302d79703294a13d78
2020-06-11 08:59:21 -07:00
mhasank
61de9f4648 Revert "arc: Implement smaller dumpstate output" am: e0fbd487f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11829059

Change-Id: I6e49376167a44a8781d1287d561c46092dbe297b
2020-06-11 14:57:44 +00:00
Anthony Stange
5b201d7e65 Requantize by resolution / 8
Requantizing by resolution / 4 causing the calibration error / min on
calibrated sensors to be too high. Changing to 8 reduces that error
enough to keep sensor accuracy below our thresholds.

Bug: 158451802
Test: Verify that calibration error / min is low
Change-Id: I350980734cc0a46f4f06878371e0d9bd7ce07de0
2020-06-11 09:04:32 -04:00
mhasank
e0fbd487f9 Revert "arc: Implement smaller dumpstate output"
This reverts commit f56bbb2bc0.

Bug: 142684959
Bug: 136273873
Test: atest dumpstate_test
Change-Id: I9c5c007c2f630f06225e5e2b6229c1f3473f181f
2020-06-11 05:16:15 -07:00
Alec Mouri
f792cfe81a Only apply early offsets when transaction has been applied
This avoids a race where we decrement the early offset count in
postComposition() before the transaction applying early offsets has
actually been applied, so we're in early offsets for too few frames.

Bug: 158127834
Test: photos launch
Test: systrace

Change-Id: If7a7d12fa466ee4d163210263b7f02f7a74b3280
2020-06-10 19:44:55 -07:00
Hamzeh Zawawy
187bf2c91c Merge "Add a fuzzer for libpdx ServiceDispatcher class." am: 53fc81158a am: b7362ca30e
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1325360

Change-Id: I2a7d32d3a74c63cefdef7839aab85e41043162d5
2020-06-11 02:25:38 +00:00
Hamzeh Zawawy
b7362ca30e Merge "Add a fuzzer for libpdx ServiceDispatcher class." am: 53fc81158a
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1325360

Change-Id: Id090940394774f4d8ddc43676eb0815af09beeee
2020-06-11 02:10:12 +00:00
Hamzeh Zawawy
53fc81158a Merge "Add a fuzzer for libpdx ServiceDispatcher class." 2020-06-11 01:55:18 +00:00
Alec Mouri
0ea63044c7 Merge "Move stats push off of critical path" into rvc-dev am: ce1cb8c69d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11797957

Change-Id: If8088e229bfc29283182837362fe34bb082607f2
2020-06-10 23:12:23 +00:00
Alec Mouri
ce1cb8c69d Merge "Move stats push off of critical path" into rvc-dev 2020-06-10 22:58:33 +00:00
Dan Stoza
09bf763bbd VSR: Only ignore Composer when rate isn't changing
This refines the logic added in
I79c66faeaed262acd9c5925fe2202a9fb3f10b7b, which started ignoring
Composer-provided refresh rates on vsync callbacks when the kernel idle
timer is enabled.

This behavior is still correct when SF doesn't think that that refresh
rate has changed, but when we initiate a change, such as when the only
active layer is infrequently updating, then it's okay to rely on the
Composer-provided rate.

Bug: 158141901
Test: atest libsurfaceflinger_unittest, systrace
Change-Id: I16c87005f5cd1ca1810014211d73b4662e7c8c86
2020-06-10 15:20:50 -07:00
Elliott Hughes
872f2236e4 Merge "bugreport/bugreportz: improve help/errors." am: c066439f1e am: 0ec91b3266
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1329258

Change-Id: I548d7810266109306bf7744aa237dd80d1dcb216
2020-06-10 21:58:30 +00:00
Elliott Hughes
0ec91b3266 Merge "bugreport/bugreportz: improve help/errors." am: c066439f1e
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1329258

Change-Id: I804612cf2e9c0ef2d94f7e7cc133c120726b803a
2020-06-10 21:43:36 +00:00
Elliott Hughes
c066439f1e Merge "bugreport/bugreportz: improve help/errors." 2020-06-10 21:25:57 +00:00
Elliott Hughes
0550c72cc9 bugreport/bugreportz: improve help/errors.
Fix bugreportz to report the usage error rather than ignore extra
arguments. Also fix the synopsis in the usage text to include -p.

Update the bugreport warnings to have the correct way to use bugreportz,
since we now know it doesn't actually take a filename and instead
chooses its own.

Bug: http://b/156667896
Bug: http://b/29448020
Test: adb shell bugreport
Test: adb shell bugreport --help
Test: adb shell bugreportz
Test: adb shell bugreportz file.zip
Change-Id: I10875067cf49a1d9869a4cb7a4051c309eed6b17
2020-06-10 09:51:57 -07:00
Elliott Hughes
40a2807df4 Merge "bugreport: fix warning." am: 734f0a2fa1 am: 1a46ec978a
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1327474

Change-Id: I68ccd9a5c7922836fb4e451b20417463e2db35c9
2020-06-10 15:32:34 +00:00
Elliott Hughes
1a46ec978a Merge "bugreport: fix warning." am: 734f0a2fa1
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1327474

Change-Id: Ibb57ddc1acdb5a4b2816803c0a2bb9af25154e8b
2020-06-10 15:16:40 +00:00
Elliott Hughes
734f0a2fa1 Merge "bugreport: fix warning." 2020-06-10 15:06:34 +00:00
TreeHugger Robot
fb168e15fa Merge "Starts Automotive Display service on boot" into rvc-dev am: 73b522de91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11798059

Change-Id: I474cc381a185e90b6d9667869e445fbbfdf6a534
2020-06-10 05:00:58 +00:00
TreeHugger Robot
73b522de91 Merge "Starts Automotive Display service on boot" into rvc-dev 2020-06-10 04:49:20 +00:00
Ady Abraham
b1b9d41c73 SurfaceFlinger: define a known frame rates list
Keep a list of known frame rates that would be used when we calculated
heuristically the frame rate of a layer. This keeps the signal to the
algorithm that chooses the refresh rate steady and avoid strange
frame rates like 57.2 due to inconsistent presentation timestamps.

Bug: 157540021
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Change-Id: I97a24b74605256646e9b8444bd9f3818fe0a4a2a
2020-06-09 16:59:33 -07:00
Alec Mouri
1b6a60c820 Move stats push off of critical path
Collected a field trace where pushing the atom cost ~500 microseconds,
which is too long.

Bug: 158601958
Test: builds
Change-Id: Id2c67f6fd6a12bb62d4e7b5da382cec78f3ac1c6
2020-06-09 16:03:40 -07:00
TreeHugger Robot
85368a410f Merge "Use fenceTime from drawingState instead of bufferInfo" into rvc-dev am: 6c457787c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11813840

Change-Id: I4e78f69221ddb178c80cde5066e88796b1c4c37c
2020-06-09 22:45:56 +00:00
TreeHugger Robot
6c457787c9 Merge "Use fenceTime from drawingState instead of bufferInfo" into rvc-dev 2020-06-09 22:35:27 +00:00
chaviw
95631e3571 Use fenceTime from drawingState instead of bufferInfo
BufferInfo is updated in latchBuffer after updateTexImage. It would be
difficult to move gatherBufferInfo before updateTexImage since
BufferQueueLayer calls consumer->updateTexImage and relies on
the consumer getting pdated to get the correct buffer information.
BufferStateLayer gets the information directly from mDrawingState.

Instead just use the fenceTime from drawingState in updateTexImage in
BufferStateLayer.

Test: No easy way to see the issue
Fixes: 158457345
Change-Id: If42af7c2f8d550ce73181443a69b0f3073805e1c
2020-06-09 21:37:30 +00:00
Chavi Weingarten
2149d86e40 Merge "Maintain Z order for all layers in offscreen hierarchy" into rvc-dev am: 7e5f235d00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11791944

Change-Id: Ib23ffde848f7abe59a30081a751530f055730c64
2020-06-09 20:44:14 +00:00
Chavi Weingarten
7e5f235d00 Merge "Maintain Z order for all layers in offscreen hierarchy" into rvc-dev 2020-06-09 20:25:36 +00:00
Elliott Hughes
1febe136f1 bugreport: fix warning.
The command the warning wants you to use instead is "bugreportz", not
"bugreport". You're already running bugreport!

...unless you're on the host and you're running `adb bugreport` which
silently uses bugreportz behind the scenes. No wonder humans are
confused!

Also error out if given any arguments, since no arguments are supported.

Bug: http://b/156667896
Bug: http://b/29448020
Test: adb shell bugreport
Test: adb shell bugreport --help
Change-Id: Ia141e89eb5019d52247f57c5095288e96f57dccd
2020-06-09 13:01:12 -07:00
Rob Carr
abab27f7aa Merge "SurfaceFlinger: Send all BufferedLayers to InputFlinger" into rvc-dev am: e0d9770df1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11039839

Change-Id: I41084de651b5e46238be53cd73c3c25ad5d34d23
2020-06-09 16:13:55 +00:00
chaviw
68d4dabdb4 Maintain Z order for all layers in offscreen hierarchy
There was already code in place to ensure that z order was maintained in
the offscreen tree. However, this didn't work if a layer was moved to become
a child of an offscreen layer. The z order was only maintained beneath
the new offscreen layer, not the entire subtree.

This change uses the root of the offscreen subtree to ensure the z order
is maintained even when new offscreen layers are added to the subtree.

Fixes: 157188227
Test: IME gets correct relative z
Test: RelativeZTest.LayerWithRelativeReparentedToOffscreen
Change-Id: I62553ce245dacd2a8684d8bb02de67f60ddc6774
2020-06-09 09:10:36 -07:00
Rob Carr
e0d9770df1 Merge "SurfaceFlinger: Send all BufferedLayers to InputFlinger" into rvc-dev 2020-06-09 16:02:21 +00:00
TreeHugger Robot
fe84511f86 Merge "[SF] Don't crash if HWC returns an unknown config" into rvc-dev am: 9b89dd7a12
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11789968

Change-Id: I29225fb6f871bf2ec52ba7d51b8bfa52e61c9d04
2020-06-09 09:24:33 +00:00
TreeHugger Robot
9b89dd7a12 Merge "[SF] Don't crash if HWC returns an unknown config" into rvc-dev 2020-06-09 09:01:05 +00:00
Marin Shalamanov
533e8e2d53 [SF] Don't crash if HWC returns an unknown config
When we call getActiveConfig() after HWC updates its modes
and before notifying us, we'll get an unknown configuration.
This change fixes a null pointer dereference in this scenario.

Bug: 158481338
Test: m surfaceflinger && flash
Change-Id: Ifa812628d238e4eb7873a163c834abc9f380bb0a
2020-06-09 08:59:28 +00:00
TreeHugger Robot
10f26bb802 Merge "Remove FrameTracer from BLAST code" into rvc-dev am: 225533ea4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11797939

Change-Id: I7f0203889dcca455ccad9bedfe7f30c53dfc5f6e
2020-06-09 05:24:49 +00:00
TreeHugger Robot
225533ea4e Merge "Remove FrameTracer from BLAST code" into rvc-dev 2020-06-09 05:12:51 +00:00
Vishnu Nair
4225e7f1d5 Merge "Call Layer::getLayerDebugInfo from the main thread" into rvc-dev am: 32ca5feb99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11760023

Change-Id: Ia0d1652beeecc5d5c60e65fe9f4241b3f5b7a757
2020-06-08 21:36:10 +00:00
Vishnu Nair
32ca5feb99 Merge "Call Layer::getLayerDebugInfo from the main thread" into rvc-dev 2020-06-08 21:25:08 +00:00
Changyeon Jo
038c27eb32 Starts Automotive Display service on boot
This CL removes 'disable' option from the automotive display service's
rc file to start the service automatically.

Bug: 156293203
Test: Confirmed the service from lshal result
Change-Id: Ie6601ce3a5b956bf6c55be0dc35bbcb23029eda9
2020-06-08 14:13:13 -07:00
Adithya Srinivasan
31c08d927d Remove FrameTracer from BLAST code
Since we are not focussing on BLAST for frame lifecycle, having to
support BLAST's frame lifecycle without proper understanding of the use
cases is going to be hard. This change removes the frame lifecycle code
from BLAST.

Bug: 158493222
Test: atest FrameTracerTest
Change-Id: Icb909fc836d5be214dade4991f582c76e5b2398d
2020-06-08 13:29:26 -07:00
Treehugger Robot
e047760ef5 [automerger skipped] Merge "TouchInputMapper: Use default viewport for PointerController" am: 69f1479abe am: 49990b462a -s ours
am skip reason: Change-Id Id73c59bce825855bc8c829c3a5a18c141593057e with SHA-1 a940fc6f0c is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1319647

Change-Id: I689679bf7cc62853989334097227ce628af9e50b
2020-06-08 17:18:09 +00:00
Treehugger Robot
49990b462a Merge "TouchInputMapper: Use default viewport for PointerController" am: 69f1479abe
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1319647

Change-Id: I378e82dc2c6f1fe8506c7639f5c5244828589ea9
2020-06-08 17:02:28 +00:00
TreeHugger Robot
9d3db1d8ff Merge "[RESTRICT AUTOMERGE]gpuservice: always dump all in BugReport" into rvc-dev am: 607a0c6d5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11784422

Change-Id: I79af1c619fc2d31eda9b48a9454c5abe182f022f
2020-06-08 17:02:16 +00:00
Yiwei Zhang
01a05655c4 [RESTRICT AUTOMERGE]gpuservice: always dump all in BugReport am: 90153a1f6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11784422

Change-Id: I565d68f5d06ff1c0fe936f3135fde6b52e95461a
2020-06-08 17:02:14 +00:00
Treehugger Robot
69f1479abe Merge "TouchInputMapper: Use default viewport for PointerController" 2020-06-08 16:45:50 +00:00
TreeHugger Robot
607a0c6d5a Merge "[RESTRICT AUTOMERGE]gpuservice: always dump all in BugReport" into rvc-dev 2020-06-08 16:33:20 +00:00