Commit Graph

61 Commits

Author SHA1 Message Date
Rosa Chen
2a4c372675 gralloc: Fix integer overflow in roundUpToPageSize
- Changed the input and return value from integer to size_t in
  roundUpToPageSize

Change-Id: I526b90d3d85cd263b1a4dd524bd3e759ff0fd491
2022-12-02 16:26:34 -05:00
Mahesh Kumar Sharma
e28c2d2e0c display: Add video transcoder stats metadata support
Add support to assign video decoder stat info metadata
in gralloc buffer with in gralloc interface.

Change-Id: I87a130cff68e425a5493b4711e2c344a45597254
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-06-03 10:21:28 -07:00
Christopher Braga
34fef9c4f6 gralloc: Introduce custom content metadata region
Introduce a new dynamic memory region to store custom content
metadata that has sizing requirements that exceeds the base
1KB region allocated. This region is dynamic to ensure a layer's
memory requirements are only increased when absolutely needed.

Change-Id: I774197ed0c4ec7a18cc09b24262b6548dc293e72
2022-05-18 15:12:55 -07:00
Rajat Yadav
0cb6e516e6 commonsys-intf: Remove compilation warnings.
Change-Id: Iad6b11033326c81536a939f954f6511e3246a193
2022-05-08 09:51:13 -07:00
Ray Zhang
1fec9e8def gralloc: Add Timed Rendering metadata
Add support to pass new Timed Rendering metadata
in gralloc buffer.

Change-Id: I078ee218a02935ad4fcc77dad3f2a83fd4574400
2022-05-02 19:48:38 -07:00
Baldev Sahu
13de7b77a3 gralloc: Fix issue with mmap/munmap meta due to reserved size
Fix possible security issue which can happen if client changes
reserved size in meta data. This can cause wrong size munmap.

Change-Id: I5d2b55272d1b5df217e71c45ecdece9ed9eaae97
2022-04-22 18:26:13 -07:00
Ramkumar Radhakrishnan
3a68827d32 gralloc: Add metadata interface to change buffer permission
Store buffer access control information in metadata and add interface
to set/change buffer access control after the buffer allocation

Change-Id: I2dfb99c4db82f896b623a1f394977632a4bfd0e0
(cherry picked from commit 222f30bc47e072a6e7d3ba677f6630f2dc7e9661)
2022-04-19 10:01:10 -07:00
qctecmdr
a3d369d991 Merge "gralloc: Define YCbCr_420_SP_4R_UBWC format" 2022-04-13 01:59:34 -07:00
Naseer Ahmed
2d51d41135 gralloc: Add video HW usage flag
GRALLOC_USAGE_PRIVATE_VIDEO_HW indicates that this buffer can use video
hardware.

Change-Id: I45fd173e08663123970caec7390867c031ad91b3
2021-12-20 15:02:24 -08:00
Lohit Narayan
54bd6e12d5 gralloc: Define YCbCr_420_SP_4R_UBWC format
Add support for this UBWC to enable sharing buffers.

Change-Id: I754d59e28126a4a205a39292d9a90cbbb7ff9db5
2021-12-16 03:32:21 -08:00
Gurkaran Singh
7edc05ecad vendor-freeze: Move few commonsys-intf/display libs to commonsys/display
Moved libdisplayconfig.qti, libqdMetadata, and libgralloc.qti from
vendor/qcom/opensource/commonsys-intf/display to
vendor/qcom/opensource/commonsys/display to install in system_ext

Change-Id: I59dd04f09184947f72ad9823a2e9e8c5e9c5422c
LNXDISPLAY-1552: REQ002
CRs-Fixed: 2972776
2021-07-05 21:48:31 -07:00
Ravi Ranjan
f556c7cc0d gralloc: Update enum value for ITU_R_709_FR
Update the values of defines as it was done previously. Reordering
value of defines will cause backward compatibility issues. Update
value of ITU_R_709_FR as a new enum value which was not used
previously.

Change-Id: Ief47e131863e6d01481f1d5c2097bd7ce100cd7a
2021-07-01 03:57:55 -07:00
Abhijith Desai
d276ec2934 Enable abi check for gralloc, libqdmetadata, libdisplayconfig
Enable qiifa abi check for gralloc, libqdmetadata and
libdisplayconfig libraries as part of enabling QIIFA
interface checks for display techpack.

