Commit graph

686 commits

Author SHA1 Message Date
Steven Moreland
36f210147d graphics.composer@2.2 rc remove interface decls
Since vendors here add additional services to this service,
vts_ibase_test fails on some devices. This test, for sanity,
requires that if a service has any interface declaration, it has
all relevant interface declarations. These interface entries are
declared but unused here.

Fixes: 152375928
Test: vts_ibase_test on sargo
Change-Id: I2d3225b42824f0befb55d8c93a578e910a05e4a1
2020-04-03 15:58:29 +00:00
Steven Moreland
d9eb0d743c graphics common: fix AIDL BufferUsage calculation
This was hitting integer sanitization, which we are trying to turn on:
Before:
    VENDOR_MASK_HI = -65536L,
After:
    VENDOR_MASK_HI = -281474976710656L,

Bug: 148149098
Test: manually check output (see above).
Change-Id: I1e2d7c0225aec8bf67375eb6b0cdc919b4ece847
2020-03-20 15:55:22 -07:00
TreeHugger Robot
ae7e3c0765 Merge "Remove duplicated comment section" into rvc-dev 2020-03-13 20:41:29 +00:00
TreeHugger Robot
68dbdf4a48 Merge "gralloc4-vts: fix GetLargeReservedRegion test" into rvc-dev 2020-03-10 23:05:49 +00:00
Valerie Hau
9fe0114a33 Merge "vts: VtsHalGraphicsMapperV2_1TargetTest fixup's" into rvc-dev 2020-03-10 21:21:21 +00:00
Jason Macnak
c1b5b52c70 gralloc4-vts: fix GetLargeReservedRegion test
The existing test never assigns a handle to bufferHandle so
mGralloc->getReservedRegion() will always be called with
nullptr and will always return with BAD_BUFFER.

Bug: b/146515640
Test: VtsHalGraphicsMapperV4_0Target
Change-Id: I85dac94956c6b9db5b4a19faeb16fc947f7457e1
2020-03-10 13:39:49 -07:00
Jason Macnak
b3c511d51d Remove duplicated comment section
The comment section about vendor extensions is already on lines
330-336 and should not appear inside the comment about a specific
non-vendor extension format.

Bug: b/151105493
Test: n/a
Change-Id: I0559b3157f21e2ab23d8c4a53d2a0d74ebb40561
2020-03-10 11:41:01 -07:00
Pierre Couillaud
9894812dd1 vts: VtsHalGraphicsMapperV2_1TargetTest fixup's
1) handles allocated through 'allocate' should be removed through
   'freeBuffer'.

2) make use of intended buffer handle in GetTransportSizeBadBuffer.

Bug: 146444563
Test: build, boot, VtsHalGraphicsMapperV2_1TargetTest
Change-Id: I6c1a67fc36dbc653ec2ada6a335d685d21e82800
Signed-off-by: Pierre Couillaud <pierre.couillaud@broadcom.com>
2020-03-10 08:33:01 -07:00
TreeHugger Robot
42a5bfd93d Merge "graphics-common: fix documentation typo" into rvc-dev 2020-03-09 23:05:23 +00:00
Marissa Wall
4c23d2faaf graphics-common: fix documentation typo
Bug: 149049926
Test: Compiles

Change-Id: I21d264376c09bcfd4394819245aa8284d0710633
2020-02-28 17:52:54 +00:00
Marissa Wall
67829613c0 gralloc4-vts: RGBA_8888 sampleIncrementInBits should be 32
SampleIncrementInBits is the delta between samples not components.
It should be 32 for RGBA_8888.

Test: VtsHalGraphicsMapperV4_0
Bug: 150461327

Change-Id: Idf283b93cd0243fa33eabac23185c513825d83ca
2020-02-28 17:43:46 +00:00
Marissa Ikonomidis
a66c632f8f Merge "gralloc4-vts: don't wait on invalid sync fence" into rvc-dev 2020-02-26 18:05:47 +00:00
Marissa Ikonomidis
f1b3ea2398 Merge "gralloc4-vts: correctly instantiate std::optional" into rvc-dev 2020-02-26 18:05:06 +00:00
TreeHugger Robot
15f12a26fb Merge "composer: vts: check that refresh rate stays the same on inactivity" into rvc-dev 2020-02-26 10:11:31 +00:00
Ady Abraham
9c1d0adb3f composer: vts: check that refresh rate stays the same on inactivity
Bug: 147890947
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I9e1bc1325701ca1603251cc499712f11aa86d30e
2020-02-25 17:44:31 -08:00
TreeHugger Robot
74a1dce5bd Merge "gralloc4: Add RAW PlaneLayoutComponentType" into rvc-dev 2020-02-25 22:25:41 +00:00
Marissa Wall
de19a7e614 gralloc4-vts: don't wait on invalid sync fence
Sync fences can be invalid if the buffer is already ready. If the
fence is invalid, we do not need to wait.

