Commit Graph

37 Commits

Author SHA1 Message Date
Naseer Ahmed
04a804a8f1 display: Use log.h from VNDK
Change-Id: I8aa8566036a44b1587f5cfe6c745e11a3dd19481
2018-03-06 20:41:14 -05:00
Ashwini Rao
6e616961be libqdutils: Add Video performance mode metadata
Add Video performance mode flag to the gralloc
buffer metadata

CRs-Fixed: 2159379
Change-Id: Ifacabf55a45eb77b890ed278ad23c9a5d37d3382
2017-12-14 16:34:22 -08:00
Naseer Ahmed
7aff26123e display: metadata fixes
* Do not log error on invalid metadata fds, such usages are
possible in some scenarios
* Correct usage of metadata API for some cases.

CRs-Fixed: 2122143
Change-Id: Id9cc7f4d27ef1890668f414d92b96cd419b6a066
2017-10-12 18:27:08 -04:00
Linux Build Service Account
bfbffd6b16 Merge "qdutils: Handle color-metadata on non-HDR targets" 2017-07-17 20:07:19 -07:00
Gurunath Ramaswamy
b494c02d94 qdutils: Support Get/Set of UBWC CR Stats metadata
CRs-Fixed: 2073410

Change-Id: I133307d63d301a24af183b18a330eb160459c805
2017-07-14 11:18:17 -07:00
Uday Kiran Pichika
5649e1c4f4 qdutils: Handle color-metadata on non-HDR targets
CRs-Fixed: 2074296
Change-Id: I7aeb82b662455656dd48352201504516ebadf156
2017-07-11 12:04:30 +05:30
Naseer Ahmed
e9b8762b62 qdutils: Use POD copy for metadata
CRs-Fixed: 2072303
Change-Id: Icc15706df10098f419966d28f30c2246fafc26bc
2017-07-06 15:22:43 -04:00
Naseer Ahmed
2e6bee1c3a qdutils: metadata utility functions
Add support for copying to/from virtual addresses as well, in
clients which only have the metadata base pointer but not the
native handle

CRs-Fixed: 2033657
Change-Id: I3d4d0e4139207a54c3db2f8585533974e1657a0a
2017-04-14 20:00:20 -07:00
Naseer Ahmed
8d1434ab2a qdutils: Return on null param
Clients can use null param to unset metadata
CRs-Fixed: 2027597
Change-Id: Ia6ce7af5445938da4d0c66d9e184d82cc3f4b5b7
2017-03-31 16:01:26 -04:00
Naseer Ahmed
3b3a19c2e0 qdutils: Fix mapping in qdMetaData
With gralloc1, munmap is called at the last release() of the
buffer in the client process. Do not munmap in every metadata
call. Also moves the handle validation/mapping to a common
function.

CRs-Fixed: 2025982
Change-Id: I8f171d87e31368f4a9f19c916eceb1abda449000
2017-03-29 17:50:11 -04:00
Arun Kumar K.R
3e45ac42f4 display: Use getMetaData in hwc2
Use getMetaData API to get the metadata information in hwc2.
As it maps the metadata in the process before accessing it.

Change-Id: I346d223058e6eadb00f16bb9f2be8a46e87fbdef
CRs-fixed: 2019985
2017-03-28 21:14:21 -04:00
Naseer Ahmed
08c3e40f15 qdutils: Fix compilation issue
CRs-Fixed: 2022055
Change-Id: I536dc9469c305199174d215f051a6878314f0bf4
2017-03-20 12:19:49 -04:00
Arun Kumar K.R
b2771bff77 display: Add color Metadata
- Add color aspects and HDR10 related static metadata
  which will be used in the existing metadata structure.
- Clients can use COLOR_METADATA to update the CSC
  information
- UPDATE_COLOR_SPACE is legacy and will be used when
  COLOR_METADATA is not set.
- Update gralloc to return color space when set from
  COLOR_METADATA
- Gaurd the usage with USE_COLOR_METADATA for cobalt.

