Commit graph

697 commits

Author SHA1 Message Date
Vishnu Nair
4d3f559655 Merge "Change RenderEngine::drawLayers to take a vector of LayerSettings pointers" 2020-01-23 15:22:56 +00:00
Dan Stoza
a4bea0eac9 Add generic layer metadata to Composer 2.4
Bug: 139747351
Test: VtsHalGraphicsComposerV2_4TargetTest
Test: Manual verification with a modified Composer implementation
Change-Id: I800841ab1348a93c73c25c5f8bcf2254d9dc22e8
2020-01-22 13:16:09 -08:00
Peiyong Lin
015b7d98ff Merge "Add getClientTargetProperty API entry." 2020-01-18 01:08:18 +00:00
Vishnu Nair
02da997fab Change RenderEngine::drawLayers to take a vector of LayerSettings pointers
Prework for the client composition cache logic which extends
LayerSettings. Passing in a set of pointers will reduce the
amount of copying needed when passing the LayerSettings to
RenderEngine.

Bug: 136561771
Test: atest librenderengine_test libcompositionengine_test
Test: atest VtsHalGraphicsComposerV2_2TargetTest
Test: go/wm-smoke

Change-Id: I0581be7762bf56cd7a3aab0511adf95cd6e2df76
2020-01-18 00:55:51 +00:00
Peiyong Lin
bc51e08596 Add getClientTargetProperty API entry.
getClientTargetProperty will give hardware composer the ability to request some
properties of the client target that hardware composer wants. Prior to this
API, the client will does its best to produce the client target of which the
properties are pretty much fixed.

BUG: b/145968912
Test: mmma -j32 hardware/interfaces/graphics/composer/2.4/
Change-Id: I055f46b1eeba1d3e20d6a92a9d50a83e0f1ee694
2020-01-16 10:05:54 -08:00
Ady Abraham
5f9f9a45ae composer: vts: send a refresh command when required + test fix
When calling to setActiveConfigWithConstraints, the implementation may
need the client to send a refresh frame before the active config can be
changed. In addition, testing with a device with composer 2.4 revealed
few bugs which are fixed by this change.

Fix: 143775556
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: Iafa1e85de60d99190d5d813f1d42924a62d94cc5
2020-01-13 14:26:49 -08:00
TreeHugger Robot
eea8c32428 Merge "[composer] Add createCommandWriter to command engine." 2020-01-11 01:25:29 +00:00
Ady Abraham
f81e0f7c05 Merge "composer: add seamlessPossible callback to composer 2.4" 2020-01-11 00:29:58 +00:00
Peiyong Lin
ad96dd9f12 [composer] Add createCommandWriter to command engine.
Command engine always uses V2.1 CommandWriterBase, change the creation of
command writer inside command engine so that we can use the right version of
command writer.

BUG: b/147365206
Test: build and boot.
Change-Id: I61fbbce19a44244725621e9a1cef750bd4c78b4d
2020-01-09 13:48:16 -08:00
Peiyong Lin
2be3570bc9 Make sure passthrough fails initialization if required interfaces can not be initialized.
All required interfaces must be able to initialized, make sure passthrough
fails if the requirement is not met.

BUG: b/147365206
Test: boot
Change-Id: I148655bc5392b1c0bc45f33ea3d2020824bb6f4b
2020-01-09 13:44:12 -08:00
Ady Abraham
30d818e8b3 composer: add seamlessPossible callback to composer 2.4
Add a callback to notify the client it should retry a
setActiveConfigWithConstraints call in case of SEAMLESS_NOT_POSSIBLE error.

Test: rev up composer to 2.4
Bug: 141329414
Change-Id: I6176638fde937e3916f58cc577d50cb755997c61
2020-01-08 17:19:08 -08:00
Peiyong Lin
96ee56bcd8 Remove beginCommand variants with a helper template.
BUG: b/147365206
Test: boot
Change-Id: I30715fe3e1c221ba366bf521fbd531636136f0c9
2020-01-08 14:55:20 -08:00
Steven Moreland
b7430e5154 Merge "*common: use package as name" 2020-01-07 21:49:22 +00:00
TreeHugger Robot
bd0827aa2f Merge "composer: register only vsync_2_4 callback" 2020-01-07 01:01:30 +00:00
Steven Moreland
926aa80f04 *common: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-*common format to the package format
(android.hardware.*common).

