Commit graph

901 commits

Author SHA1 Message Date
Chih-Hung Hsieh
ad1bf31b78 Add timed out test files to tidy_timeout_srcs
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
  the following settings:
    TIDY_TIMEOUT=90
    WITH_TIDY=1
    CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
  tidy_timeout_srcs files will not be compiled by clang-tidy.
  When developers build locally without TIDY_TIMEOUT,
  tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
  or disable some time consuming checks, and then
  enable clang-tidy to run within limited time.

Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
2022-02-18 17:25:41 -08:00
Treehugger Robot
95ad078d75 Merge "Add a top-level OWNERs" 2022-02-04 21:38:21 +00:00
John Reck
b09556a1e9 Add a top-level OWNERs
Test: N/A
Change-Id: I21cd4888b3141dd272fcc72e880402b2ca84bc50
2022-02-03 19:58:21 -05:00
Treehugger Robot
5afd5eba36 Merge "Add OWNERS file for android/hardware/graphics/common" 2022-01-24 21:55:59 +00:00
Leon Scroggins III
38c446f3b7 Add OWNERS file for android/hardware/graphics/common
Suggested in I6f6b7f22e76609151a413ca6a6dbf55bd91911dd.

Bug: NA
Test: NA
Change-Id: Ifc55e56ee912d822adb458818da30b737a89ef5a
2022-01-24 19:58:39 +00:00
Roman Stratiienko
bf928e775d composer: 2.4: vts: Add missing COMPOSER_OVERLAY allocation flag
Without this flag, the composer will fail to PRESENT the buffer on
the systems that do not have IOMMU support and can scanout contiguous-
only buffers.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Change-Id: I566534a2a1fb602c0ce69ef861805d4fb03d7c47
2022-01-21 10:49:47 +02:00
Ady Abraham
7b957abe49 Add alecmouri to composer OWNERS
Change-Id: I01a0958e1371ba0e6a92d7f5f0d19ce0acdb7604
2022-01-14 17:10:25 +00:00
Kui1 Wu
ada2850cfb fix VtsHalGraphicsComposerV2_2TargetTest timeout failed
run VtsHalGraphicsComposerV2_2TargetTest will timeout failed
when there is dual displays. use `std::unordered_set` Display type,
`std::vector<Display>(mDisplays.begin(), mDisplays.end())` as
getDisplays return value, mDisplays elements order may not be
same as the order of hotplug events during boot matters.
We should store `mDisplays` as `std::vector`, since the order of
hotplug events during boot matters in determining the primary display.

Bug: 209409863
Test: run vts -m VtsHalGraphicsComposerV2_2TargetTest

Signed-off-by: Kui1 Wu <wukui1@xiaomi.com>
Change-Id: I628ad593640f28fb8a916822a91ac2c578cc299d
2021-12-16 08:18:15 +00:00
Treehugger Robot
cb0667c916 Merge "Update OWNERS for VtsHalGraphicsComposer tests." 2021-10-20 19:28:03 +00:00
Yiming Pan
cd9afdf0af Update OWNERS for VtsHalGraphicsComposer tests.
Test: Tree Hugger
Bug: 143903671
Change-Id: I228402a350ecccac92dea7c5facde60496ba3e6e
2021-10-18 17:28:00 -07:00
Treehugger Robot
b350c7cf49 Merge "Revert "VTS: Test that configs in a group differ only by vsync period"" 2021-10-18 21:39:37 +00:00
Treehugger Robot
184c1b546c Merge "Revert "Clarify the ComposerClient comment for CONFIG_GROUP"" 2021-10-18 20:56:12 +00:00
Snild Dolkow
0e9328e213 Revert "Clarify the ComposerClient comment for CONFIG_GROUP"
This reverts commit 37c5495c52.

This "clarification" was in fact a change of the HAL interface,
introducing a new requirement which was not present in earlier
Android releases. There are devices on the market that switch
seamlessly between configs that differ in resolution and DPI,
and therefore have those configs in a config group.

Bug: 200184776
Merged-In: I5bba1c6532f5f46da874385164a0bc0cc0435225
Change-Id: I5bba1c6532f5f46da874385164a0bc0cc0435225
2021-10-18 20:55:31 +00:00
Snild Dolkow
bf484a6adb Revert "VTS: Test that configs in a group differ only by vsync period"
This reverts commit 6f36dd6e31.

