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
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
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
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
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
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
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
GTEST_SUCCEED() does not cause a GTEST to return. Insert a
return after every GTEST_SUCCEED().
Test: VtsHalGraphicsMapperV4_0
Bug: 149008032
Change-Id: I65637e7a0ac9a9ac8d69c9d8ccbb427543d82428
sampleIncrementInBits is per sample not per component. An RGBA sample
is 32 bits not 8.
Test: VtsHalGraphicsMapperV4_0
Bug: 149310539
Change-Id: If4bd5aac87cada7040f52ee40159a72fa72a97be
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
Move crop out of PlaneLayout so it can be set and get independently
from PlaneLayout.
Bug: 141632767
Test: atest VtsHalGraphicsMapperV4_0
Change-Id: Ib685c0a065754e3e3bd697d3518b03b4c76d447e
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Clean up code comments based on review comments in ag/9684750 and
ag/9684750.
Bug: 144551649
Test: Compiles
Change-Id: I96f5962d2c1b79352f85dcf9354689814310ecc0
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
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
- 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
Return BAD_DISPLAY or BAD_PARAMETER as expected.
Bug: 140158240
Test: run vts -m VtsHalGraphicsComposerV2_2Target
Change-Id: I0f5a7103bc134ed87984bd13248aee7597a95d68
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
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>
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
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
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>
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>
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
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>
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
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Ifabf28bbcfa60f8c1786256ef44dff442af99989
Merged-In: I878a4d04e65ef13f3a0ebaf64177f673958d213c
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
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I878a4d04e65ef13f3a0ebaf64177f673958d213c
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
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
This warning was turned off globally but it is only needed for few
projects. Move the flag to the individual project blueprint files.
Test: presubmit
Change-Id: I55163067ac5038f1650ad12300bf72a48f179b8e
When users call Mapper:freeBuffer, Mapper will erase buffer handle from mBufferHandles.
No matter the result of free buffer handle returned from gralloc, buffer handle is removed from mBufferHandles.
This means that a buffer handle can not be freed twice, even if it fail to be freed at the first time.
Because users will receive nullptr when they call freeBuffer to free the same bufferHandle at the second time.
When freeBuffer is called, Mapper only looks for input buffer in mBufferHandles instead of erasing it from mBufferHandles.
If the result of freeBuffer returned by gralloc is NONE, then remove the buffer handle from mBufferHandles.
Test: Manual
Bug: 141145482
Change-Id: I4e27f54eb219f23a5844d6b440d7160b296c31e2
For reasons unknown, HWC2_CAPABILITY_SKIP_VALIDATE was never added to
the IComposer hal. However, we would like to tell the client that the
device has this capability when it is returned during a getCapabilities
query. We manually add it to the list of IComposer::Capability
(static_cast should be ok since the IComposer::Capability has a fixed
underlying type of int32_t, and HWC2_CAPABILITY_SKIP_VALIDATE = 4 is in
this range). Checking that device has skip validate functionality in
relevent test as well
Bug: 140813883
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I5f28268c4e6edeb2895502c5f4e009cebb566100
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
Fix for issue: "[GSI XR] VrFlinger doesn't work on GSI/MTP845.
Making member variables protected instead of private for the 2.3
interface, which is the behavior in the 2.1 interface.
"vr_composer_client" needs to access the "mResources" and "mHal" class
member to be able to create the ComposerCommandEngine.
Bug: 137325030
Bug: 138938154
Bug: 137448042
Test: Built the firmware and ran the dvr_display-test, which passes
now.
Change-Id: I0f531d4dd6d60a3f2da793f19b4d3ea1eb53930e
composer@2.x-hal is a header library. Any of the shared
libraries it depends on must also be included by anyone
who includes composer@2.x-hal. This means when we add a new
version of mapper, anyone who uses composer@2.x-hal must
also include the new version of the mapper. Vendors
that depend on composer@2.x-hal are broken every time we
add a new mapper.
This patch refactors ComposerResources into a seperate
shared library. ComposerResources contains all of the
mapper code. composer@2.x-hal will depend on the new
composer@2.x-resource hal. Everyone downstream must
also add the composer@2.x-resource file now. However,
they will not be broken again when we add a new mapper
version.
Bug: 136016160
Test: Compiles and boots
Change-Id: I208a954a941ed65938074cd3efb8a6893a2bc1eb
Upstream change adds a new RenderEngine dependency, adding the dependency
here to fix compilation issue.
Bug: 136806342
Bug: 137191934
Test: builds
Change-Id: I8c097dd162afb79d36269741af00d0e69cf77c2a
Rev the IAllocator/IMapper HIDL interfaces to 4.0. This patch is
a copy paste from IAllocator/IMapper 3.0.
Bug: 136016160
Test: Compiles and boots
Change-Id: Ia7f159f97fe0f812b5f0e10a850715364090883c
Problem:
VtsHalGraphicsComposerV2_1Target#GraphicsComposerHidlCommandTest.PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES fail
the testcase setcolormode SRGB without check if current device support SRGB
Solution:
change setColorMode from SRGB to NATIVE
Verify:
verify in on franklin
Bug: 135375302
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I646c263d96b03f9d30e6563a45cff37835001609
Merged-In: I5eebe5f530e3b62037d669992cf2eca0849f10be
(cherry picked from commit 70e5b556ef)
Create place holder for composer 2.4.
Minor: Extend DisplayCapability to include protected contents.
BUG: 135929065
Test: build
Change-Id: I9dbdb21f4a69027bedd95cd54e9c3c652bbe9006
Problem:
VtsHalGraphicsComposerV2_1Target#GraphicsComposerHidlCommandTest.PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES fail
the testcase setcolormode SRGB without check if current device support SRGB
Solution:
change setColorMode from SRGB to NATIVE
Verify:
verify in on franklin
Bug:135375302
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I5eebe5f530e3b62037d669992cf2eca0849f10be