Bug: N/A
Test: all build time
Change-Id: Ie1d92a50dddf7e3e1bd473e2a957279c6dadb865
2020-01-06 23:25:20 +00:00
TreeHugger Robot
9043f4e51b Merge "Add controls for ALLM and Content Types to composer hal" 2019-12-25 13:14:51 +00:00
TreeHugger Robot
d97b9ab2e2 Merge "composer 2.4: Add new test case for getDisplayCapabilities" 2019-12-23 11:38:00 +00:00
Marissa Ikonomidis
69819f2e77 Merge changes I620f3cc0,I5ff86539
* changes:
  gralloc: update doc to reflect security change
  graphics.mapper@4.0: Document previously-implicit accessRegion behavior.
2019-12-19 23:26:04 +00:00
Marissa Wall
9506563fb4 gralloc: update doc to reflect security change
The MetadataType must be prepended to any StandardMetadataType byte
stream. The encode/decode support library already adds the MetadataType.
This patch updates the documentation.

Test: Compiles
Bug: 137966819

Change-Id: I620f3cc0edd088b062844bb7a718f34360454d71
2019-12-19 13:49:10 -08:00
Marissa Wall
4bb9cab24c graphics.mapper@4.0: Document previously-implicit accessRegion behavior.
Existing Android framework code (and transitively, CTS test) require
that an accessRegion of (0,0,0,0) is treated the same as an
accessRegion covering the entire buffer, when calling lock() or
lockYCbCr().

Document this so that there is no confusion about this going forward,
since this requirement pre-dates the HIDL HALs.

Bug: 119440345
Test: Builds, passes CTS

Change-Id: I5ff86539ee28a72dd972255ad405db357e62536d
2019-12-19 13:49:02 -08:00
Pawin Vongmasa
8e8bbddf89 Add HDR metadata types to graphics/common
Bug: 120990898
Bug: 141632767

Test: Builds
Change-Id: Ie37b38043ec4c015bbe439978a0344d4c6bbc124
2019-12-18 15:14:55 -08:00
TreeHugger Robot
b440e65a1b Merge "Add BT709 with full range." 2019-12-18 18:32:52 +00:00
Joseph Murphy
20102da237 Revert submission
Reason for revert: Buildcop - Build breaking references to std::optional

Change-Id: I8595ca0a668bc7e3684bc7f7a1424a6905d3b547
2019-12-17 19:58:51 +00:00
Yichi Chen
7337e0581b composer 2.4: Add new test case for getDisplayCapabilities
The original test case was only tested with bad display. The patch adds the
test case with normal displays.

Test: atest VtsHalGraphicsComposerV2_4TargetTest
Bug: 145566569
Change-Id: Id6a25ebc1f63092194ca1d8837cd450e5bc19def
2019-12-17 21:06:55 +08:00
Galia Peycheva
a0973458f5 Add controls for ALLM and Content Types to composer hal
Also extending the passthrough interface with setLowLatencyMode
and setContentType.

Bug:132731049

Test: make -j$(nproc)
Test: vts-tradefed run vts-hal --skip-device-info -m
VtsHalGraphicsComposerV2_4Target

Change-Id: I14dd61a3d9c60fdb06f9028ccd6f49797267e9f4
2019-12-17 13:50:58 +01:00
Peiyong Lin
ead8b45fc8 Add BT709 with full range.
Add support for BT709 full range support with SMPTE 170M transfer function.

Minor: Remove deprecated dataspace support in aidl.

BUG: b/130737986
Test: build
Change-Id: I17b1f7d868e99396df9779bdd53d63bdcd2a06af
2019-12-16 20:59:29 -08:00
Pawin Vongmasa
f95e14d1b4 Add HDR metadata types to graphics/common
Bug: 120990898
Bug: 141632767

Test: Builds
Change-Id: I94a592d1cc0854b37622a2c85575083b59803793
2019-12-16 09:22:30 -08:00
Marissa Wall
6a2ecb424c gralloc4: remove dumpDebugInfo
dumpDebugInfo could be called by anyone. A safer
approach is for processes to dump their own buffers
via IMapper's dumpBuffers.

