summaryrefslogtreecommitdiff
path: root/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
AgeCommit message (Collapse)Author
2022-04-22Gralloc: add tracingDevika Krishnadas
Bug: 230063328 Test: perfetto traces Signed-off-by: Devika Krishnadas <kdevika@google.com> Change-Id: Iaee45ac15e604ea3c8f786e9bb76786bab14b15c
2022-03-16Remove unused debug filesAnkit Goyal
Bug: 207450311 Test: Boots to home Change-Id: I595f060df7576fdf79951b7163b51ff5a95d080a
2022-02-28Add support for BufferUsage::FRONT_BUFFERAnkit Goyal
Bug: 218383959 Test: Boots to home Change-Id: I8f6b97339b3e7560e5b3911a01f6fafbbe8105bd
2021-10-18gralloc4: Do not hold reference for dumping in allocatorAnkit Goyal
Dump buffers are only per process and is not available at the allocator level. Gralloc should not be holding reference to that while allocating a buffer. Fix: 199336554 Test: Do not observe leaks in heap profiling Change-Id: If92cffb2db9ee30ab1a5cee0297d066138c60674
2021-10-18gralloc4: Delete the gralloc handle when freeing the bufferAnkit Goyal
Bug: 199336554 Test: Do not observe leaks in heap profiling Change-Id: Iacab8555a1f425d7746fc7ab0937ddf9b1cf23d8
2021-09-24Add missing 16 alignment constraint of chroma stride for YV12wenchangliu
Exynos encoder need 16 stride alignment for both luma and chroma in YV12. Add 32 stride alignment for luma to ensure we meet the requirement. This change will not impact the decoding case since we use 64 stride alignment by default. Bug: 201012738 Test: run vts -m VtsHalMediaC2V1_0TargetVideoEncTest Change-Id: I7086366bfaf4f589e878c732b30b615034ccfa20
2021-09-16Fix YV12 stride alignment issuewenchangliu
For some applications (TikTok, AliExpress, Shopee), the YUV layout is not requested from GraphicBufferMapper API, causing a misalignment if the resolution can't satisfy both 64 and 128 alignments. To prevent luma stride misalignment with GPU stride alignment. The luma plane will maintain the same `stride` size, and the chroma plane will align to `stride/2`. Bug: 199836131 Test: AliExpress/Shopee live streaming Change-Id: Id8dd547ff60dec7be49d777f2a63081923d5a9cf
2021-06-19Allow realigning YV12 to satisfy C2's stride assumptionsAnkit Goyal
Fix: 191275214 Test: Video playback using SW decoder Change-Id: Ieec84b51ba2cbf689555262e9ccd180f22df55ad
2021-06-03Revert "gralloc4: limit 64-byte alignment to GPU+camera"Sean Callanan
This reverts commit e3a678186d514650cca2e0464c26cb10912e4e72. Reason for revert: All IPs now allow 64-byte alignment. Bug: 188600370 Bug: 184793812 Bug: 185836979 Bug: 188226310 Change-Id: I2b9b20d2f3de7794590a613f40e173e263b487aa
2021-05-19gralloc4: limit 64-byte alignment to GPU+cameraSean Callanan
Currently, only Camera has been verified to handle 64-byte strides properly when writing buffers for the GPU. Narrow this down and emit an error in the case of problematic usage combinations. Bug: 188226310 Test: play a 480p h.264 video, camera viewfinder, record/play video Change-Id: I7e82394ea40a49018705009da8b7d8aafa4aea26
2021-05-11gralloc4: align buffers for the GPU to 64 bytesSean Callanan
The camera requires 64-byte stride alignment for a variety of formats. Set this alignment if GPU usage is detected. Test: Boot, use viewfinder Bug: 185836979 Bug: 185065640 Bug: 184793812 Change-Id: I96a5abf5465fb583d5f3393dece431d3b60a2cdb
2021-05-06Convert BO CPU_READ_OFTEN to CPU_READ_RARELYAnkit Goyal
Bug: 157775531 Test: AV1 video playback Change-Id: I05046ea004630a80ae22ea6a2625e4a29cb052ce
2021-03-19Merge changes from topic "b181800407" into sc-devAnkit Goyal
* changes: Revert "Remove hack of offset calculation from exynos formats" Remove MSCL specific hacks
2021-03-18Remove MSCL specific hacksAnkit Goyal
Bug: 181800407 Test: CtsNativeHardwareTestCases && Video playback Change-Id: I203aab6e938ef13bae59246e8c819a12adfee96e
2021-03-17Gralloc: remove unused usagesAnthony Han
SBWC_REQUEST_10BIT and HFR_MODE usages are unused in Gralloc and should be removed. Bug: 182940134 Test: build Change-Id: I0e4d3446c2e302e3b692575424d58091d213fb20
2021-03-17Gralloc 4: log human readable format namesAnthony Han
Test: gfx-gralloc-nv12-afbc-test Bug: 143246001 Change-Id: I774ded56255c63c3587eeff571566db4603f7545
2021-03-11gralloc4: Print usages in a human-readable waySean Callanan
Bug: 180774763 Test: boot, run faceauth test Change-Id: I3103c08fff5a68d7291a6cbbc61f3eb5eb27066b
2021-03-09Merge "Removing VIDEO_EXT usage from our Gralloc" into sc-devSean Callanan
2021-03-03gralloc4: Add support for contiguous planesSean Callanan
The current gralloc implementation assumes that alignment operations need to be performed per-plane in multiplanar formats as they are in separate buffers. When this isn't the case, and the chroma planes follow immediately after the luma plane, this can result in miscalculated stride values for some buffer dimensions resulting in visual corruption. Bug: 150319746 Test: build, boot Change-Id: I5fa274dc810ae16af6c7bf6873cab1408a7fc42a
2021-02-25Removing VIDEO_EXT usage from our GrallocSean Callanan
Bug: 181240527 Test: boot Change-Id: Id72d108cd5f40ccd636adcce0ea94d2583c22269
2021-01-28Gralloc 4: Implement libGralloc4WrapperAnthony Han
Port libGrallocWrapper to libGralloc4Wrapper. Add a new optional parameter to the standard allocation path that sets the Gralloc fd to a user provided fd instead of having ion allocate an fd. Add metadata to libGralloc4Wrapper implementation, amend DRM table to support new formats. Test: aion_test Bug: 168763166 Change-Id: I3776b1cf2488969fa0ff2f0d744f329048008719
2021-01-28Gralloc 4: Build wrapperAnthony Han
Port Gralloc 3's libGrallocWrapper to Gralloc 4, it shares the same interface so no modifications are needed for AIon yet. Currently it trivially allocates a Gralloc buffer using the standard allocation path and does not substitute ion fd with the provided fd yet. Bug: 168763166 Test: mm libGralloc4Wrapper Change-Id: I367ebac2d6e3bb9d530be13f4e88a109838232b9
2020-12-21gralloc4: initial codeSeYeong Byeon
Bug: 173320140 Test: Builds successfully with gralloc3 and gralloc4 Test: Device boots to home with gralloc3 No-Typo-Check: Typos in comments from upstream Signed-off-by: SeYeong Byeon <sy.byeon@samsung.com> Change-Id: I1df105fd0358a0d1ee9c0266acafc4f7192ebc92