Commit Graph

819 Commits

Author SHA1 Message Date
Ana Krulec
aad9fe4a2e Merge "Moving composer@2.1 library away from shared" am: 762a556c11 am: f9db4a4fcd am: 6f15603c5d am: d19d0297c0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1484877

Change-Id: I7b293f1f8c291a2253c6dd6bf4411981f3560d70
2020-11-03 19:33:35 +00:00
Ana Krulec
d19d0297c0 Merge "Moving composer@2.1 library away from shared" am: 762a556c11 am: f9db4a4fcd am: 6f15603c5d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1484877

Change-Id: Ie805ad8b5ae8cf0474ff0b5d82996aa823261bb1
2020-11-03 18:24:35 +00:00
Ana Krulec
564eab6f01 Moving composer@2.1 library away from shared
Adding the ability for tests to add
"android.hardware.graphics.composer@2.1-resources" as
as static library.

Test: atest sffakehwc_test on cuttlefish on aosp-master
Bug: 160796914
Change-Id: I8cb80102bd836f8f211602cb36fd857757e8323c
2020-11-02 18:07:37 -08:00
Marin Shalamanov
7e96241e82 Merge "Clean ComposerClient cache on hotplug" 2020-10-27 14:14:33 +00:00
Marin Shalamanov
ac6cc1f97e Clean ComposerClient cache on hotplug
On subsequent hotplug connected event for a display
SurfaceFlinger destroys the previous framebuffers and
recreates them. When the new buffers are created
ComposerClient still holds a handle to the old buffers and
they are not destroyed. This way the new framebuffers
may get allocated on non continuous memory causing garbled
screens for the user.

Bug: 160112047
Bug: 169255692
Test: 1. limit cma ion memory to 32 MB
      2. flash device
      3. plug hdmi out and in
      4. verify that the display image is not garbled
Change-Id: Idf7cdf7a070ffc83ecec34ac24c8a7d696f68aa6
2020-10-27 13:37:40 +01:00
stevensd
55493667bd Merge "graphics: fix use-after-free in mapper 2.0 passthrough" am: 2d82c11b0f am: 4d7af21173 am: 2213315dff am: c384897178
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1468882

Change-Id: Ib5a6b58f5607e071c559192e028b43329247651c
2020-10-27 02:03:50 +00:00
stevensd
c384897178 Merge "graphics: fix use-after-free in mapper 2.0 passthrough" am: 2d82c11b0f am: 4d7af21173 am: 2213315dff
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1468882

Change-Id: I39ef92439dee2658a592f80b53a32ac8e3440ec1
2020-10-27 01:42:41 +00:00
stevensd
2d82c11b0f Merge "graphics: fix use-after-free in mapper 2.0 passthrough" 2020-10-27 00:35:56 +00:00
David Stevens
be8f52e8b0 graphics: fix use-after-free in mapper 2.0 passthrough
The mapper 2.0 gralloc passthrough keeps a set of the native_handle_t
pointers of all imported buffers. This change ensures that the
underlying HAL wrapper freeing the native_handle_t is performed
atomically with respect to accesses to the passthrough's native_handle_t
pointer set.

This fixes a race where a native_handle_t could be reallocated between
being freed by the HAL wrapper and removed from the passthrough's set,
which could then cause the import which happened to reallocate that
native_handle_t to spuriously fail.

Bug: 170798776
Test: Manually very no more spurious import failures in ARCVM's decoder.
Change-Id: I654a44e94adb319f54fb462f4484db414ca1b154
2020-10-22 09:45:09 +09:00
Steven Moreland
18dedeba31 Merge "Update VNDK version for common graphics HALs." into rvc-d1-dev-plus-aosp am: 6771686697
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12875930

Change-Id: I3ad6da3bd6e1c51517b0cb40aeee191cb4eb3c38
2020-10-20 20:42:34 +00:00
Steven Moreland
67f5d0f838 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I4094240656f357b5ae52194befd0e10627b9fe23
Merged-In: I4094240656f357b5ae52194befd0e10627b9fe23
2020-10-19 21:04:14 +00:00
Steven Moreland
6006eb1b82 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I4094240656f357b5ae52194befd0e10627b9fe23
Merged-In: I4094240656f357b5ae52194befd0e10627b9fe23
2020-10-19 19:22:53 +00:00
Steven Moreland
e04821595c Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I4094240656f357b5ae52194befd0e10627b9fe23
2020-10-19 18:07:57 +00:00
Ady Abraham
5d4d79d9de composer: hold a sp<IComposer> from the service itself am: 1368c29213
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12754286

Change-Id: Ia3f955a51bde0549072afdf35b92a9de28a065a6
2020-10-05 20:30:47 +00:00
Ady Abraham
1368c29213 composer: hold a sp<IComposer> from the service itself
IComposerClient assumes that IComposer will outlive its life cycle
and holds a simple pointer to HwcHal. This change is taking the same
approach of newer composer versions (2.2, 2.3, and 2.4) to make sure
that IComposer would outlive IComposerClient.