Bug: 137966819
Test: Compiles
Change-Id: I4c8c7a6415babfb93034ee8674ba0f40cd8c1bb8
2019-12-16 09:22:06 -08:00
TreeHugger Robot
2a34cdb7ce Merge "Add AIDL type for HardwareBuffer" 2019-12-15 08:40:32 +00:00
Robin Lee
8376bc7a10 Merge "Revert submission" 2019-12-14 03:06:24 +00:00
Pawin Vongmasa
d535133127 Add AIDL type for HardwareBuffer
This includes other types needed by HardwareBuffer.

Test: Builds

Bug: 145839204
Change-Id: I86c9d2f0cb04b597da9a93b7b6210b041312e1ac
2019-12-13 17:28:57 -08:00
Hansong Zhang
517ac2ecae Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test 

Reason for revert: Break tests

Change-Id: I4f59a7e3d5c5f401a260f3c8ab3457cf4e2fe386
2019-12-13 22:03:10 +00:00
Galia Peycheva
54623045b9 Merge "Add controls for ALLM and Content Types to composer hal" 2019-12-13 10:09:00 +00:00
Automerger Merge Worker
dfb544e056 Merge "graphics: hwc2on1adapter: Buffer hotplug event after display creation" am: 74033a720b am: 076f84098e am: 43eedd211e
Change-Id: Ifa0eef52e8e439bddbbb2901008f3702d08f5c5c
2019-12-12 19:13:16 +00:00
Treehugger Robot
74033a720b Merge "graphics: hwc2on1adapter: Buffer hotplug event after display creation" 2019-12-12 18:28:05 +00:00
TreeHugger Robot
42327230c2 Merge "gralloc: use gralloctypes helper" 2019-12-12 17:43:47 +00:00
Dan Shi
46245c59d7 Convert VtsHalGraphicsMapperV4_0TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I3854f9d4e601d37952e41a5c503f3b1d833c47a5
2019-12-10 16:14:11 -08:00
Marissa Wall
353357bffe gralloc: use gralloctypes helper
Use the gralloctypes helper function to determine if a
PlaneLayoutComponentType is a standard type. Also update the
lock RGBA_8888 function to ignore non-standard
PlaneLayoutComponentTypes.

Bug: 141632767
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: Ie3ea4a22b2c9ecf4b1d85932833978d2e23f77c1
2019-12-10 14:58:28 -08:00
Galia Peycheva
2bd7d43325 Add controls for ALLM and Content Types to composer hal
Also extending the passthrough interface with setLowLatencyMode
and setContentType.

Bug:132731049

Test: make -j$(nproc)
Test: vts-tradefed run vts-hal --skip-device-info -m
VtsHalGraphicsComposerV2_4Target

Change-Id: I0ec5a5be796700074bdd8cac75cd67f96cd5df58
2019-12-10 11:43:06 +01:00
Dan Shi
050316231e Merge "Convert VtsHalGraphicsMapperV*TargetTest to be parameterized test" am: f78d7734d1 am: 64426d0a06
am: 2b8fcf0a7e

Change-Id: I6dbfdf330d59559d5ce0de0965fa840bfe8e6e24
2019-12-09 16:30:45 -08:00
Dan Shi
f78d7734d1 Merge "Convert VtsHalGraphicsMapperV*TargetTest to be parameterized test" 2019-12-10 00:19:36 +00:00
TreeHugger Robot
8566e74f15 Merge "gralloc: add flush and reread for locked buffers" 2019-12-09 22:40:14 +00:00
TreeHugger Robot
1eb2bb18eb Merge "gralloc: add reserved region" 2019-12-09 19:44:47 +00:00
Marissa Wall
2c45bb16f5 gralloc: add flush and reread for locked buffers
When a buffer is locked (mapped to the CPU) by two or more clients,
there is no good way to manage a reader/writer relationship. There are
no requirements for how the writes should propagate to the readers.
Clients must unlock and relock to be sure writes are flushed.
They must unlock and relock to get the lastest copy of the buffer.

This patch adds explicit flush and reread commands to help readers
and writers synchronize without having to unmap and remap the
buffer.

Bug: 136316517
Test: TODO

Change-Id: I10d3de1b0e46c4f3b50dc34aea653701933638a9
2019-12-09 19:41:50 +00:00
Dan Shi
5a955bc176 Convert VtsHalGraphicsMapperV*TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsMapperV2_0TargetTest \
  VtsHalGraphicsMapperV2_1TargetTest \
  VtsHalGraphicsMapperV3_0TargetTest