Change-Id: I460accf6cd2bb7a305c7e93284955e566a5b7532
Crs-fixed: 1074172
2016-11-14 02:16:36 -08:00
Baldev Sahu
2b4f604238 qdMetadata: Fix potential memory leak in copyMetaData
- Fix potential memory leak which can happen due to
  change "Iba741215e524254b88f88058052fb6408e1f4a36"

Change-Id: I4e0fdee0a69c309b9fc06b1e7df83a0045159777
2016-10-24 03:51:25 -07:00
Naseer Ahmed
e8f254da5d qdutils: Add VT timestamp to the metadata
Add a presentation timestamp that is set by camera for buffers
intended for video telephony.

Change-Id: I8d3ab9e5ea798c6794a74ea6f0f607a303752a6b
CRs-Fixed: 1053401
2016-09-02 08:48:31 -07:00
Prabhanjan Kandula
1ef8e6e520 qdutils: Provide a way to reset MetaData key
If data or parameter passed is NULL for setMetaData,
clear the specified metadata key.

Change-Id: I700f431c27ee6b433e363da6c846c792ea3e2d59
2016-08-31 00:38:22 -07:00
Ray Zhang
8ace84d117 sdm: Notify surfaceflinger to draw S3D framebuffer target
Set S3D flag to private handle so that SurfaceFlinger can help
to draw S3D framebuffer target according to the flag in case
MDP can not handle some of S3D cases.

Change-Id: Ic39d0c0dd47c71e8a677d1e52af2c485494235b3
CRs-fixed: 999055
2016-08-17 17:40:04 +08:00
feifanz
9cc2303f90 qdMetadata: Add MetaData operation functions
1. Change frame rate to float since uint32_t can not
   match frame rate to standard.
2. Add function of getMetaData() for components to
   fetch params from MetaData.
2. Add function of CopyMetaData() for components to
   clone MetaData for different buffers.

Change-Id: Iba741215e524254b88f88058052fb6408e1f4a36
CRs-fixed: 1001500
2016-04-27 19:09:50 -07:00
Saurabh Shah
b8067a42ed qdMetadata: Use uint32_t instead of bool
Some graphics drivers don't recognize bool (^^) so use uint32_t
instead to fix compilation issues.

Change-Id: I12e13ed4d13ec241467a4c5a2b9cf2e409ee5505
2015-11-09 12:14:40 -08:00
Arun Kumar K.R
a0394ad853 qdMetaData: Remove unused metadata fields.
Clean up metadata_t by removing unused fields

Change-Id: Ia736d87bb617944abb982c58013afa3a535dcd37
2015-10-29 19:05:02 -07:00
Saurabh Shah
95f8368b4b gralloc/metadata: Add support for single buffer mode
Add support for setting single buffer mode on a buffer via gralloc
perform from gfx

Change-Id: I7640b3b984ebc1c4c8fcaedfb3e222ec989a84cb
2015-10-29 11:12:23 -07:00
Dileep Marchya
1a7e1f193e sdm: Add support for IGC.
- Add support for sRGB IGC.
- Program IGC PP parameters for sRGB contents.

Change-Id: I41b4b0bd8ef60fc7f869c742d084f4c3a3db6635
2015-10-16 16:11:23 -07:00
Dileep Marchya
2295fdd41d sdm: Fix memory leaks.
- Fix memory leaks.
- Remove memcpy usage.

Change-Id: I63ed7e86d5a5e68fd90820705486897d3e8bd88e
2015-08-12 17:15:38 -07:00
Sushil Chauhan
e7acc3c916 sdm: Add support for LINEAR_FORMAT metadata operation
1. Define LINEAR_FORMAT operation in MetaData.
2. VENUS ouput buffer is linear for NV12_UBWC Interlaced video playback.
   So Video module performs LINEAR_FORMAT operation to set "linearFormat"
   metadata member to NV12 linear format in case of Interlaced video.
3. Handle LINEAR_FORMAT metadata operation in HWC wrapper and gralloc.

CRs-Fixed: 855474

Change-Id: I77dd72bec26f225de75adb6c214ccd90db239e3e
2015-06-29 15:21:58 -07:00
Naseer Ahmed
3324ff775b hwc: metadata API to set 3D format.
API to allow the video decoder to set the S3D format.
The supported format definitions have moved to qdMetadata.h
for uniformity.