Change-Id: I5b5667d58baf0039ccac5faf08f3a3f09d569d29
2021-06-14 01:58:55 -07:00
Ravi Ranjan
01003ce023 gralloc: Add support for color space ITU_R_709_FR
CRs-fixed: 2860964
Change-Id: I1272b0f459ac6388d951d864a35f1e7d8e94b5fb
2021-04-28 04:13:56 -07:00
Ashish Kumar
fa070dee7b gralloc: Define FSC HAL Pixel formats
Change-Id: I44168444fb508f7571cbc85e6fc5451ad10f834f
2021-02-07 23:03:47 -08:00
Zube Molokwu
10c74ab436 display: Adds additional APIs for gralloc4 support
Adds gralloc4 support for QtiMapperExtensions APIs

Change-Id: I2728f7dd7286702ae19f6fa1c0548027a2e12437
2020-12-21 12:18:16 -08:00
Ravi Ranjan
d831a3d42e gralloc: Add flag PRIV_FLAGS_TILE_RENDERED
CRs-fixed: 2793240
Change-Id: I7f77e344649bda320bfcde01fb0f5ba276bc950b
2020-12-18 10:26:54 -08:00
Zube Molokwu
058b55de20 display:Adds ColorSpace macros to support gralloc4
Change-Id: Ided5ac9548269adaf8f5414ba0dd86abadb51d9b
2020-11-09 10:18:23 -08:00
Baldev Sahu
356869cea9 Display: Handle S3D format set/get correctly
Use vendor meta data status for S3D_FORMAT. This
support is only for legacy reason.

Change-Id: I451829dfe5501d8bd24fa5818cb336f077c5344e
2020-09-25 17:19:00 +05:30
Shrikara B
21c0d729d6 display: Add video TS info metadata
Add support to pass new video timestamp info metadata
in gralloc buffer. Add support in both qdmetadata
and Gralloc4 interface.

CRs-Fixed: 2713472
Change-Id: Ica7776c6594ec3224f631f2eb23a1988f075313f
2020-09-03 10:59:32 +05:30
Venkat Thogaru
6b511cd1d2 display: Fix array out of bound
Change-Id: Ic560d36efad6a6b2a98a6c190abca6542ef91d91
2020-07-28 14:56:38 +05:30
Tharaga Balachandran
bcd39b9ab9 gralloc: Add metadata type buffer_type
CRs-Fixed: 2730864
Change-Id: I8f96b5dc905f1b8cedc498d3853be27a8f92ae58
2020-07-13 12:10:43 -04:00
Tharaga Balachandran
3981046acc display: Add reserved size and status check to MetaData_t
* Move from fixed array reserved region to variable reserved
  region size
* Add bool arrays to indicate whether metadata has been set using
  Gralloc4 indices
* Replace metadata->operation with bool arrays for
  gralloc4/qdMetaData compatibility

CRs-Fixed: 2730848
Change-Id: Id52aac70c23ee4b39db185861f951bb909831afb
2020-07-13 11:36:26 -04:00
qctecmdr
343cd2a44b Merge "gralloc: Use only 'data' member in GraphicsMetadata" 2020-05-23 23:38:40 -07:00
Ravi Ranjan
c74a80eae0 gralloc: Use only 'data' member in GraphicsMetadata
- In gralloc3, first member 'size' in GraphicsMetadata struct was
  never unused in call to GetGraphicsMetadata. Get() call always
  returned 'data' member in GraphicsMetadata structure.

- Gralloc4 implementation introduced new encode/decode functions for
  GraphicsMetadata which are simultaneously used during set/get
  calls to encode/decode  metadata for caller and during storing/
  retrieving it from Metadata_t struct. Get() call returned
  GraphicsMetadata struct pointing to its first member 'size'
  instead of second member 'data'.

- Implement function to encode/decode GraphicsMetadataRaw to translate
  the metadata before calling mapper set/get.

- Update encodeGraphicsMetadata/decodeGraphicsMetadata functions to
  store/retrieve only 'data' member in GraphicsMetadata structure.