Change-Id: I1d4e222f3a04882ae8d74e79201c2751d1d22ea4
2019-12-06 16:05:11 -08:00
Dan Shi
9113168001 Merge "Convert VtsHalGraphicsComposerV2_3TargetTest to be parameterized test" 2019-12-06 04:24:58 +00:00
Dan Shi
fd7bbc366a Merge "Convert VtsHalGraphicsComposerV2_2TargetTest to be parameterized test" 2019-12-04 01:25:27 +00:00
Dan Shi
ae5d68fd11 Convert VtsHalGraphicsComposerV2_3TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsComposerV2_3TargetTest
Change-Id: Id9ace8eaac026df03f26ec22fbef078f9ff53728
2019-12-03 12:37:28 -08:00
Dan Shi
f2ee9c19df Convert VtsHalGraphicsComposerV2_2TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I85cfd932f420a73a4fbf1853313b8d0127157757
2019-12-03 12:31:26 -08:00
Ady Abraham
2391e8c16e composer: register only vsync_2_4 callback
Composer 2.4 extends vsync callback by exposing a new vsync_2_4
callback. Both should not be registered at the same time.

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: If41f45cab21ed16a7b2f36b3b95fb3591b04c900
2019-12-03 11:04:11 -08:00
Peiyong Lin
425b39f877 Merge "Fix bad command length calculation" am: b44c4d4cd3 am: 97a0f117e1
am: 7fcc448a64

Change-Id: Id84ccd01a2aff67986796b96fa423e2cc7ccea8c
2019-12-02 14:49:41 -08:00
TreeHugger Robot
a62efe995c Merge "gralloc: test lock YCBCR_420_888" 2019-12-02 20:51:08 +00:00
Marissa Wall
d36e12776f gralloc: add reserved region
This patch adds a reserved region of shared memory to every gralloc
native_handle_t. The reserved region of memory will allow future
versions of Android to add new buffer features without requiring
gralloc upgrades.

Bug: 145232031
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I1bdfec0a6ef85097096035d3d38e5c9e7fcc32f2
2019-12-02 10:47:42 -08:00
Marissa Wall
1b2c678bfc gralloc: test lock YCBCR_420_888
Gralloc 4 removes lockYCbCr but clients will still expect similar
functionality to lockYCbCr. This test case ensure that gralloc
will still behave sufficiently similarly when locking
YCBCR_420_888.

Bug: 141631415
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I60d2c220bab858eabe89a95b225d2816ab7289cc
2019-12-02 10:47:41 -08:00
TreeHugger Robot
59d7a1a10e Merge "gralloc: add dump buffer(s)" 2019-11-29 17:40:37 +00:00
TreeHugger Robot
7a8f64c17b Merge "graphics: fix failed VTS cases" 2019-11-27 20:34:30 +00:00
Marissa Wall
0cf075621d gralloc: add dump buffer(s)
Add functions to IMapper to dump a buffer and to dump all the
buffers in the current process. The dump includes
all gettable or settable metadata.

Bug: 141632317
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: Iaa54b899aef185867b3fd66025c0eb251a9a7bd1
2019-11-27 09:21:05 -08:00
Peiyong Lin
a5aedc3293 Clean up BeginCommand.
BUG: N/A
Test: build, flash and boot
Change-Id: Ife6132307152e271548a54e11a472751c52d95e4
2019-11-25 16:18:58 -08:00
TreeHugger Robot
83f69f0da0 Merge "gralloc: update lock and lockYCbCr" 2019-11-25 17:44:53 +00:00
Marissa Wall
78b167aa60 Merge "gralloc: list supported metadata types" 2019-11-22 19:26:20 +00:00
Marissa Wall
0129f43366 gralloc: clean up comments
Clean up code comments based on review comments in ag/9684750 and
ag/9684750.

Bug: 144551649
Test: Compiles
Change-Id: I96f5962d2c1b79352f85dcf9354689814310ecc0
2019-11-22 01:44:26 +00:00
Marissa Wall
9c5ebfc5ba gralloc: update lock and lockYCbCr
IMapper 4.0 does support lockYCbCr functionality through lock and
BufferMetadata getters. However, we will wait to add the support in
one central gralloc library. For now just stub out the call so
there aren't any compiler errors.

Bug: 141631415
Test: Compiles

