- Jan 13, 2023
-
-
While enabling #define LOG_NDEBUG 0, run camera cts test command: run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.MultiViewTest#testSharedSurfaceImageReaderSwitch the libgui will crash due to nullptr, fix this by add nullptr judgement when pointing to the Graphicbuffer handle Bug: 228349805 Signed-off-by:
tangcheng <tangcheng@xiaomi.com> Change-Id: I69a84bdb5208b16df88f5f09f45c1a93ad2afe01 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
With the previous commit entering idle aggressively, it is important that touch boost works well. Since there are valid cases where we would want touch boost to work when there are no layers detected (e.g., notification panel pull down if it was not accounted for during the initial vote type set), change touch boost to work regardless of layer's status. Change-Id: I0a125cf9027440de205fa4ca611657b70b8a088f Signed-off-by:
Juhyung Park <qkrwngud825@gmail.com> Signed-off-by:
Adithya R <gh0strider.2k18.reborn@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
There are now global sanitizers that will be applied to all modules, so we no longer need to decalre local sanitizer options. One of the local sanitizer options caused a ubsan shift-out-of-bounds SIGABRT in several location modules in code that does not appear to have anything problematic with it. Test: Build with SDClang 12 and look out for FATAL errors. Change-Id: I6beb96c8d8547639092ba0d2e8b29387105544bd Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Taken from CLO (QSSI 13). Some Qualcomm devices can still benefit from disabling backpressure propagation by setting: debug.sf.disable_backpressure=1 Change-Id: I2346a1b314666706e1299b295f13b2cef6e00b4d Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Most of the HWC backends don't consume HAL_DATASPACE_ARBITRARY, and will end up with client composition. This change fixes the Surface to clear the prior requested dataspace leftover upon disconnect, and let vulkan swapchain to skip setting dataspace upon PASS_THROUGH. Bug: 239893387 Bug: b/234703161 Test: android.view.cts.DisplayRefreshRateTest#testRefreshRate with angle Test: android.media.cts.EncodeDecodeTest with angle Test: dEQP-EGL.* with angle Test: dEQP-VK.wsi.android.* Change-Id: Iba1d9160569ad6136127cf8055aa75f195fed3d9 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
... to continue aosp/2157379 to pass dEQP tests with ANGLE using PASS_THROUGH color space as the default. Bug: 237512291 Bug: b/234703161 Test: cts -m CtsDeqpTestCases --module-arg CtsDeqpTestCases:include-filter:dEQP-EGL.* Change-Id: I7753858bf5d740f5083e0e48d97be75b127ad11b Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This CL allows us to specify the pass through color space, and as a consequence, HAL_DATASPACE_ARBITRARY, on swapchain creation. This helps us pass Media encode/decode test cases on ANGLE. Bug: 237512291 Bug: b/234703161 Change-Id: I7aebe80d77fdc454f04489fbc552bad40a922ae3 Merged-In: I7aebe80d77fdc454f04489fbc552bad40a922ae3 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
When usage bits were 32-bits, and the bit 31 is 1, will meet the below error: E Gralloc4: buffer descriptor contains invalid usage bits 0xffff00000000 E GraphicBufferMapper: validateBufferSize(0xb400007adcd71320) failed: 1 android_native_buffer_t define usage_deprecated as int. For example usage_deprecated is 0x80000000, uint64_t(0x80000000) will cast to 0xffffffff80000000, which leads to validateBufferDescriptorInfo fail. Add ANDROID_NATIVE_UNSIGNED_CAST(usage_deprecated) to fix this. Test: CtsMediaRecorderTestCases android.media.recorder.cts.MediaRecorderTest#testProfileAvcBaselineLevel1 Bug: b/244620240 Signed-off-by:
Jessie Hao <juan.hao@nxp.com> Change-Id: I131b9dee3b2b768729218d8f7cabe0026ab89007 (cherry picked from commit 5480b212) Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
If the MotionEvent has too many PointerCoords, it will lead to an infinite loop and cannot complete the operator<<. Bug:244248855 Test: printed MotionEvent in log to see the formatting Signed-off-by:
hupeng3 <hp121520@gmail.com> Change-Id: Id4a01152bc4103976d3f60e69eb375e3d32669a0 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
SELinux makes sure only system services can call installd. Bug: 244657173 Fixes: 244657173 Test: presubmit Test: adb bugreport, check that it has installd section Change-Id: I27a77a12b025cfb27e774c2334e08facdcb4c77e Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Test: N/A Change-Id: I33c8d35601e56cab1d12db663957795bf15a0a02 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
When the parent of a layer changes, shadowRadius should not be directly passed in the computBounds here. When the layer's parent changes, for example, open an app in freeform. If the app exits the current ActivityRecord, it will trigger the recent task request screen capture of the current app, temporarily switch the task of the app to "Screenshot Parent", and then switch back. This operation will cause the shadow of the task to be passed to the children layers through CanDrawShadows, i.e., the shadow of non Container layer is wrongly passed to its children layers. Therefore, there is a problem in shadow drawing. We should judge whether shadowRadius needs to be passed at this time through CanDrawShadows. If not, pass 0.f. Otherwise, the shadow will be painted repeatedly. bug:215476160 in partnerissuetracker Signed-off-by:
xinying1 <xinying1@xiaomi.corp-partner.google.com> Change-Id: Id4b6c8bcc79aa68f96d0c4c655ea853361ed1e7c Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
You can't use binder after forking, so we can drop the FD. The binder driver doesn't support this (once the FD is open, we would need to open a new context in the child process). So, the userspace API would need to handle resetting all state. However, in general, handling this for multi-threaded processes (because of needing to take all locks by all libraries used by all threads and restoring state, etc...) is too complicated to make work in Android. Bug: 232904068 Bug: 244525876 Test: binderLibTest Change-Id: I38c354af2c69804a40dc2774086a9ab77d158ede (cherry picked from commit df732baf) Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
[Optimization] It's no need to start the dispatch cycle going if the outbound queue was not previously empty. If the outbound queue was not previpusly empty, it indicates that the connection's pipe is full.We will try start the next dispatch cycle for this connection in "doDispatchCycleFinishedCommand". This follows "enqueueDispatchEntriesLocked". Change-Id: I7736c2bfdb13c35a51b74c46ada7b0f562fecfd9 Merged-In: I7736c2bfdb13c35a51b74c46ada7b0f562fecfd9 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This conditionally reverts a commit [1] which causes random camera crashes on tama devices [1] https://github.com/LineageOS/android_frameworks_native/commit/a9550f3fe9097e0934e9b44c5aac6b914fb46aec Change-Id: If3d9c722c63a9da2f9ca10e21de9d7bc6dba7c52 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Author: Bruno Martins <bgcngm@gmail.com> Date: Wed Oct 14 23:45:14 2020 +0100 Edit: Adapt to new lineage soong config Change-Id: Ic0f314f4053628667a921951f610839f36a5079c Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Change-Id: Iecd2be3eb8775855d82763f069a38bb70fe53d4e CRs-Fixed: 3229968 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Currently, the properties are used as follows: 1. debug.sf.enable_hwc_vds - allows IDs to be generated for VDs 2. vendor.display.vds_allow_hwc - allows WFD to use HWC path With this change, HWC path is enabled for WFD with only the vendor property set. All other virtual displays require both of the properties enabled. Change-Id: Iab2c8d15d2c1cf24be0d371af8892c346634507f CRs-Fixed: 3204941 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
* These changes are part of CAF AOSP merge commits Change-Id: I390f874347d259fca4429c19711be6c85b104090 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Allow HWC based virtual display only for wifi display CRs-Fixed: 2984439 Change-Id: Ifbb094a2a0101171b475bd5a60660a3599dce5ff Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Bug: 169788930 Change-Id: Ic50f5675d0cd48f84fb9ff14221355741dc52129 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
1. SurfaceFlinger: Fix virtual display related issues. 1) Validate output buffer usage bit appropriately Validate output buffer usage bit only against GRALLOC_USAGE_HW_COMPOSER to differentiate GLES only conposition and HWC/MIXED composition. 2) Exclude video encoder usage for scratch buffer Sink and Scratch buffers in VDS are using same usage flags. This causes video encoder flag to be set for scratch buffers Also. Exclude video encoder flag from scratch buffer usage flags as scratch buffers are used only as write back input and not video encoder input. 2. sf: Allow VDS to use HWC -- Preserve VDS layer pixel format based on GRALLOC flags. -- skip color layer for vds 3. sf: Add secure content support for VDS 4. sf: Enable GPU comp. for non-primary displays Ensure that "Return status" of dequeueBuffer() complies with API requirements. Client relies on this status to call requestBuffer() upon reallocation. 5. sf: Enable UBWC on virtual display scratch buffer Set GRALLOC_USAGE_HW_FB usage flag on virtual display Scratch buffer to enable UBWC. Change-Id: Ia49a175372ca187a295531e18f8e84dc22a19486 CRs-Fixed: 2656027 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Jan 10, 2023
-
-
Simão Gomes Viana authored
-
Simão Gomes Viana authored
-
Simão Gomes Viana authored
-
- Jan 07, 2023
-
-
Layer dataspace is initialized as unknown by default, unless overriden by the buffer source. We don't require expensive rendering for color conversion when the dataspace is unknown. Change-Id: I079c520f63a65c77ba3162664656e607eafff991 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Jan 01, 2023
-
-
Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
In streaming video case, video decoder needs to change buffer color space dynamically according to video stream real-time parameters. CRs-Fixed: 3155775 Change-Id: I21590ee41708f5cb1ed45cb5a7f5c00f1c129bb0 Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com> Signed-off-by:
Simao Gomes Viana <simao@halogenos.org> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
CRs-Fixed: 3013293 Change-Id: Idfafcd6aa718054ff749bd5d1c7eb2630be0f109 Signed-off-by:
DennySPb <dennyspb@gmail.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com> Signed-off-by:
Simao Gomes Viana <simao@halogenos.org> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Change-Id: Icdfd3512a79d9935d3fdb611c96dc8fd91a5e1c5 Signed-off-by:
DennySPB <dennyspb@gmail.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com> Signed-off-by:
Simao Gomes Viana <simao@halogenos.org> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Unlinking death recipients (from linkToDeath) is a normal part of Binder operation, and doing it when a BpBinder's refcount has reached 0 is not much different. This log message is constantly spamming when swiping as part of a back navigation gesture: 04-05 22:29:41.402 655 3888 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> 04-05 22:29:41.413 655 3888 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> 04-05 22:29:41.424 655 3888 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> 04-05 22:29:41.435 655 681 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> 04-05 22:29:41.447 655 3888 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> Logging is relatively expensive on Android and the log spam isn't useful, so suppress this log message by setting it to the verbose log level. Change-Id: I774d0c59ca6f70a4e2ed33b9fac3fb5b86d8ff0a Signed-off-by:
Simao Gomes Viana <simao@halogenos.org> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
* Change I7f4174581e24e361577640b9263514a168ed482d implemented validation of the buffer description info prior to creating the descriptor. Some of our legacy devices need to whitelist additional usage bits to support various functionality. libui: Extend adb95ae to Gralloc3 libui: Extend adb95ae to Gralloc4 This commit squashes: libui: Convert lineage product variables to soong config variables Change-Id: Ib687c966d4eafcc1128611b95ebed00fd0a8bfaf Change-Id: Ie369e78f78e9ac0b18ab3dfea520d4f123005d92 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
The candidate of presnet fence is switched dynamically between front/back buffer, based on current design, it will introudce in big side effect especially for app launching, app resume cases, sometimes the timestamp of the candidate fence is not signaled, but the other candidate has fence signaled already. Then previous logic is not well handled to pick up theright presnet fence candidate. Then frame is skiped. This change is to use the legacy logic to pick up fence candidate. It can avoid such abnormal frame skip behavior. Change-Id: I055942d9ae9ac6c96eba403aa4bc1979cf128ce8 CRs-Fixed: 3035044 Signed-off-by:
Chenyang Zhong <zhongcy95@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
libstagefright_omx library need to be extended to vendor which is depenednet on libgui which is a vndk_private lib. Creating vendor version so that libstagefright_omx_ext can link to libgui_vendor. Conflicts: libs/gui/Android.bp CRs-Fixed: 2258968 Change-Id: I777eebffc405c8bb74aab270e9f272c806501458 Signed-off-by:
Volodymyr Zhdanov <wight554@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Oct 01, 2022
-
-
Android Build Coastguard Worker authored
Change-Id: I7327923aa6952c485af578121a177262f3281432
-
- Sep 30, 2022
-
-
Rob Carr authored
-
- Sep 29, 2022
-
-
Android Build Coastguard Worker authored
Change-Id: I95c1b29e065e050901bb4d5ab1fa2f12e81e7b47
-
Siarhei Vishniakou authored
When an event hub device is going away, the controller associated with it should be deleted. Before this CL, mController would remain, and its use would result in an illegal memory access, because it was storing a reference to a deleted context. Bug: 245770596 Test: atest inputflinger_tests:InputDeviceTest#DumpDoesNotCrash Merged-In: I298f43172472f74fa4d5d8e0b7f52bd5c13d14f7 Change-Id: I298f43172472f74fa4d5d8e0b7f52bd5c13d14f7 (cherry picked from commit 30feb8c1)
-
- Sep 28, 2022
-
-
Robert Carr authored
This is a cherry-pick from of a CL from sc-v2 adding a safety mechanism for lost buffers. The original CL probably should have been merged in to master, and I can't relate to my thought process adding DO NOT MERGE on the original CL. Recently we have started seeing some of these ANRs again. Well actually we have seen them continuously, but most have been due to GPU hangs. Recently we started seeing some which aren't due to GPU hangs. We found one trace, which showed the sort of situation described below, which lead me to realizing this code was never merged in to master. It shoud be relatively safe since we released it on sc-v2. Perfetto telemetry shows a cluster where a transactionComplete is arriving but an earlier releaseBufferCallback has never arrived. 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%. Bug: 247246160 Bug: 244218818 Test: Existing tests pass Change-Id: I757ed132ac076aa811df816e04a68f57b38e47e7
-
- Sep 27, 2022
-
-
Alec Mouri authored
SurfaceFlinger::doDump previously contained two layer traversals, one on the main thread and one off the main thread. During concurrent dumpsys commands, the layer traversals may race with each other, which causes shared ownership of the underlying storage of a SortedVector containing the z-ordered list of layers. Because the implementation of SortedVector's STL iterators assumes that the underlying storage may be edited, this can cause the storage to be copied whenever SortedVector::begin and SortedVector::end are called, which means that SortedVector::begin() + SortedVector::size() == SortedVector::end() is not always true, which causes invalid iteration. In general, this use-after-free can happen as long as the off-main thread traversal exists in doDump(), because the traversal can run in parallel with any workload on the main thread that executes a layer traversal. So, this patch moves the traversal for dumping out the list of composition layers into the main thread. A future patch could explore either fixing SortedVector to fix judicious iterator invalidation, or building LayerVector on top of std::set, but either option is an invasive data structure change. Bug: 237291506 Test: Test script that calls dumpsys SurfaceFlinger on many threads Change-Id: I0748396519c924dc1b84113d44259f22d0d7ebd6 (cherry picked from commit 6761733a) Merged-In: I0748396519c924dc1b84113d44259f22d0d7ebd6
-