Differing only by vsync period was not a requirement on Android R, and
it shouldn't be added after-the-fact to an existing HAL version.

There are devices on the market that switch seamlessly between configs
that differ in resolution/dpi, and therefore have those configs in a
common group.

Bug: 200184776
Change-Id: Id0bfc67e55d5139fddb2b359cabafd9281c33734
2021-10-18 20:31:52 +00:00
Yiming Pan
af359f3acf Backfill OWNERS for VtsHalGraphicsMapper tests.
Done for the following tests:
VtsHalGraphicsMapperV2_0TargetTest
VtsHalGraphicsMapperV2_1TargetTest
VtsHalGraphicsMapperV3_0TargetTest
VtsHalGraphicsMapperV4_0TargetTest

Deleted the OWNERS file I created earlier to comply to your team's
convention.

Test: Tree Hugger
Bug: 143903671
Change-Id: I07790171fc1a42da37a43f590d8c5c2876ad1bfe
2021-10-14 17:45:53 -07:00
Treehugger Robot
6a05c72c88 Merge "Add OWNERS for VTS module VtsHalGraphicsMapperV2_0TargetTest" am: b430616db8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1793849

Change-Id: I2aebbe027325e03fd4c7116c01ea35e17cfb35d9
2021-09-14 23:29:40 +00:00
Treehugger Robot
b430616db8 Merge "Add OWNERS for VTS module VtsHalGraphicsMapperV2_0TargetTest" 2021-09-14 22:15:53 +00:00
Treehugger Robot
39c17d609a Merge "Add OWNERS for VTS module VtsHalGraphicsComposerV2_1TargetTest" am: 0940838b4e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1793848

Change-Id: I7185e2f53d63750a9e6c8d2e33d2ac3b2f2b43da
2021-09-09 23:18:58 +00:00
Treehugger Robot
b89aaa92b9 Merge "Add OWNERS for VTS module VtsHalGraphicsMapperV2_1Target" am: b35b78f7ac
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1793850

Change-Id: Idda97bda2ccf3e4c3deff2a9ef8fe0f9a5d6ac9b
2021-09-09 23:18:50 +00:00
Treehugger Robot
0940838b4e Merge "Add OWNERS for VTS module VtsHalGraphicsComposerV2_1TargetTest" 2021-09-09 22:52:25 +00:00
Treehugger Robot
b35b78f7ac Merge "Add OWNERS for VTS module VtsHalGraphicsMapperV2_1Target" 2021-09-09 22:52:15 +00:00
Steven Moreland
0b1806955f .graphics.common: use versions for imports am: b196a659d2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814145

Change-Id: If449bda3ddbde40ce4920a4687115f59e6529231
2021-08-31 17:09:35 +00:00
Steven Moreland
b196a659d2 .graphics.common: use versions for imports
This makes sure that when developers add a new version of an interface,
or when interfaces are being frozen, the runtime/buildtime situation of
clients depending on those interfaces remains the same. This is required
for AIDL to continue working at scale.

Bug: 188871598
Test: build
Change-Id: I5d85ed0f8d5cbeb0ec20659def492bc97787d9a9
2021-08-30 17:56:06 -07:00
Yiming Pan
521c56b62a Add OWNERS for VTS module VtsHalGraphicsMapperV2_1Target
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I871c2ca756593107e75a1265e351644062a3ac5d
2021-08-11 16:39:52 -07:00
Yiming Pan
6022ba83d4 Add OWNERS for VTS module VtsHalGraphicsMapperV2_0TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I6e760696cf6e4e5785ddec4ff8c74c12005ecbae
2021-08-11 16:39:46 -07:00
Yiming Pan
bbb7b0aa69 Add OWNERS for VTS module VtsHalGraphicsComposerV2_1TargetTest
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I6647af3a0af6cb707904a454eef78c6c509035ec
2021-08-11 16:39:37 -07:00
Marin Shalamanov
b0fefa2d97 Merge "Increase timeout for VtsHalGraphicsComposerV2_4TargetTest" into sc-dev am: b2239ad43f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15503010

Change-Id: Ifa71accba7ecf2ab15980227a4413831cfceb187
2021-08-10 15:44:56 +00:00
Marin Shalamanov
e7a2d287b2 Increase timeout for VtsHalGraphicsComposerV2_4TargetTest
The current timout of 5 mins is not enough for
setActiveConfigWithConstraints to complete on devices
which have ~30 display modes and which can't do seamless
switching. The test needs 8 mins to complete locally --
increasing the timeout to 15 to have some margin.