Change-Id: I2b313bf72df97ae948e7efc7faf4a4441c0ef5ce
2015-02-12 22:15:28 -05:00
Arun Kumar K.R
da2f69b96f gralloc/qdMetadata: Add mapSecureBuffer field to metadata struct
- The client sets this metadata to inform GPU to map the CP buffer
- GPU will check the PRIV_FLAG_SECURE and this metadata to map the CP buffer
- If this field is not set on the buffer handle, then GPU will not map
  the CP buffer
- Allow mapping of metadata for SECURE_BUFFERS also

Change-Id: I86300a1b4e3008f9d0884940420e9036c47a016f
2014-10-10 16:23:26 -07:00
Arun Kumar K.R
a727a888ba display: Add support for dynamic refresh rate
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
  when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
  updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo

Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
2014-09-17 13:48:26 -07:00
Ray Zhang
566adacd48 qdutils: correct error checking of MetaData's handle mapping
In term of Linux manual, mmap() returns MAP_FAILED in case of
error, so current checking against NULL is not valid.

Change-Id: Iee6920b6478843a0c1cd62bdbe3e4b652a39c583
2014-04-14 15:42:06 +08:00
Naseer Ahmed
330a2820c2 display: Remove VPU related code
Targets in which VPU interacts with display through HWC are no
longer supported.

Change-Id: I65a5348a375ad0c193a8659d0cdfb37c2db6f38e
2014-03-15 13:54:07 -07:00
Dileep Kumar Reddi
bf333c775d hqd : Use proper type casts
* Remove compilation errors
    * Use proper type casts

Change-Id: I1d44c2a2362a1fdd4d6e412ea816d4078e8355c9
:
2014-02-28 02:09:00 -08:00
Shuzhen Wang
0d11348a0e display: Add color space metadata field
Add color space field in gralloc buffer metadata
for buffer producer to propogate color space
information to consumer.

This approach is more flexible in the sense
that gralloc doesn't need to depend on usage
flag to derive color space.

Change-Id: I89d5a85f84a6f36dca7c5fc754dc7eb19581169a
2014-02-27 08:58:30 -08:00
Arun Kumar K.R
f15adc04ce qdutils/qservice: fix compilation warnings
- fix incorrect type casting.
- remove unused variables.

Change-Id: I4d21fe895b048a9dcb7c43297d44b041ba42d735
2014-01-31 11:40:02 -08:00
Ranjith Kagathi Ananda
b9f6181320 libqdutils: Add generic metadata structure for VFM
Defines generic metadata structure for VFM. An array of VFM metadata
structures is used to keep the libqdutils agnostic of the internal
details of VFM metadata.

Change-Id: I5513b5f88b0f18687c0f563f2fe25eb9481887bf
2013-11-20 14:42:37 -08:00
Ramkumar Radhakrishnan
92f3abe485 hwc: Add support to smooth streaming feature.
update the source video width and height set by the video decoder
for secure video smooth streaming usecase from metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
2013-10-23 11:59:48 -07:00
Naseer Ahmed
aa883d5d9c qdutils: Add field for presentation timestamp.
This timestamp can be set by clients who wish to defer
presentation. The behaviour is intended to be similar to the
native window presentation timestamp which is currently not
implemented.

Change-Id: Iabe12f81677093f4c30db2b09deaac7bf063f296
2013-04-30 17:22:00 -04:00
Saurabh Shah
5daeee5bcf hwc: Add MetaData support in overlay path.
DONE:
    1. HSIC(SPA) test.
    2. IGC R/G/B channel test.
    3. QSEED2 sharpening/smooth test verified through register value check.

Change-Id: Ia9472f489c013df22a3411eeaac3c8d1e6e22ac0
2013-03-23 04:53:38 +08:00
Ramkumar Radhakrishnan
47573e20d5 display: Add display metadata in buffer handle
Allocate extra space for metadata in buffer handles
Provide api to map this space in client process and set the metadata

Change-Id: I8bca8448670d4aa88d439320faf402dae30458f8
2012-12-26 15:45:17 -08:00