Test: coral booting with this change
Fixes: 155769496
Change-Id: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
Merged-In: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
(cherry picked from commit 43e42ff6ec)
2020-10-05 18:09:08 +00:00
TreeHugger Robot
e601b1ca37 Merge "composer: hold a sp<IComposer> from the service itself" 2020-10-01 22:56:15 +00:00
Ady Abraham
43e42ff6ec composer: hold a sp<IComposer> from the service itself
IComposerClient assumes that IComposer will outlive its life cycle
and holds a simple pointer to HwcHal. This change is taking the same
approach of newer composer versions (2.2, 2.3, and 2.4) to make sure
that IComposer would outlive IComposerClient.

Test: coral booting with this change
Fixes: 155769496
Change-Id: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
2020-10-01 20:12:38 +00:00
Marin Shalamanov
5127a97bd8 Update the comment for ReplacedHandle
Test: n/a
Bug: n/a
Change-Id: I388af766fb1b5e78aabfc72c70883e71d05ce18c
2020-09-29 16:04:49 +02:00
Dan Shi
8d5281da2e Rename vts-core to vts
Bug: 151896491
Test: none
Change-Id: If74547c56b46ebc7fd728c1bf52fe9dedac65ffa
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-09-29 06:52:57 +00:00
Dan Shi
2fdd0c5c39 Rename vts-core to vts
Bug: 151896491
Test: none
Change-Id: If74547c56b46ebc7fd728c1bf52fe9dedac65ffa
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-09-29 06:52:28 +00:00
Treehugger Robot
527ce01e45 Merge "Mark GraphicsMapperHidlTest as allowing not being instantiated" am: ca31517201
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1439141

Change-Id: Ifa90d54ebe8ab99f36daba611a0d63f3f6fa8fdb
2020-09-28 22:03:07 +00:00
Treehugger Robot
ca31517201 Merge "Mark GraphicsMapperHidlTest as allowing not being instantiated" 2020-09-28 21:47:07 +00:00
Dan Shi
f2b950f470 Rename vts-core to vts
Bug: 151896491
Test: none
Change-Id: If74547c56b46ebc7fd728c1bf52fe9dedac65ffa
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-09-26 04:11:28 +00:00
Chris Forbes
3c9a3a0cd1 Mark GraphicsMapperHidlTest as allowing not being instantiated
Only the variant(s) actually implemented by the device will be
instantiated.

This is consistent with tests for other versioned or optional HALs.

Bug: b/167222309
Test: atest VtsHalGraphicsMapperV2_0TargetTest:GoogleTestVerification#UninstantiatedParameterizedTestSuite<GraphicsMapperHidlTest> -- --abi arm64-v8a
Change-Id: I4f1bfbad47bdbf75578ec48a3a56fb5351e7729a
2020-09-25 21:07:53 -07:00
John Reck
066a7d944c Add missing skia_deps
Test: make
Change-Id: I51e664120fd9fb6f574b5676eedca63df2c13951
2020-09-14 13:26:30 -07:00
Dan Shi
ac9cf4482b Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
Merged-In: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
2020-09-11 11:02:25 -07:00
Dan Shi
6b0fd062bb Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
2020-09-08 10:42:38 -07:00
Chris Forbes
48d97f3921 Mark GraphicsMapperHidlTest as allowing not being instantiated
Only the variant(s) actually implemented by the device will be
instantiated.

This is consistent with tests for other versioned or optional HALs.

Bug: b/167222309
Test: atest VtsHalGraphicsMapperV2_0TargetTest:GoogleTestVerification#UninstantiatedParameterizedTestSuite<GraphicsMapperHidlTest> -- --abi arm64-v8a
Change-Id: I4f1bfbad47bdbf75578ec48a3a56fb5351e7729a
2020-08-31 17:14:39 -07:00
Dan Shi
ff985a85a8 Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I58bc808a82b2128bb8774f762f9b9fcecd2614fb
2020-07-29 09:46:36 -07:00
Ady Abraham
2fb43f0108 composer: 2.4: fix VTS usage of desired time am: 30d2573834 am: b672893691 am: 30261db626 am: 81650b5cb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12171999

Change-Id: If06626d941d1f7588fbf51edb32f0e42e780073d
2020-07-16 22:20:10 +00:00
Ady Abraham
30261db626 composer: 2.4: fix VTS usage of desired time am: 30d2573834 am: b672893691
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12171999

Change-Id: Ibbdc435742ff5d89553ae178c3924306400e8ca8
2020-07-16 21:26:54 +00:00
Ady Abraham
8c33403a10 composer: 2.4: fix VTS usage of desired time am: 30d2573834
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12171999

Change-Id: I41b741a51c52e8e09e20e2dbd7f46c2b2238f840
2020-07-16 21:15:52 +00:00
Ady Abraham
30d2573834 composer: 2.4: fix VTS usage of desired time
Test_setActiveConfigWithConstraints is setting the desired time
for a config change to be before the test starts.
This causes the test to use the same value for all configurations,
which becomes stale the more configurations the device supports.
This fix is setting the desired time before calling
to setActiveConfigWithConstraints.