Bug: 188686850
Test: atest VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I07cf1825c23e2467852d5cd93436eb9dee23b408
2021-08-09 17:57:33 +02:00
Jiyong Park
48131c0ace Merge "Remove ndk_platform backend. Use the ndk backend." am: 2346a4c6b9 am: 4ef9aa49dc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1778908

Change-Id: Ib35b7b0ddc0bebd0714d290b1ac2fab8d5a1893e
2021-07-28 12:39:05 +00:00
Jiyong Park
27f77fefd7 Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same 'ndk' backend.

Bug: 161456198
Test: m
Change-Id: Ibe8beeaf0d1b33968fb782f1f70c17ae9e9bf871
2021-07-27 14:44:47 +09:00
Marin Shalamanov
056def9ff0 Merge "VTS: Validate that getDisplayIdentificationData returns EDID" into sc-dev am: 5c6c68ab0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15080630

Change-Id: I5680c2be100864071f4013b90eee5619befb2424
2021-07-23 10:24:31 +00:00
Marin Shalamanov
5c6c68ab0b Merge "VTS: Validate that getDisplayIdentificationData returns EDID" into sc-dev 2021-07-23 10:15:17 +00:00
Alec Mouri
981a3c1a66 Merge "Clear composition changes when a color mode is not supported" into sc-dev am: f569528b19
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15244526

Change-Id: Ia3186d6d30fcaab371cee4adba50108a61fff515
2021-07-09 21:29:39 +00:00
Alec Mouri
b1bd1e8a32 Clear composition changes when a color mode is not supported
Otherwise this may cause a test to spuriously fail during teardown.

Bug: 184726169
Test: VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I569680a0fe6c866199ba0711e8cc263b9b3efd58
2021-07-09 11:15:18 -07:00
Marin Shalamanov
d65b354dee VTS: Validate that getDisplayIdentificationData returns EDID
Accroding to the documentation getDisplayIdentificationData
"data is the EDID 1.3 blob identifying the display".

This CL runs a basic validation that the returned data is
an EDID.

Test: atest VtsHalGraphicsComposerV2_3TargetTest
Bug: 191851265
Change-Id: I7604f3dc68095612d79bb04243918d6348de6c89
2021-07-06 13:52:04 +02:00
Treehugger Robot
555c368ddb Merge "Replace writepid with task_profiles command for cgroup migration" am: a43f14bdac am: 7151796908
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1740279

Change-Id: I8c9ebb5de59a2b8a87c8045cfc8c64b71eac0f10
2021-06-23 23:09:57 +00:00
Suren Baghdasaryan
dd50b2f45d Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I249ecc45a001a69d73b06b77154f9b6e5f9964d9
2021-06-23 18:43:27 +00:00
Marin Shalamanov
513ae73a91 VTS: Free allocated buffers
The native handle was not freed which causes some devices to
run out of memory when executing the test. This change
creates a RAII wrapper around native_handle_t, which
automatically deallocates buffers when they go out of scope.

Bug: 188686850
Test: atest VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I19a22a5a3202e048de77926ce4a116a31d9de906
2021-06-16 12:46:56 +02:00
Marin Shalamanov
f876a7d123 Update OWNERS for composer/2.1/vts
Update the OWNERS file to match the respective files
from 2.2, 2.3 and 2.4.

Bug: 188686850
Test: n/a
Change-Id: I0ff9923695813da3dbec1aa94fe1a2bd988e521e
2021-06-16 12:46:24 +02:00
Ady Abraham
8bd3c2f00f composer: 2.4: vts: do not try to delay a config change outside a group
When switching to a new config, we can set the desiredTimeNanos to
be in the future only for configs within the same config groups.

Bug: 190250110
Test: atest VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I5e292b656eccf6e90c06e08c6eb202d689b6f026
2021-06-08 17:03:20 -07:00
Jiyong Park
72b6359859 Freeze AIDL APIs for SC
Ignore-AOSP-First: part of SC finalization

Bug: 188713899
Test: m
Change-Id: Iee18cd05954dc8ea08cc4f985499a70977d1af4f
2021-05-25 10:13:26 +09:00
Jooyung Han
2af836b6e9 Merge changes from topic "fix-aidl-warnings" am: a886a5c4be am: 5235704ac4 am: bf1ec6e83e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1688165