Test: VtsHalGraphicsMapperV4_0
Bug: 150213134

Change-Id: I8326d5f8b358c466ee9a686fd299daed1d4b4aa8
2020-02-25 17:44:46 +00:00
Marissa Wall
e6e1b68449 gralloc4: Add RAW PlaneLayoutComponentType
RAW12 and RAW16 buffers need a PlaneLayoutComponentType. Add a RAW
type so vendors don't have to add private RAW types.

Test: VtsHalGraphicsMapperV4_0
Bug: 149869426

Change-Id: Idf1fa609e3a1506c3c87af22d4c548cf1218fad1
2020-02-25 17:44:34 +00:00
Marissa Wall
e2127863fb gralloc4-vts: correctly instantiate std::optional
std::optional defaults to containing std::nullopt_t. Using "->" or
"." on an std::optional object that does not contain a value is
undefined. Clang seems to ignore the whole line.

SetSmpte2086 and SetCta861_3 both incorrectly instantiate their
std::optional types. The std::optional types contain std::nullopt_t
when they are passed into encode. When mapper decodes the fields,
they are empty.

Update std::optionals to be instantiated correctly.

Bug: 149931805
Test: VtsHalGraphicsMapperV4_0

Change-Id: I046242f8261a5378228231b89b2eedec242667cb
2020-02-25 17:43:29 +00:00
Marissa Wall
3a7515065b gralloc4-vts: fix bad comparisions in VTS
The parameter order of a couple checks is wrong.

For example:
EXPECT_GT(val1, val2) is EXPECT_TRUE(val1 > val2)
so EXPECT_GT(0, X) can never be true.

Update the tests to be correct.

Test: VtsHalGraphicsMapperV4_0
Bug: 149739702

Change-Id: I21070a912b6014acc5feb63b6b19912b45fe8f5f
2020-02-25 17:43:21 +00:00
TreeHugger Robot
7704cfb914 Merge "gralloc4-vts: setting USAGE is always BAD_VALUE" 2020-02-20 21:15:43 +00:00
Marissa Wall
2e9bf64c5e gralloc4-vts: setting USAGE is always BAD_VALUE
Usage cannot be change after allocation. Mapper must return
BAD_VALUE. SetConstantMetadata already tests this. Remove
the tests that attempted to set USAGE and expected it could
succeed.

Test: VtsHalGraphicsMapperV4_0
Bug: 149830560

Change-Id: I730dd3f3c0c48946c436e8fb60256365e0d9ab1e
2020-02-20 10:08:31 -08:00
Adam Bodnar
44f9c690fa Merge "Explicitly destroy render engine in RenderEngineVts" 2020-02-19 18:19:05 +00:00
Adam Bodnar
6c3929cc33 Explicitly destroy render engine in RenderEngineVts
The GLES driver appears to be left in a bad state without destroying the
render engine instance explicitly after every test case.

Bug: 149043811
Test: build, adb push out/target/product/<platform>/testcases/VtsHalGraphicsComposerV2_2TargetTest/<abi>/VtsHalGraphicsComposerV2_2TargetTest /data/local/tmp && adb shell /data/local/tmp/VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I8e3c4e30eaa2ef3b9831da7b335b9a830be4b4ed
2020-02-18 13:34:27 -08:00
Automerger Merge Worker
30425b854e Merge "Fix VTS fail for GraphicsMapperHidlTest" am: eef384a88e am: a5439e227c am: 9091f86903
Change-Id: I092c9b06535a4df77440e3a798bb079bc39418db
2020-02-18 21:24:45 +00:00
TreeHugger Robot
368c0d9efe Merge "gralloc4-vts: return after GTEST_SUCCEED" 2020-02-18 17:25:45 +00:00
TreeHugger Robot
f699cbff74 Merge "gralloc4-vts: update sampleIncrementInBits" 2020-02-18 17:25:41 +00:00
mtk07406
e308ceb1e9 Fix VTS fail for GraphicsMapperHidlTest
VTS_10 testing item VtsHalGraphicsMapperV2_1Target fail due to
Gralloc0 HAL do not have return value : BAD_VALUE and BAD_BUFFER
so add Error::BAD_VALUE and Error::BAD_BUFFER as return value to
fix this VTS fail.