Change-Id: I9d2f70c87412f8ac2114db85eb6dc01539876e2b
2019-11-21 17:43:41 -08:00
TreeHugger Robot
96276e8996 Merge "gralloc: add get and set BufferMetadata support" 2019-11-21 20:41:22 +00:00
Ady Abraham
3fd4bc2802 Merge "composer: few changes for refresh rate switching" 2019-11-21 19:39:38 +00:00
Marissa Wall
0001a5d5ba gralloc: list supported metadata types
Add function to get the metadata types supported by IMapper.
In future releases, we will add more standard types but upgrading
devices may not support those types. This function will allow the
framework to identify which metadata types the device supports.

Bug: 141632767
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I760cf054d2b6f08a52ad70f4ae60a39a63500939
2019-11-20 15:38:42 -08:00
Ady Abraham
a1df7c3d1f composer: few changes for refresh rate switching
- getDisplayConfigs is required to remain backward compatible with
   composer@2.3 and older versions. To keep it that way a new config
   attribute was added to group similar configs.
 - getSupportedDisplayVsyncPeriods was removed as the vsync period
   can be obtained by getDisplayAttribute for each individual config.
 - renamed setActiveConfigAndVsyncPeriod -> setActiveConfigWithConstraints
   to better describe what this function does.
 - added VsyncPeriodChangeTimeline and onVsyncPeriodTimingChanged

With these changes composer is expected to return all possible
configurations when getDisplayConfigs (similar to older composer versions).
The client knows whether a seamless vsync period is possible or not by
the config groups.

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: I1b4525f7e00b62cdaf260274abe4a6a5962ed1ab
2019-11-20 18:30:34 +00:00
Marissa Wall
88d87faec9 gralloc: add get and set BufferMetadata support
Add get and set functions that allow buffer metadata to be set
on the buffer.

This patch has been reviewed by vendors on AOSP. It is a combination of the
following patches. They have been squashed (and updated) to make them easier to
review. Two of the patches are proposals by ARM that have been incorporated into
this patch.

https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1107574
https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1109946
https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1124857
https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1126861

Bug: 141632767, 141631993
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I0e79d73a7687f2f5b51828a7454888e6d8ff9460
2019-11-19 14:49:02 -08:00
Long Ling
0d3fe0857a graphics: fix failed VTS cases
Return BAD_DISPLAY or BAD_PARAMETER as expected.

Bug: 140158240
Test: run vts -m VtsHalGraphicsComposerV2_2Target
Change-Id: I0f5a7103bc134ed87984bd13248aee7597a95d68
2019-11-14 11:27:00 -08:00
Marissa Wall
03b66e1ded graphics/common: add stable AIDL types
Gralloc 4 (IAllocator 4.0 and IMapper 4.0) is a HIDL interface that
will support getting and setting buffer metadata. To allow vendors to
easily add arbitrary metadata, the interface accepts metadata as a
bytestream.

Some of the metadata gralloc 4 will use is already defined in HIDL.
Unfortunately, some of the metadata was defined in composer which
is a binderized HIDL interface. IMapper is a HIDL-SP interface
so it cannot reuse composer's definitions.

Since the display HIDL interfaces will likely move to stable AIDL
soon, redefine the metadata in stable AIDL. IMapper uses a byte
stream so the types can be defined anywhere. By redefining the types
in stable AIDL, we won't have three definitons of the exact same
type in the future.

Bug: 141632767
Test: N/A - This patch just adds types. There are tests in the patches
      that use the types.

Change-Id: Icaf6200c327d71a41d66a3e66dd6890ab5c2041a
2019-11-13 10:45:16 -08:00
o.v.yevtushenko
8f76b5cfe6 Fix bad command length calculation
SET_LAYER_PER_FRAME_METADATA_BLOBS command length
was calculated wrong. With wrong length
it's impossible to read current and any next commands right.

Test: manual
Bug: 144367999

Change-Id: I09a23bbf507996972ce7de0634f8866bbb13152a
Signed-off-by: o.v.yevtushenko <o.v.yevtushenko@globallogic.com>
2019-11-13 12:18:55 +00:00
Colin Cross
3df543380c Merge "Replace -Weverything with -Wextra" am: 8c63655c3d am: 1ec7613f7f
am: fbdb441d7b

Change-Id: I7f54191688adfe167f48deb18aba0f34bd8ad292
2019-11-08 15:26:09 -08:00
Colin Cross
d180b2b83b Replace -Weverything with -Wextra
-Weverything is not recommended, use -Wextra.

