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