summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-15Snap for 8084085 from f8ce875c134b1e6ce08171c2cb4b4f3232a90b08 to sc-d2-releaseandroid-12.1.0_r26android-12.1.0_r25android-12.1.0_r24android-12.1.0_r23android-12.1.0_r18android-12.1.0_r17android-12.1.0_r16android-12.1.0_r15android-12.1.0_r14android-12.1.0_r13android-12.1.0_r12android12L-d2-s8-releaseandroid12L-d2-s7-releaseandroid12L-d2-s6-releaseandroid12L-d2-s5-releaseandroid12L-d2-s4-releaseandroid12L-d2-s3-releaseandroid12L-d2-s2-releaseandroid12L-d2-s1-releaseandroid12L-d2-releaseAndroid Build Coastguard Worker
Change-Id: I73ad5ab65a422187bb60867eebf1d9ef30462e03
2022-01-14Allow gpuservice to read tracefs entriesandroid-vts-12.1_r2android-cts-12.1_r2Kalesh Singh
Gpu service needs tracefs access to attach the BPF program to the gpu_mem_total tracepoint for GPU memory tracking. Bug: 208892266 Bug: 209513178 Bug: 214061655 Test: adb shell dumpsys gpu --gpumem Change-Id: I10fd54544bee940313f3987247c1841101a9d03a Merged-In: I10fd54544bee940313f3987247c1841101a9d03a
2022-01-14Snap for 8076550 from 73e5d94f4b5de774690e0b55cd766f4baae4e121 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Iecfd30879c4cde1220a4a36c8b6d768b6a663da6
2022-01-12[automerger skipped] Skip creating external textures that exceeds size limit ↵Garfield Tan
am: ec7e4d9a5c -s ours am: 9c097670cd -s ours am skip reason: Merged-In I52d253ed5a10f0e4ade372048721913405ed668a with SHA-1 2914a57d75 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16613881 Change-Id: I3976b73eb9ba72294a5a4113264fed51e3c6903d
2022-01-12[automerger skipped] Skip creating external textures that exceeds size limit ↵Garfield Tan
am: ec7e4d9a5c -s ours am skip reason: Merged-In I52d253ed5a10f0e4ade372048721913405ed668a with SHA-1 2914a57d75 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16613881 Change-Id: I9218d997dcf98117b0f241de6dea69be74095f8d
2022-01-12[automerger skipped] Skip creating external textures that exceeds size limit ↵Garfield Tan
am: 2914a57d75 -s ours am skip reason: Merged-In I52d253ed5a10f0e4ade372048721913405ed668a with SHA-1 9c9c191345 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16614247 Change-Id: Ic690dbeb34cbc62c4d38d8348587f13a6fcb7efc
2022-01-12Skip creating external textures that exceeds size limitGarfield Tan
Skia always accept an Android buffer and wraps it around with a texture even if its size exceeds the limit GL exposes. Therefore let's skip creating the texture in SurfaceFlinger and outputs an error log to logcat. I chose to do it in SurfaceFlinger rather than RenderEngine is because the external texture mapping is designed to be asynchronous, so it'd be better to keep that way. The limit is also exposed out of RenderEngine so SurfaceFlinger can check it before creating external textures as well. Bug: 190399306 Bug: 204316511 Test: The test mentioned in the bug fails instead of crashing SurfaceFlinger. Test: atest SurfaceFlinger_test Test: atest libsurfaceflinger_unittest Change-Id: I52d253ed5a10f0e4ade372048721913405ed668a (cherry picked from commit 9c9c19134593655c36fe70aaa45a91ad4f75e36f) Merged-In: I52d253ed5a10f0e4ade372048721913405ed668a
2022-01-12Skip creating external textures that exceeds size limitGarfield Tan
Skia always accept an Android buffer and wraps it around with a texture even if its size exceeds the limit GL exposes. Therefore let's skip creating the texture in SurfaceFlinger and outputs an error log to logcat. I chose to do it in SurfaceFlinger rather than RenderEngine is because the external texture mapping is designed to be asynchronous, so it'd be better to keep that way. The limit is also exposed out of RenderEngine so SurfaceFlinger can check it before creating external textures as well. Bug: 190399306 Bug: 204316511 Test: The test mentioned in the bug fails instead of crashing SurfaceFlinger. Test: atest SurfaceFlinger_test Test: atest libsurfaceflinger_unittest Change-Id: I52d253ed5a10f0e4ade372048721913405ed668a (cherry picked from commit 9c9c19134593655c36fe70aaa45a91ad4f75e36f) Merged-In: I52d253ed5a10f0e4ade372048721913405ed668a
2022-01-12Snap for 8068644 from ee4a87b8617b91e5c3006efa74b4a25377b2a07f to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Iebab58a1aafc304717bf20237479379b768d8f1c
2022-01-11Snap for 8060779 from 6f28d23f07e70a91157880b5c9d9423c388de92d to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ic3abe0f5c5cf60e972ea51fd1feee0943d226c69
2022-01-10Merge "DO NOT MERGE SF: Fix releaseBufferEndpoint merge issue" into sc-v2-devTreeHugger Robot
2022-01-10Merge "Fix KeyCharacterMap overlays by reloading base overlay before ↵Philip Junker
applying another overlay." into sc-v2-dev
2022-01-08Snap for 8055317 from b6f8479039c1462a0f2e041d6376e3e208bbb70f to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: I8d1fd3816b068517538ce517ce6c23ab5e9189ed
2022-01-08DO NOT MERGE SF: Fix releaseBufferEndpoint merge issueVishnu Nair
If a transaction contained a cached buffer, and was parcelled then merged, the releaseBufferEndpoint would not be merged correctly. This would result in SF not releasing a buffer and the app eventually ANRing. DO NOT MERGE because this issue doesn't exist in master Bug: b/205791752 Test: manually rotate apps to trigger sync transactions and check the logs to see we don't release stale buffers. Real tests to follow Change-Id: Ibd295be5e06fea00b331610206f1664f651afed3
2022-01-06keep a wp<BLASTBufferQueue> in BufferItemConsumerAdy Abraham
Use a wp<> instead of raw pointer and remove the mutex around it to prevent potential deadlocks. Bug: 208121127 Test: stress test by partner Test: atest BLASTBufferQueueTest Change-Id: Iffed80410aeffc9b724d5c01ca2ec589c9622990 Merged-In: Iffed80410aeffc9b724d5c01ca2ec589c9622990
2022-01-06Fix KeyCharacterMap overlays by reloading base overlay before applying ↵Philip Junker
another overlay. Add all fields to parcel (mLoadFileName, mLayoutOverlayApplied, mKeysByScanCode, mKeysByUsageCode). Add all fields to equality operator. Add tests to libinput_tests. Bug: 210090260 Test: Manually verified that layout changes correctly. Test: atest libinput_tests Change-Id: I1777b87e5c2ce8a0dbd42ad48748ea9e669c9139 (cherry picked from commit 90bc949048f2b91fa841cb8272381af8c301c055)
2022-01-06Snap for 8045491 from aca25f60537453114bfe7f0f8587e551438ca7a5 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: I6d9970c6e2512864502b29b590365f018b261e0b
2022-01-04DO NOT MERGE: BlastBufferQueue: Fake release if not received by completeRobert Carr
Perfetto telemetry shows a cluster where the transactionComplete callback is arriving but the release buffer callback is not arriving. This leads to blocking and ANRs. We try to work around this by generating a fake release buffer callback for previous buffers when we receive a TransactionCompleteCallback. How can we know this is safe? The criteria to safely release buffers are as follows: Condition 1. SurfaceFlinger does not plan to use the buffer Condition 2. Have the acquire fence (or a later signalling fence)if dropped, have the HWC release fence if presented. Now lets break down cases where the transaction complete callback arrives before the release buffer callback. All release buffer callbacks fall in to two categories: Category 1. In band with the complete callback. In which case the client library in SurfaceComposerClient always sends release callbacks first. Category 2. Out of band, e.g. from setBuffer or merge when dropping buffers In category 2 there are two scenarios: Scenario 1: Release callback was never going to arrive (bug) Scenario 2. Release callback descheduled, e.g. a. Transaction is filled with buffer and held in VRI/WM/SysUI b. A second transaction with buffer is merged in, the release buffer callback is emitted but not scheduled (async binder) c. The merged transaction is applied d. SurfaceFlinger processes a frame and emits the transaction complete callback e. The transaction complete callback is scheduled before the release callback is ever scheduled (since the 1 way binders are from different processes). In both scenarios, we can satisfy Conditions 1 and 2, because the HWC present fence is a later signalling fence than the acquire fence which the out of band callback will pass. While we may block extra on this fence. We will be safe by condition 2. Receiving the transaction complete callback should indicate condition 1 is satisfied. In category 1 there should only be a single scenario, the release buffer callback for frame N-1 is emitted immediately before the transaction callback for frame N, and so if it hasn't come at that time (and isn't out of band/scheduled e.g. category 2) then it will never come. We can further break this down in to two scenarios: 1. stat.previousReleaseFence is set correctly. This is the expected case. In this case, this is the same fence we would receive from the release buffer callback, and so we can satisfy condition 1 and 2 and safely release. 2. stat.previousReleaseFence is not set correctly. There is no known reason for this to happen, but there is also no known reason why we would receive a complete callback without the corresponding release, and so we have to explore the option as a potential risk/behavior change from the change. Hypothetically in category 1 case 2 we could experience some tearing. In category 1 we are currently experiencing ANR, and so the tradeoff is a risk of tearing vs a certainty of ANR. To tear the following would have to happen: 1. Enter the case where we previously ANRed 2. Enter the subcase where the release fence is not set correctly 3. Be scheduled very fast on the client side, in practicality HWC present has already returned and the fence should be firing very soon 4. The previous frame not be GL comp, in which case we were already done with the buffer and don't need the fence anyway. Conditions 2 and 3 should already make the occurence of tearing much lower than the occurence of ANRs. Furthermore 100% of observed ANRs were during GL comp (rotation animation) and so the telemetry indicates the risk of introducing tearing is very low. To review, we have shown that we can break down the side effects from the change in to two buckets (category 1, and category 2). In category 2, the possible negative side effect is to use too late of a fence. However this is still safe, and should be exceedingly rare. In category 1 we have shown that there are two scenarios, and in one of these scenarios we can experience tearing. We have furthermore argued that the risk of tearing should be exceedingly low even in this scenario, while the risk of ANR in this scenario was nearly 100%. This issue is not appearing in git_master branches and so the DO_NOT_MERGE tag. Bug: 197269223 Bug: 212846697 Test: Existing tests pass Change-Id: I757ed132ac076aa811df816e04a68f57b38e47e7
2021-12-17Snap for 8010657 from 22b6d239c14a65af4b60d15ade8517e768c5f2b3 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ib507ff6c0fa258551655b10bea92f1f631e0807d
2021-12-14BBQ: Capture initial destframe change from BBQVishnu Nair
Allow the caller to pass in a transaction that can capture the initial destination frame changes. This allows the caller to apply other destination frame changes via BBQ#update in order. Bug: 195443440 Test: atest BLASTBufferQueueTest Test: repro steps from bug Change-Id: Ibf53a0efdebb87291d081e48633c373a98d347b1 Merged-In: Ibf53a0efdebb87291d081e48633c373a98d347b1
2021-12-08Snap for 7977275 from 40fbb638197f089ea4ba6a51eca1ec3124156d34 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ib8dc43483689bf39d6943c24b828d58496462292
2021-12-06Manually calculate stats for app owning external storageShikha Malhotra
The stats are calculated using quota APIs for all the apps. This is going wrong for the app owning external storage, as it includes the external storage files also. The reason for that is the uid for the external storage files and the app owning the external storage is the same. Calculating the size manually avoids the problem. Bug: 195804288 Test: atest StorageHostTest Test: atest installd_service_test.cpp Change-Id: I183c6997375b94dc02562bede03e3a15036efb6e Ignore-AOSP-First: already submitted in AOSP Merged-In: I183c6997375b94dc02562bede03e3a15036efb6e
2021-12-02Snap for 7960322 from e9323b30ab14bad2a06a5cc67c326462cd11856b to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Id192ab72e95b7c80a6461039e0e2189c97ab83bb
2021-12-01BLASTBufferQueue: Cap shadow queue size during syncRobert Carr
While waiting for the transaction commit callback on a previous sync transaction BLASTBufferQueue will halt buffer processing to ensure later frames do not arrive at SurfaceFlinger first. These buffers wait in the shadow queue (tracked by mNumFrameAvailable) to be acquired later. If we end up in a situation where all the buffers are either in a sync transaction or in the shadow queue then dequeue buffer will begin to block. This isn't ideal, as dequeue buffer blocking can cause UI thread to block, aka UI thread can block on RenderThread. However completing the sync transaction (from a previous frame) can also depend on UI thread, aka RenderThread can now block on UI thread (since we need the transaction to apply in order to thaw the shadow queue). In this CL we try and avoid that situation by only keeping 1 frame in the shadow queue while waiting for the sync to complete. If a second frame comes in we will acquire and release the first before acquiring the second. Bug: 200285149 Change-Id: I5072765e7b94820b3e66c557f5a96172ccef8172 Merged-In: I5072765e7b94820b3e66c557f5a96172ccef8172
2021-12-01Snap for 7956453 from c54964d30cfac4c14c16477e8fea84783c24b55d to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: I7ddc9a619852932eba84c6c30cc58229beab174e
2021-11-30Merge "Allow touch split enabled when no window touched" into sc-v2-devArthur Hung
2021-11-30Merge "Let touch region empty if the input bounds is empty" into sc-v2-devArthur Hung
2021-11-30Snap for 7952937 from f2cf7639a80206c43c83cf6076998b45f4feb24b to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: I34ba5cf8e5ee4b9ed80ea6f992f23135ab45b242
2021-11-29Merge "SF: Fix duplicate callbacks from mirrored layers" into sc-v2-devVishnu Nair
2021-11-29Merge "Added getLastAcquiredFrameNum" into sc-v2-devRob Carr
2021-11-29SF: Fix duplicate callbacks from mirrored layersVishnu Nair
When cloning layers, we would also clone the layer's callback handles which resulted in SF emitting duplicate callbacks. Test: presubmit Test: launcher does not ANR when switching wallpapers with screen recording enabled Bug: 205922358 Change-Id: Ic0435164f27d9bca7f80fc57d9021a9f544c936f
2021-11-26Allow touch split enabled when no window touchedArthur Hung
If no window can be touched by first touch down, it would still deliver the event to the gesture monitor. So before gesture monitor pilfer the touch, if a new window supports split touch, it can't recevied the new point down event cause device looks unresponsive. Test: atest inputflinger_test Bug: 201647070 Change-Id: Ib0734ef7082bf673afb11eef9ec7bdb0b3f103ec (cherry picked from commit fbfa572245e430392f779edbb01b3b18e1b2ed82) Merged-In: Ib0734ef7082bf673afb11eef9ec7bdb0b3f103ec
2021-11-25Snap for 7944517 from 3316c9775acab304c5f790b6fa48a576563b7bcc to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: I7496103fea007da5b4ebcc0836dc6f66b31ee5d3
2021-11-24Added getLastAcquiredFrameNumchaviw
This will allow VRI to ask BBQ what buffer was actually acquired on the last draw. Test: blast sync Bug: 195262673 Bug: 193634619 Change-Id: I492651e8e6d333ef11b682cec939d81057ae197d Merged-In: I492651e8e6d333ef11b682cec939d81057ae197d
2021-11-23Merge "Only add commit callback when using sync transaction" into sc-v2-devChavi Weingarten
2021-11-23Only add commit callback when using sync transactionchaviw
There's no need to add a commit callback when we're not syncing since the callback won't actually do anything. Instead only add a commit callback when a sync transaction has been requested. Test: BLASTBufferQueueTest Bug: 205278630 Change-Id: Ib7345f2581b6e4ce8923531aebcd457c14d86027 Merged-In: Ib7345f2581b6e4ce8923531aebcd457c14d86027
2021-11-22Let touch region empty if the input bounds is emptyArthur Hung
If the input bounds is empty, we should let the touch region empty so it could prevent receiving touch without valid bounds. Bug: 204747595 Test: atest InputSurfacesTest Change-Id: Iee59c437a084ca9db6936af7a4852190169518d9
2021-11-20Snap for 7932843 from 11595687cb64ef66b390deaf9aca9f891423afd5 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ie9004493de933412c1a2185c815dade3add3a07a
2021-11-18Merge "Merge color property in a transaction" into sc-v2-devChavi Weingarten
2021-11-18Merge color property in a transactionchaviw
The LayerState.merge code didn't have colors getting merged Test: Builds Fixes: 206341593 Change-Id: Ic2721242c772099802f635f8019cb3b7a24d6c90
2021-11-17Snap for 7921329 from 2731fe5378813950162c69d91ae865d8e54f1cdb to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ia08d038b8cb9b6df85754543ecdcae2671cb0e0e
2021-11-16Merge "SF: reset idle state when RefreshRateConfigs changes" into sc-v2-devTreeHugger Robot
2021-11-15SF: reset idle state when RefreshRateConfigs changesAdy Abraham
RefreshRateConfigs calls back into Scheduler for updating the idle timer. When RefreshRateConfigs changes as a result of the active display changed, we need to stop the idle timer on the old RefreshRateConfigs and reset Scheduler's state. Bug: 205664808 Test: manual using below steps 1. Boot device on unfold state 2. Fold device 3. Unfold device 4. Launch Chrome from taskbar Change-Id: I554fe2b2447c0ad662f06329ff74e0b9b3e999b3
2021-11-15Reconnect to all hidl sensors HALsArthur Ishiguro
Fixes: 206162862 Test: Restart sensors HAL and verify resume Change-Id: Iba93246a30565783a0634a9a0cd966a7ccf841d3
2021-11-13Snap for 7911557 from ec44a3c41ba2555ca1ca80c672a22361ce72a967 to sc-d2-releaseAndroid Build Coastguard Worker
Change-Id: Ie620b86cac9ff3e77a46143e4eb15e71a1013dde
2021-11-11[automerger skipped] Check if the window is partially obscured for slippery ↵Siarhei Vishniakou
enters am: 6e689ffe3f am: 224d576c0b am: e26b6061f8 -s ours am: eb59e4756d -s ours am: 1140211821 -s ours am: 26cd8a07cf -s ours am: 41a8b01966 -s ours am skip reason: Merged-In I93d9681479f41244ffed4b1f88cceb69be71adf2 with SHA-1 d8c6ef2138 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16185286 Change-Id: Id48d349bc696cc7fcfd9441f168ad2eacea6a081
2021-11-11[automerger skipped] Merge "Check if the window is partially obscured for ↵TreeHugger Robot
slippery enters" into rvc-dev am: b27497c4bf am: 58c22be797 -s ours am: fe2d5a037e -s ours am: 85ed00c88a -s ours am skip reason: Merged-In I93d9681479f41244ffed4b1f88cceb69be71adf2 with SHA-1 6e689ffe3f is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16194632 Change-Id: I48356a61dd15c9c57a7b4288b59275d08947b634
2021-11-11[automerger skipped] Merge changes from topic "trusted_overlay_backport" ↵Winson Chung
into rvc-dev am: 294e7b87e3 am: 90b88a978e -s ours am: cb15467837 -s ours am: dae1a991ec -s ours am skip reason: Merged-In I75be2b1d305e22f8a71532b9f5b8ea6c469baaaa with SHA-1 41f48c7b10 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/16224510 Change-Id: I8fbf490d4aa9c0091a4b9755e3d4f8470bbabe06
2021-11-11[automerger skipped] DO NOT MERGE Initialize DrawingState::trustedOverlay to ↵Robin Lee
false in constructor am: 41f48c7b10 am: 8c3de17e5d -s ours am: 03179cb3c9 -s ours am: 9761aa718c -s ours am skip reason: subject contains skip directive Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15975349 Change-Id: Iaffe2cf1b931b6ba4cfd04218dce179b822ab349
2021-11-11[automerger skipped] Add mechanism for a task's windows to be trusted ↵Winson Chung
overlays (SF) am: 7605fb4273 am: cac2aa7517 -s ours am: 10b892cda2 -s ours am: d3962fdc82 -s ours am skip reason: Merged-In Id92ccb087bd0d8dbaeeef3ba50b67fe015e53db8 with SHA-1 7605fb4273 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15975348 Change-Id: I45c767eb9cce3b9f94fb88a7b48c231e3a501a20