summaryrefslogtreecommitdiff
path: root/gralloc/gr_utils.cpp
AgeCommit message (Collapse)Author
2021-11-30gralloc: Add option for unaligned YCrCb pixel formatWilli Ye
* Same problem as unaligned NV21_ZSL (Samsung Galaxy A70 needs this) Change-Id: Iddf19433ddef8023b9fa3f7b735f40039dafe3a6
2021-11-30gralloc: Add option for unaligned NV21_ZSL pixel formatLuK1337
* Not sure why this is a thing but on some devices (eg. Samsung Galaxy Tab S5e) aligning NV21_ZSL to 64 results in invalid width and height. Change-Id: I8611752798a8c66ba55d52d826aa532fd76abe33
2021-11-30gralloc: Add option for YCrCb venus camera previewSGCMarkus
On judypn (LG V40) camera preview has red/blue colors switched with HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS but HAL_PIXEL_FORMAT_YCrCb_420_SP breaks camera preview entirely. When using HAL_PIXEL_FORMAT_YCrCb_420_SP_VENUS camera preview works fine, with correct colors. Change-Id: I84ffcbbeb66acf4401294de6b4f3cf846c7530b9
2021-11-30gralloc: Allow devices to opt-in for YCrCb camera previewLuK1337
* Some stock camera HAL implementations output video stream in YCrCb instead of YCbCr. Change-Id: I562847dfd9bcf796052f6fd7263e2affbd601384
2020-08-31Merge "gralloc: modify YV12 color format handle"qctecmdr
2020-08-25Merge "gralloc: Update buffer size calc for NV12 color formats"qctecmdr
2020-08-19Gralloc: Fix stride bytes calculation for RAW.Ramakant Singh
Change-Id: Ic2af36994c081b102e2e33f059bd694d984d3bfc
2020-08-19gralloc: Update buffer size calc for NV12 color formatsPriyanka Gujjula
Compute the actual buffer size (including aligned width and height) based on pixel format that is set. In this case, calculate NV12 color format buffer sizes as per nv12_512 alignment even when the ubwc surface is set. Change-Id: Ic3ea1f03e9bfe0b62b3917e43d95da1f7e28bde8
2020-08-19gralloc: modify YV12 color format handleVenkat Thogaru
Change-Id: Ib8b6a80b1f39d11e2c9c7f9949c0c0323d7e6be3
2020-08-11gralloc: Add the support of RAW data in getComponentSizeAndOffsetYichi Chen
To support RAW8, RAW10, RAW12, and RAW16 in gralloc4.0, the patch sets the corresponding data in PlaneLayoutInfo and PlaneLayoutComponent. (Not a contribution) Bug: 157534008 Test: VtsHalGraphicsMapperV4_0TargetTest CRs-Fixed: 2728586 Change-Id: I5c0d7c31199b949dc32e112e2743ec6cdc7106bd
2020-05-12gralloc: Add support for IMapper/IAllocator 4.0Tharaga Balachandran
* Add QtiMapper and QtiAllocator 4.0 * Implement IMapper 4.0 APIs: get, set, getFromBufferDescriptorInfo, flushLockedBuffer, rereadLockedBuffer, listSupportedMetadataTypes, dumpBuffer, dumpBuffers, and getReservedRegion CRs-Fixed: 2633272 Change-Id: Ica42e485e426b366ffb41f30f1ea2cf395901356 Signed-off-by: Baldev Sahu <bsahu@codeaurora.org>
2020-04-22gralloc: Upgrade mapper and allocators to v3.0Tharaga Balachandran
CRs-Fixed: 2445393 Change-Id: I8c44ab63ca81523bb6acb75e8ae878cc7466e139
2020-01-06display: Add support for NV21_ENCODEABLE format.Ramakant Singh
Change-Id: I37beee2f460aee819e158414e220adb8a1e9dbfc CRs-Fixed: 2592164
2019-12-13gralloc: Add RGB format support in getFormatLayout APIAshish Kumar
CRs-Fixed: 2568703 Change-Id: I183a85fe5d30dc15454de0f5bec39658c24775ee
2019-12-11gralloc: Add support to getFormatLayout HAL API.Ashish Kumar
- Add API getFormatLayout which is required by camera team to get information of all the planes present during YUV format call. - Refactor the function GetYUVPlaneInfo to give some extra information of YUV plane. CRs-Fixed: 2464961 Change-Id: Ib84fd340f8c8926867a6f7e2ec7c0074c4dada06
2019-05-06gralloc: set HEIF pixel format based on usage flagsManikanta Kanamarlapudi
Set HEIF pixel format if heif usage flag is set. CRs-Fixed: 2427854 Change-Id: Id15facb8f5c4d0cb968c70fc3cc8473e44fa1d80
2019-02-11gralloc: Enable UBWC for client target by defaultNaseer Ahmed
A recent change in the framework requires us to enable UBWC for the client target implicitly, since the buffer does not get tagged by EGL. Bug: 120537504 Change-Id: I8d7c8a13f981f4c4f1dab8fa25e2dd2304ee5da0
2018-11-20Merge "gralloc: Add support to RGB compressed format and handle error"qctecmdr Service
2018-11-13gralloc: Add support to RGB compressed format and handle errorRamkumar Radhakrishnan
1. Add corresponding adreno format for RGB compressed hal format, as new adreno API adreno_init_memory_layout needs ADRENO_FORMAT to be passed. 2. Handle the error returned by adreno_init_memory_layout API for the inappropriate values passed. Change-Id: Iedcf306583b83ecb80db5495a801f37d2479276b CRs-Fixed: 2262839
2018-09-27Gralloc: Add new color format supportCamus Wong
Update gralloc function to handle color format: HAL_PIXEL_FORMAT_CbYCrY_422_I Change-Id: Icaa63c6dcc92da2d52c7e93d294c708def99e392
2018-08-18gralloc: Select CPU readable YCbCr formatMathew Joseph Karimpanal
HAL_PIXEL_FORMAT_YCbCr_420_888 is strictly CPU readable. Select a suitable implementation defined CPU readable format for it. CRs-Fixed: 2282551 Change-Id: Id473d93a14156f8c08fac62ba0441cc6570f60a2
2018-08-07gralloc : Add support for NV12_HEIF formatRajavenu Kyatham
- camera as producer set NV12_HEIF format to gralloc handle. - video HAL query color format from gralloc handle and accordingly setup. CRs-Fixed: 2292230 Change-Id: Idd46721014226997d54d80fde16b852fe886aecb
2018-07-31Merge "Gralloc: Add UBWC support for AHWB formats."Linux Build Service Account
2018-07-30Gralloc: Add UBWC support for AHWB formats.Saurabh Dubey
Update list of UBWC supported formats to include the newly added AHARDWAREBUFFER formats. Change-Id: I32043e3accc36e56af163f14e4b9713d77873d35 CRs-Fixed: 2287039
2018-07-29Gralloc: Add support to disable AHardwareBufferSaurabh Dubey
Add property to disable calling into adreno size calculation APIs Change-Id: I538a880769c4ce55ac42bcccfd5faebfa284d4e0 CRs-Fixed: 2268733
2018-07-01Gralloc: Move GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI to lower 32 bitsSaurabh Dubey
1) Move GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI to bit 30. Custom formats like HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS and HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC can now be used directly without needing gralloc flags to be set therby freeing bit 27 and bit 30. 2) Add PRIV_FLAGS_SECURE_BUFFER and PRIV_FLAGS_USES_ION to GetCustomFormatFlags API. Change-Id: Iee14af2f1a3774ef9922aa380c204ca5ebf60147 CRs-Fixed: 2255171
2018-07-01Gralloc: Make size calculation consistent at all placesSaurabh Dubey
Fix size calculation by consistently using adreno or gralloc calculation APIs Change-Id: Ic0cef22d6f99a17d7ce392d02a21edc812cd907b CRs-Fixed: 2262355
2018-07-01Gralloc: Do not use adreno for secure camera and secure displaySaurabh Dubey
Avoid using adreno size calculations for secure camera and secure display buffers. Change-Id: Ib61d893cbcc57b10070250a63b8fa79106de4af3 CRs-Fixed: 2262355
2018-06-07Gralloc: Implement getCustomFormatFlags APISaurabh Dubey
Implement API to get custom format and private handle flags based on a given combination of input format and usage flags. Change-Id: Id87e9abe834fb17c6304262cc486a84131c8809a CRs-Fixed: 2255171
2018-05-29Gralloc: Pass layer_count to adreno size calculation APIsSaurabh Dubey
Pass layer_count to adreno to get final, aligned and layer counted size. Change-Id: Idf7c5a0077819ea97011f8377e0e3e529038d954
2018-05-29Gralloc: Use adreno APIs for buffer size calculationsSaurabh Dubey
1) Add support to use adreno APIs for non video layers' buffer size calculations. 2) Add graphics metadata field to MetaData_t structure. 3) Add bindings for newly introduced formats in GetGpuPixelFormat. 4) Add support to retrieve the graphics metadata in Perform API. 5) Modify BUFFER_TYPE determination logic Change-Id: I7674209b42d7cd39bc8de39e3a10582bb216e6cf CRs-Fixed: 2226672
2018-03-21gralloc: Refactor size calculationNaseer Ahmed
Make GetSize return the final aligned, layer counted size. This can be used at other locations Change-Id: I5a8940b565eec6c8e709163c7736d485688ddb2e
2018-03-21gralloc: Add allocator and mapper HALsNaseer Ahmed
Implement the hidl .hal interfaces directly instead of using the default shims. This is required since new additions to .hal will no longer be added to the legacy gralloc1 C header. Change-Id: If577a14f75d7d13da0ff656c96ab451d21c910ce
2018-03-21gralloc: Move to new directoryNaseer Ahmed
In preparation for the hidlization of gralloc. Also delete obsolete libgralloc Change-Id: Id657f985cff1bdbf86c781efc52e8bda4e3d27b4