Bug: 146034198
Test: ran VtsHalGraphicsMapperV2_1Target 10 times and it all pass.
Change-Id: I792830ddf98cbf59de7d3a7b4dd4cf5f72269244
2020-02-14 10:25:19 +08:00
Marissa Wall
66d459ce87 gralloc4-vts: return after GTEST_SUCCEED
GTEST_SUCCEED() does not cause a GTEST to return. Insert a
return after every GTEST_SUCCEED().

Test: VtsHalGraphicsMapperV4_0
Bug: 149008032
Change-Id: I65637e7a0ac9a9ac8d69c9d8ccbb427543d82428
2020-02-13 11:44:32 -08:00
Marissa Wall
b6809a06ad gralloc4-vts: update sampleIncrementInBits
sampleIncrementInBits is per sample not per component. An RGBA sample
is 32 bits not 8.

Test: VtsHalGraphicsMapperV4_0
Bug: 149310539

Change-Id: If4bd5aac87cada7040f52ee40159a72fa72a97be
2020-02-13 11:44:20 -08:00
TreeHugger Robot
9246557927 Merge "gralloc4: fix SetConstantMetadata and SetBadMetadata" 2020-02-11 17:23:53 +00:00
TreeHugger Robot
d48a7be8a3 Merge "gralloc4: move crop to seperate metadata type" 2020-02-11 17:20:06 +00:00
Marissa Wall
8d05644989 gralloc4: fix SetConstantMetadata and SetBadMetadata
SetConstantMetadata was trying to set constant metadata
with bad values. SetBadMetadata was also trying to set
constant metadata with bad values. Update SetConstantMetadata
to set constant metadata with good values. Remove constant
metadata from the SetBadMetadata test.

Bug: 149004202
Test: VtsHalGraphicsMapperV4_0

Change-Id: I6816fca64c7ac89e457628e94bc06bc1b05c916f
2020-02-10 12:37:35 -08:00
Marissa Wall
b0923641d6 gralloc4: move crop to seperate metadata type
Move crop out of PlaneLayout so it can be set and get independently
from PlaneLayout.

Bug: 141632767
Test: atest VtsHalGraphicsMapperV4_0

Change-Id: Ib685c0a065754e3e3bd697d3518b03b4c76d447e
2020-02-10 11:45:21 -08:00
Ady Abraham
f6820b2b44 composer: add TestCommandReader to 2.4
Add a TestCommandReader to composer 2.4 VTS to parse correctly the
new commands introduced in 2.4.

Test: adb shell /data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Bug: 149124892
Change-Id: Ide4f98fa3bfc771e4095cc672f59b87e1aa03427
2020-02-10 11:24:04 -08:00
Dan Shi
b5fd31a128 Remove reference of VtsHalHidlTargetTestBase
All grahpics composer HAL tests have been converted to parameterized
gtest.

Bug: 147894326
Test: atest VtsHalGraphicsComposerV2_1TargetTest \
  VtsHalGraphicsComposerV2_2TargetTest \
  VtsHalGraphicsComposerV2_3TargetTest \
  VtsHalGraphicsComposerV2_4TargetTest

Change-Id: I84515a5698035d7ceb299a5cc140ecd7bb28fe84
2020-02-01 13:27:55 -08:00
TreeHugger Robot
88bc2bd38f Merge "graphics/common: fix typo" 2020-01-24 19:58:30 +00:00
Marissa Wall
de0f476284 graphics/common: fix typo
Bug: 141632767
Test: Compiles
Change-Id: I6a6fd7f808a896d78ca641cbb4cd8aea9ce63875
2020-01-23 11:19:25 -08:00
TreeHugger Robot
a207171b50 Merge "Add generic layer metadata to Composer 2.4" 2020-01-23 15:35:44 +00:00
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