Change-Id: I2eedb65bacef6075d5cf825749915262c25f4727
2021-04-27 23:49:08 +00:00
Jooyung Han
695ef7acfe aidl: Set explicit defaults to enum-type fields
Fixes: 179853398
Test: mma in hardware/interfaces/graphics
Change-Id: I6f93bca4ba3c8d538765fc9a811b9050c6142cc3
2021-04-27 12:17:39 +09:00
Ady Abraham
bd6647b45c composer: VtsDisplay::setDimensions shouldn't be const am: 2fff170562 am: e8bc48b777 am: 8ae4e17e41
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1686815

Change-Id: I2673c622eeda517366515369a3f35235df7b1d6c
2021-04-26 22:08:58 +00:00
Ady Abraham
2fff170562 composer: VtsDisplay::setDimensions shouldn't be const
Fix the usage of const attribute in VtsDisplay

Test: run composer 2.4 VTS
Bug: 185195256
Change-Id: I616ea044f46bc080ad0e82753b5031d9a38369f3
2021-04-26 12:00:06 -07:00
Ady Abraham
c801385495 composer: update VtsDisplay dimensions
When the active config changes, the display dimension might change
as well, so we need to update it to match the active config.

Test: run composer 2.4 VTS
Bug: 185195256
Change-Id: Ie2671e61498d2501901885b2a9986ee1974bd641
Merged-In: Ie2671e61498d2501901885b2a9986ee1974bd641
2021-04-22 18:56:46 +00:00
Ady Abraham
bd7ea386c9 composer: update VtsDisplay dimensions
When the active config changes, the display dimension might change
as well, so we need to update it to match the active config.

Test: run composer 2.4 VTS
Bug: 185195256
Change-Id: Ie2671e61498d2501901885b2a9986ee1974bd641
2021-04-22 00:06:32 +00:00
Alec Mouri
bdd7e7e511 Update Readback VTS to align with RenderEngine interface change
RenderEngine no longer directly takes in GraphicBuffer objects. Instead,
it takes in ExternalTexture types that manage resources associated with
a GraphicBuffer.

Bug: 180767535
Test: builds
Change-Id: I13904eec491fce223b6178fa5571589b67402865
2021-04-13 11:01:50 -07:00
Michael Butler
8c4f0fcfc0 Improve the structure of NNAPI AIDL Memory
Prior to this change, the NN AIDL HAL created a Memory struct analogous
to hidl_memory, consisting of a name, size, and native handle. However,
this Memory struct is not very structured, and requires both the client
and server to agree on how the data should be interpreted.

This CL tightens the structure of the Memory representation by
introducing Ashmem and MappableFile structs to android.hardware.common
in order to hold specific file descriptors representing memory regions.
Further, this CL redefines android.hardwre.neuralnetworks's Memory
object as a union of the Ashmem, MappableFile, and (existing)
HardwareBuffer memory types.

This change also adds "com.android.neuralnetworks" to the graphics
AIDL HAL's apex_available build rule.

Bug: 183118727
Test: mma
Change-Id: I32322df676b83597c9e95f13662c322a6a80accc
Merged-In: I32322df676b83597c9e95f13662c322a6a80accc
(cherry picked from commit 1158c80ff6)
2021-04-09 02:09:16 +00:00
Michael Butler
dd53d04d8c Improve the structure of NNAPI AIDL Memory
Prior to this change, the NN AIDL HAL created a Memory struct analogous
to hidl_memory, consisting of a name, size, and native handle. However,
this Memory struct is not very structured, and requires both the client
and server to agree on how the data should be interpreted.

This CL tightens the structure of the Memory representation by
introducing Ashmem and MappableFile structs to android.hardware.common
in order to hold specific file descriptors representing memory regions.
Further, this CL redefines android.hardwre.neuralnetworks's Memory
object as a union of the Ashmem, MappableFile, and (existing)
HardwareBuffer memory types.

This change also adds "com.android.neuralnetworks" to the graphics
AIDL HAL's apex_available build rule.

Bug: 183118727
Test: mma
Change-Id: I32322df676b83597c9e95f13662c322a6a80accc
Merged-In: I32322df676b83597c9e95f13662c322a6a80accc
(cherry picked from commit 1158c80ff6)
2021-04-07 12:54:18 -07:00