Bug: 143713277
Test: mma
Change-Id: Ic5957015ebc0030b8339b263730c8d0540cf088a
2019-11-08 13:09:00 -08:00
TreeHugger Robot
0b93288c77 Merge "gralloc: name buffer at allocation time" 2019-11-07 23:13:21 +00:00
TreeHugger Robot
d9ea718964 Merge "gralloc: clarify lock access region" 2019-11-07 21:42:18 +00:00
Marissa Wall
bf9f6d39ed gralloc: name buffer at allocation time
Allow the client to name their buffer at allocation time.

b/141632767 will let the client(s) query the name of the
buffer later.

Bug: 144026910
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: Ib08c1909c10a1778c50b59e0a42ddf19140d8f03
2019-11-07 11:46:58 -08:00
Dan Shi
776ca95863 Merge "Convert VtsHalGraphicsComposerV2_4TargetTest to be parameterized test" 2019-11-07 18:33:45 +00:00
Marissa Wall
a6a2af85d7 gralloc: clarify lock access region
Update lock to clarify that if the access region is outside the
bounds of the buffer, the lock call should fail.

Bug: 141631415
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: Ic9ccac9361c8cafc59660b107686d2cbb54faf2d
2019-11-07 10:24:34 -08:00
Nick Desaulniers
daedbd7e47 [hardware][interfaces][graphics] fix -Wimplicit-int-float-conversion
IEEE 754 single precision cannot precisely represent the value of large
32b integrals. Accept the imprecision from implicit casts by making the
casts explicit.

One case is comparing the value before and after converting a float to
an int32_t and back, the other is used when printing a value.

Bug: 139945549
Test: mm
Change-Id: I23375d73cd16be0741defc6395046bd3b22d1335
Merged-in: Id30edce2cd29c0f9c24cd52ba5fb33f7c56a3100
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-11-05 14:54:06 -08:00
Nick Desaulniers
de2a5dcd48 [hardware][interfaces][graphics] fix -Wimplicit-int-float-conversion
IEEE 754 single precision cannot precisely represent the value of large
32b integrals. Accept the imprecision from implicit casts by making the
casts explicit.

One case is comparing the value before and after converting a float to
an int32_t and back, the other is used when printing a value.

Bug: 139945549
Test: mm
Change-Id: Id30edce2cd29c0f9c24cd52ba5fb33f7c56a3100
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-11-05 13:18:26 -08:00
Dan Shi
93a389c708 Convert VtsHalGraphicsComposerV2_4TargetTest to be parameterized test
Bug: 142397658
Test: TODO
Change-Id: I8aaada238d70fbcb7619f894d6aa174a2d8471c7
2019-11-01 20:08:24 -07:00
Dan Shi
1fc6aec652 Merge "Convert VtsHalGraphicsComposerV2_*TargetTest to be parameterized test" 2019-11-01 05:33:20 +00:00
Dan Shi
ff7462064d Convert VtsHalGraphicsComposerV2_*TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsComposerV2_1TargetTest
Change-Id: Idd6b0a0314be706e06f7812fbf8eb787edd078b1
2019-10-30 11:27:11 -07:00
TreeHugger Robot
0291840f76 Merge "composer 2.4: add api to control vsync period" 2019-10-29 19:07:42 +00:00
Ady Abraham
7882ae6805 composer 2.4: add api to control vsync period
Add new functions to improve vsync period switching by the platform:
 - Adding a list of supported vsync periods to Config to avoid the need to expose
   separate Configs for each vsync period.
 - Adding an API to set the vsync period with timeline constraints to allow better
   synchronization with vsync period change.
 - Extending onVsync() callback to provide the current vsync period.

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: I1a6f395d9634edadc68649d02f624f00173ec519
2019-10-29 10:14:33 -07:00
Andrew F. Davis
272ff4a626 graphics: hwc2on1adapter: Buffer hotplug event after display creation
If the HWC2 hotplug callback has not registered we buffer this event then
return, but do so too early leading to no display being created. Buffer
the event and return only after creating the display so when the callback
is registered we have a display for this hotplug event.

Test: Hotplug a display before the HWC2 hotplug callback is registered
Change-Id: I999e3fd7cbe87d12969fb2d2d82dbd956ee8d97b
Signed-off-by: Andrew F. Davis <afd@ti.com>
2019-10-28 15:34:42 +00:00
Chong Zhang
86e1aebad1 [RenderEngine] Fix test build for RenderEngine refactor
Fix build after refactor of creation flags.