CRs-fixed: 2682060
Change-Id: I60c3dd2029ba21aa481dad35f9b4738b2d78957a
2020-05-22 01:37:06 -07:00
Dhruv Kaushik
fcc2e6ea0f gralloc: Change HAL_PIXEL_FORMAT_YCbCr_420_P010 macro
Use value 54 from system include for HAL_PIXEL_FORMAT_YCbCr_420_P010

Change-Id: I5a008141a857f4c7c3e4f116c78553f34030ae2f
Crs-fixed: 2688319
2020-05-20 23:47:39 -07:00
qctecmdr
0ce7be9173 Merge "display: Fix dependency compile error" 2020-05-02 23:32:32 -07:00
Mohamed Moussa
192d186207 display: Fix dependency compile error
When enforce compile time product I/F, system_ext module
cannot link to product module and vice versa.
When PRODUCT_PRODUCT_VNDK_VERSION := current, all native modules
in product partition are in the product variant. Adding system_ext_specific
and vendor_available will create system_ext variant and vendor variant.
This will fix the following dependency compile 2 errors:
-Error: MMCapability.cpp:33:10: fatal error: 'qd_utils.h' file not found
libwfdsinksm.so [MMCapability.cpp], installed in SYSTEM_EXT partition
and depends on libqdMetaData [qd_utils.h], accessable in product partition.
Replacing product_specific with system_ext_specific, while enforcing product I/F
will install libqdMetaData in system_ext and variant in product partition

-Error: dependency "libgralloc.qti" of "libqdMetaData" missing variant
libqdMetaData now moved to system_ext. Need to install libgralloc.qti
in system_ext.

Change-Id: Ic4eb768173f2125cee2bb1fa69665b50e8708ea5
2020-04-27 13:07:10 -07:00
Yichi Chen
bddad07ef1 gralloc: Refactor gralloc4.0 for some concerns in code review
There were some concerns raised in the intern code review process. Since
Qualcomm has merged their Gralloc4.0 changes into their codebase, the
patch created another standlane change to address the concerns within
the code review.

Bug: 141596968
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I33905f5f1198089a1e3fe16e1fd46a8f614e8679
(cherry picked from commit 3dfff2a5af39b14422ede072e3e9d95596e5fc3f)
2020-04-14 08:21:22 -07:00
Tharaga Balachandran
aa640f7b96 display: Add metadata types for allocated width and height
The standard metadata types for width and height return the
values requested by the client, rather than the width and height
of the allocated buffer. This change adds internal metadata types
so clients can query the allocated values.

CRs-Fixed: 2638621
Change-Id: I7c69cff65512c30e27eb86ef33f67079c979eeb6
2020-04-08 12:06:13 -07:00
Arun Kumar K.R
a6ab9d11b4 commonsys-intf: QTIGralloc: Add new camera FLEX formats
Define new camera FLEX formats for UBWC batch size of 2, 4, 8

Change-Id: Ibdbff8f802a7d2bc6ed0962b467ddf8ef3155175
Crs-fixed: 2654646
2020-04-01 11:14:25 +05:30
Tharaga Balachandran
a069a7e22d display: Update metadata
This change adds libgralloc.qti to support Gralloc4 and the transition to
standardized metadata.

CRs-Fixed: 2619182
Change-Id: Ia43de9b1dc9da52affc508783c046b82cde1775e
2020-02-24 17:45:36 -05:00
Tharaga Balachandran
ed245fe3e7 gralloc: Move WFD usage flag to sanctioned vendor bit
CRs-Fixed: 2606686
Change-Id: I82408c0f2747d50d6f7cfce8e665a45897518a76
2020-01-27 10:23:42 -08:00
Abhishek Jain
ac3641e0a1 display: compilation fix in gralloc
if gr_priv_handle.h is accessed via C files, it throws error.
Added ifdef for cpluplus to fix this.

Change-Id: I16e593fb369205fefec76b05e9c6199b376d2f67
2019-06-14 17:58:03 +05:30
Linux Build Service Account
e5ce1da37e Merge "commonsys-intf: display: Add flag for interlaced content." into display-android-commonsys.lnx.1.1 2019-06-12 05:49:58 -07:00
Ashish Kumar
453ab5c397 commonsys-intf: display: Add flag for interlaced content.
Add interlace flag to get the plane layout count and info
in case of interlaced content.

