Commit graph

645 commits

Author SHA1 Message Date
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
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