Bug: 161023185
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I236e5c9c16b4ba730677cd4c980a7071ba25840e
2020-07-16 20:00:44 +00:00
TreeHugger Robot
fc856a4aab Merge "composer: 2.4: VTS using old value for parameter" into rvc-dev am: 32e3cd9a02 am: 247528e180 am: 034e764769 am: 50629e7afd
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12143287

Change-Id: If87fc83a81599b10292d2c970f48926e5fb9171d
2020-07-14 19:53:58 +00:00
TreeHugger Robot
50629e7afd Merge "composer: 2.4: VTS using old value for parameter" into rvc-dev am: 32e3cd9a02 am: 247528e180 am: 034e764769
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12143287

Change-Id: I84b6877662e3a8efb50a54fd404291c6ad88224c
2020-07-14 19:41:25 +00:00
TreeHugger Robot
e76932a612 Merge "composer: 2.4: VTS using old value for parameter" into rvc-dev am: 32e3cd9a02 am: 247528e180
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12143287

Change-Id: Ided256d0a30fbbf07b1be2be23d897e4b0ab2c99
2020-07-14 19:28:29 +00:00
TreeHugger Robot
4b90115190 Merge "composer: 2.4: VTS using old value for parameter" into rvc-dev am: 32e3cd9a02
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12143287

Change-Id: I4e4e31b8d71af30dbc6aac64564b00d166a14a87
2020-07-14 19:15:46 +00:00
Ady Abraham
0a19601eae composer: 2.4: VTS using old value for parameter
Fix a test that is using the incorrect parameter.

Bug: 161023185
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I8574abed50c23657f5d96e9d396709cb9b92e1fd
2020-07-13 23:30:05 +00:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Jooyung Han
b0907a6bb8 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
2020-07-02 09:18:17 +09:00
Naseer Ahmed
e44f9340f0 Do not link mapper libraries statically am: fbcb5a89c9 am: 5f9995dc9a am: 395017b957 am: 49d3f81210
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11970027

Change-Id: Idfd3dddbd7b3c55b44a39c29b895e0341e047002
2020-06-24 08:54:52 +00:00
Naseer Ahmed
5f9995dc9a Do not link mapper libraries statically am: fbcb5a89c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11970027

Change-Id: I600ebe8bd0291a81f03efc33a7642bb2b0b7c9c4
2020-06-24 08:16:34 +00:00
Naseer Ahmed
fbcb5a89c9 Do not link mapper libraries statically
Linking them statically prevents the mapper SP HAL from being
extended

Bug: 158465474
Test: local build vts tools.
      Passed on VtsHalGraphicsComposerV2_XTargetTest.
Change-Id: I916b1c042b1e81e53f7398cd4a1a2231469ea91f
2020-06-24 07:10:58 +00:00
TreeHugger Robot
c152a361c2 Merge "Add test for subsample metadata for YUV420 format" into rvc-dev am: e83c8b22e3 am: 1705471cc1 am: 1f6a1aeab0 am: ccc4c67587
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11736601

Change-Id: I6aa0352673ce7f52cb2a650843ae2541f629d38c
2020-06-23 16:46:44 +00:00
TreeHugger Robot
1705471cc1 Merge "Add test for subsample metadata for YUV420 format" into rvc-dev am: e83c8b22e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11736601

Change-Id: Ibb503d88b4656056a63195c40b4dcad0422a9016
2020-06-23 16:00:47 +00:00
TreeHugger Robot
e83c8b22e3 Merge "Add test for subsample metadata for YUV420 format" into rvc-dev 2020-06-23 15:44:49 +00:00
layog
e886f80942 Add test for subsample metadata for YUV420 format
Bug: 153704651
Test: atest VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ie7a521b19b2eb1c459327fe699253aaa50ae8257
2020-06-20 11:54:25 +08:00
TreeHugger Robot
751e44ead5 Merge "gralloc4-vts: Correct the ownership of fence fd" into rvc-dev am: 86aa285936 am: c117f9254a am: 429d1f53b2 am: f51af509ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11880423

Change-Id: I6eae9857ef504941be7782b2788bef26653ef28f
2020-06-19 02:04:27 +00:00
TreeHugger Robot
429d1f53b2 Merge "gralloc4-vts: Correct the ownership of fence fd" into rvc-dev am: 86aa285936 am: c117f9254a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11880423

Change-Id: I2959701130721c9ad0f0c239cdf45d57ba0f6ddb
2020-06-19 01:34:22 +00:00
TreeHugger Robot
dc2a322213 Merge "gralloc4-vts: Correct the ownership of fence fd" into rvc-dev am: 86aa285936
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11880423

Change-Id: I4d0b921bd4a3cddb0b306d02aed5f0f1830d4831
2020-06-19 01:16:42 +00:00