CRs-Fixed: 2464961
Change-Id: I6f1cc38f71a79a0fecde773a29ea0847020daeb9
2019-06-11 14:49:32 +05:30
Ashish Kumar
87df22c931 commonsys-intf: display: Add new camera formats
Add pixel formats which are used by camera in gralloc_priv.h

CRs-Fixed: 2460241
Change-Id: I905eeef806c74c623a6f902277d3cf8168b2a6dd
2019-06-11 14:35:21 +05:30
Naseer Ahmed
fb1d3dea2d commonsys-intf: Add missing gralloc flag
Change-Id: I8f2e3fd42978f1e8bd0a42669b1653f6df19111a
2019-01-28 16:36:55 -05:00
Ramakant Singh
20b6c8c4b9 Gralloc: Fix out of bound read in private_handle_t.
Change-Id: I3d16321e29291007be0d8be11225f426ea0dd252
CRs-Fixed: 2337383
2019-01-15 22:32:37 -08:00
Mohan Pallaka
eb982e5a48 commonsys-intf: display: Add dedicated heaps macro for sensors direct report mode
Updating gralloc header file similar to sdm.

Change-Id: If1bae0509afe9f6d832680a40263cf3035150173
2018-10-22 13:04:51 -07:00
Rajavenu Kyatham
3bf8204f89 gralloc: Add support for HEIF usage flag.
Add new usage flag that can be used to indicate HEIF.

Change-Id: If933f0fccff18323a595a712c51258700bbeb1e4
CRs-Fixed: 2318608
2018-10-10 12:50:12 +05:30
Mohan Pallaka
8181cef67a Gralloc: Use 4 bytes padding for private_handle_t
Force 4 bytes padding to avoid data leak due to uninitialized padding.

Bug: 77237704
Change-Id: I3922bf62bfa6c78806a6d5fd969e2d9faf067abe
CRs-Fixed: 2257685
2018-08-27 08:26:12 -07:00
Mohan Pallaka
5d8144382d commonsys-intf: display: add changes for display-android-commonsys.lnx.1.0
Relocate changes from display.lnx.5.0 to display-android-commonsys.lnx.1.0

CRs-Fixed: 2251141
Change-Id: Ia65f6d7f83e21702cf61f0672ba97ae006ae7886
2018-08-02 16:37:46 -07:00
Subash Chander
001bc79f72 commonsys-intf: display: Add dedicated heaps macro for sensors direct report mode
Updating gralloc header file similar to sdm.

CRs-Fixed: 2275876

Change-Id: I8cf144e13969abbad4fcc4ed17a9dcfc64b1d111
2018-07-10 11:54:28 +05:30
Uday Kiran Pichika
2d3a307cd3 commonsys-intf: display: Add display folders
Add libdisplayconfig and libqdmetadata to support
Single system image

CRs-Fixed: 2251141
Change-Id: Ie988c6d23bcc7f8e8f8f4313d8c3255f55d200ce
2018-06-04 16:45:02 +05:30
Linux Build Service Account
efc1c4ac84 Merge "gralloc: layercount validation check" 2018-04-27 16:55:26 -07:00
Ramakant Singh
06676253cd gralloc: layercount validation check
layercount value should not be zero.

Change-Id: I439ca4f1655a4c892b4bdf02fc786c7e2838e816
2018-04-26 20:05:02 +05:30
Uday Kiran Pichika
7610943314 gralloc: Fix race condition in gralloc
- Add mutex lock while accessing handles_map

Change-Id: Ibbe77e87020e655f6ebeb2428a13555460b3ac7d
CRs-Fixed:
2018-04-24 22:19:37 -07:00
Linux Build Service Account
621dad55ee Merge "gralloc: Remove map fb memory property" 2018-04-21 07:04:05 -07:00
Naseer Ahmed
523dfe4e37 gralloc: Remove map fb memory property
This property is unused

Change-Id: Id8f5c087b0dfa0eb3a31a342968abb687f0944c8
2018-04-20 19:00:26 -07:00