BUG: 142331374
Test: build, flash and boot
Change-Id: I59c2858f8e35426e2eb08c91e8797efd738a3922
2019-10-23 12:28:08 -07:00
TreeHugger Robot
7dbc6e184e Merge "gralloc: require locked buffers follow format" 2019-10-16 22:33:24 +00:00
Marissa Wall
aa181aec49 gralloc: require locked buffers follow format
Clarify that buffers that are locked (mapped) to the CPU must
be in the format requested in their BufferDescriptorInfo.
The buffers should not be compressed/swizzled/tiled/etc.

Bug: 141631415
Test: This is already assumed by the tests.

Change-Id: Ie674117418aaefc3f99ac2bc89c3da4072e236ec
2019-10-16 11:10:43 -07:00
Steven Moreland
ab017f20cf Merge "Remove libhwbinder/libhidltransport deps" 2019-10-11 20:19:21 +00:00
Eric Chung
7e279f1a63 Merge "Refine freeBuffer in Mapper 2.0" am: 9b2431d02a am: f6e09b2ff5 am: 3057612183
am: 13a6edaab2

Change-Id: I6a410127b4604aa8e0ef0ac5c1b04df45283eb69
2019-10-10 13:10:29 -07:00
Steven Moreland
36c9ae7c5e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Ifabf28bbcfa60f8c1786256ef44dff442af99989
Merged-In: I878a4d04e65ef13f3a0ebaf64177f673958d213c
2019-10-09 16:19:44 -07:00
Treehugger Robot
9b2431d02a Merge "Refine freeBuffer in Mapper 2.0" 2019-10-08 23:17:06 +00:00
TreeHugger Robot
dd7ddab13e Merge "composer: Add getDisplayConnectionType" 2019-10-03 19:47:13 +00:00
Alistair Delva
fc8d43692c Merge "Make gralloc0 pass-through mapper handle layers" am: b756e23e5c am: 6982d1aec5 am: 6c3213c940
am: afc577e108

Change-Id: I54f2e01bf8ffe43dbe786a73cfd7818661230090
2019-10-03 06:48:29 -07:00
Alistair Delva
b756e23e5c Merge "Make gralloc0 pass-through mapper handle layers" 2019-10-03 13:02:13 +00:00
Dominik Laskowski
ce44a4b363 composer: Add getDisplayConnectionType
Distinguish between internal and external displays, to obviate assuming
that the first display is internal and subsequent displays are external.

Note that connector types (e.g. DSI, HDMI, DisplayPort) are not enumerated,
since that information is irrelevant for internal connections, and can be
extracted from the EDID for external connections in the few cases where it
matters, e.g. gating features like daisy chaining and content protection.

Bug: 134771872
Test: Build
Change-Id: I8a27e4ef569626620711910fcbaed5a7e12e6870
2019-10-02 15:10:41 -07:00
Steven Moreland
82b84148c7 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I878a4d04e65ef13f3a0ebaf64177f673958d213c
2019-10-02 12:50:29 -07:00
Jason Macnak
8b5b9fb52c Make gralloc0 pass-through mapper handle layers
Gralloc0 does not support layers. This change is needed for Cuttlefish
to pass the GraphicsMapperHidlTest.ValidateBufferSizeBadValue VTS test

Bug: b/132087346
Test: vts-tradefed run commandAndExit vts -m VtsHalGraphicsMapperV2_1Target
Change-Id: I2ed7dae209629d401ccaf2fc0fd992d766b0fa9b
2019-09-27 09:58:45 -07:00
Max Zhang
aed6aa8c2e yukawa: adapt different YCC orders am: 59b31c9b90 am: b21fd17efe am: 4a2baa9256
am: b21fd61f56

Change-Id: I2e4344503fd62cd0346c61bf745c7638f3651b3b
2019-09-25 12:00:03 -07:00
Max Zhang
59b31c9b90 yukawa: adapt different YCC orders
The order of the planes doesn't matter, therefore enable mapper
adapter to support YCbCr and YCrCb both.

test: manual
bug: 141006723
Change-Id: Iad0d5159c1b38b12bc90a07f937db002471aad1e
2019-09-24 11:38:07 -07:00