Commit graph

721 commits

Author SHA1 Message Date
Marissa Wall
a6a2af85d7 gralloc: clarify lock access region
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
2019-11-07 10:24:34 -08:00
Nick Desaulniers
daedbd7e47 [hardware][interfaces][graphics] fix -Wimplicit-int-float-conversion
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>
2019-11-05 14:54:06 -08:00
Nick Desaulniers
de2a5dcd48 [hardware][interfaces][graphics] fix -Wimplicit-int-float-conversion
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>
2019-11-05 13:18:26 -08:00
Dan Shi
93a389c708 Convert VtsHalGraphicsComposerV2_4TargetTest to be parameterized test
Bug: 142397658
Test: TODO
Change-Id: I8aaada238d70fbcb7619f894d6aa174a2d8471c7
2019-11-01 20:08:24 -07:00
Dan Shi
1fc6aec652 Merge "Convert VtsHalGraphicsComposerV2_*TargetTest to be parameterized test" 2019-11-01 05:33:20 +00:00
Dan Shi
ff7462064d Convert VtsHalGraphicsComposerV2_*TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsComposerV2_1TargetTest
Change-Id: Idd6b0a0314be706e06f7812fbf8eb787edd078b1
2019-10-30 11:27:11 -07:00
TreeHugger Robot
0291840f76 Merge "composer 2.4: add api to control vsync period" 2019-10-29 19:07:42 +00:00
Ady Abraham
7882ae6805 composer 2.4: add api to control vsync period
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
2019-10-29 10:14:33 -07:00
Andrew F. Davis
272ff4a626 graphics: hwc2on1adapter: Buffer hotplug event after display creation
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>
2019-10-28 15:34:42 +00:00
Chong Zhang
86e1aebad1 [RenderEngine] Fix test build for RenderEngine refactor
Fix build after refactor of creation flags.

BUG: 142331374
Test: build, flash and boot
Change-Id: I59c2858f8e35426e2eb08c91e8797efd738a3922
2019-10-23 12:28:08 -07:00
TreeHugger Robot
7dbc6e184e Merge "gralloc: require locked buffers follow format" 2019-10-16 22:33:24 +00:00
Marissa Wall
aa181aec49 gralloc: require locked buffers follow format
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
2019-10-16 11:10:43 -07:00
Steven Moreland
ab017f20cf Merge "Remove libhwbinder/libhidltransport deps" 2019-10-11 20:19:21 +00:00
Eric Chung
7e279f1a63 Merge "Refine freeBuffer in Mapper 2.0" am: 9b2431d02a am: f6e09b2ff5 am: 3057612183
am: 13a6edaab2

Change-Id: I6a410127b4604aa8e0ef0ac5c1b04df45283eb69
2019-10-10 13:10:29 -07:00
Steven Moreland
36c9ae7c5e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Ifabf28bbcfa60f8c1786256ef44dff442af99989
Merged-In: I878a4d04e65ef13f3a0ebaf64177f673958d213c
2019-10-09 16:19:44 -07:00
Treehugger Robot
9b2431d02a Merge "Refine freeBuffer in Mapper 2.0" 2019-10-08 23:17:06 +00:00
TreeHugger Robot
dd7ddab13e Merge "composer: Add getDisplayConnectionType" 2019-10-03 19:47:13 +00:00
Alistair Delva
fc8d43692c Merge "Make gralloc0 pass-through mapper handle layers" am: b756e23e5c am: 6982d1aec5 am: 6c3213c940
am: afc577e108

Change-Id: I54f2e01bf8ffe43dbe786a73cfd7818661230090
2019-10-03 06:48:29 -07:00
Alistair Delva
b756e23e5c Merge "Make gralloc0 pass-through mapper handle layers" 2019-10-03 13:02:13 +00:00
Dominik Laskowski
ce44a4b363 composer: Add getDisplayConnectionType
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
2019-10-02 15:10:41 -07:00
Steven Moreland
82b84148c7 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I878a4d04e65ef13f3a0ebaf64177f673958d213c
2019-10-02 12:50:29 -07:00
Jason Macnak
8b5b9fb52c Make gralloc0 pass-through mapper handle layers
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
2019-09-27 09:58:45 -07:00
Max Zhang
aed6aa8c2e yukawa: adapt different YCC orders am: 59b31c9b90 am: b21fd17efe am: 4a2baa9256
am: b21fd61f56

Change-Id: I2e4344503fd62cd0346c61bf745c7638f3651b3b
2019-09-25 12:00:03 -07:00
Max Zhang
59b31c9b90 yukawa: adapt different YCC orders
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
2019-09-24 11:38:07 -07:00
Yi Kong
0609fa20d0 Ignore format-pedantic compiler warning am: 4321dfea63 am: e38afc37a0 am: d92d2cf6b8
am: ffcd72c442

Change-Id: Ibbfe1553eb15831fff6ec13e5cf80310b603874b
2019-09-20 16:20:56 -07:00
Yi Kong
4321dfea63 Ignore format-pedantic compiler warning
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
2019-09-20 13:25:25 -07:00
Eric Chung
a15f697353 Refine freeBuffer in Mapper 2.0
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
2019-09-17 01:12:06 +00:00
TreeHugger Robot
d609ba41fe Merge "Returning HWC2_CAPABILITY_SKIP_VALIDATE capability if device supports it" 2019-09-13 00:31:34 +00:00
Valerie Hau
6a05e9113a Returning HWC2_CAPABILITY_SKIP_VALIDATE capability if device supports it
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
2019-09-11 14:25:48 -07:00
Steven Moreland
38c46d0b98 Merge "Remove libhwbinder/libhidltransport deps" am: 6b62c58a9a am: 8c22c3862f am: 6684ee8c36
am: 9a5ffa3196

Change-Id: I3a80895d10767fe68e90a907312a83ded976cbcc
2019-09-06 16:06:13 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
mamik
13d03d5174 Rev up vr_hwc to composer@2.3
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
2019-08-27 15:05:22 +00:00
Xin Li
68464fb5a0 DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I7e48b5477b2edda72c940e05531782dd28a2f784
2019-08-23 06:45:16 +00:00
Marissa Wall
53aff11b36 composer-vts: support gralloc 4
Add support for gralloc 4.0 to composer-vts.

Bug: 136016160
Test: Compiles and boots

Change-Id: Ibfa802023ddeb3b4d09a7b69bbc796b67c4ee62d
2019-08-20 10:07:06 -07:00
Marissa Wall
b96c2eb119 composer: support gralloc 4.0
Add support for gralloc 4.0 to composer.

Bug: 136016160
Test: Compiles and boots

Change-Id: I2609f20348f795a7c4e966d7420b36fa27daa054
2019-08-19 10:21:57 -07:00
Marissa Wall
a8c3130a34 composer: refactor ComposerResources into shared library
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
2019-08-16 10:48:37 -07:00
Adam Bodnar
d0aef4dfe5 Add more HWC vs RenderEngine tests to composer vts
Bug: 133411821
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I19322f75b098813b1e4acf31cb6bae9e15fb8915
2019-08-14 15:06:45 -07:00
TreeHugger Robot
b5f60c41d0 Merge "graphics: rev IAllocator/IMapper to 4.0" 2019-08-07 21:22:39 +00:00
Alec Mouri
45a70ce00e [VTS] Update RenderEngine dependencies.
Upstream change adds a new RenderEngine dependency, adding the dependency
here to fix compilation issue.

Bug: 136806342
Bug: 137191934
Test: builds
Change-Id: I8c097dd162afb79d36269741af00d0e69cf77c2a
2019-08-05 17:00:14 -07:00
Marissa Wall
6534164fd6 graphics: rev IAllocator/IMapper to 4.0
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
2019-07-23 17:08:06 -07:00
Valerie Hau
92d1226f9c Setting layer dataspace to match the color mode
Bug: 135045017
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I7188c53ca92895a98da062a248f6b781202671b8
2019-07-22 10:29:40 -07:00
Valerie Hau
37d4f127c9 DO NOT MERGE: Fixing SRGB for devices that do not support SRGB color mode
Bug: 135375302
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Ie8f53effe3e6e29a4523ebfa450c79fdf96ed585
Merged-In: Ie8f53effe3e6e29a4523ebfa450c79fdf96ed585
(cherry picked from commit 2f3553e1ed)
2019-07-22 02:04:20 +00:00
jie.yuan
e9be824d3b VTS : fix vts fail [1/1]
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)
2019-07-22 02:04:13 +00:00
Peiyong Lin
e3a08d761e Enable VNDK for composer 2.4
BUG: 135929065
Test: build
Change-Id: I7c55b48a84840d61d48c588e5c464a6f00fea7f0
2019-07-17 17:30:41 -07:00
TreeHugger Robot
c268915647 Merge "[Composer] Create place holder for Composer 2.4." 2019-07-18 00:12:41 +00:00
Peiyong Lin
781d0bbe3b [Composer] Create place holder for Composer 2.4.
Create place holder for composer 2.4.

Minor: Extend DisplayCapability to include protected contents.

BUG: 135929065
Test: build
Change-Id: I9dbdb21f4a69027bedd95cd54e9c3c652bbe9006
2019-07-17 14:28:55 -07:00
jie.yuan
6d1493018f VTS : fix vts fail [1/1]
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
2019-07-16 13:16:36 -07:00
Valerie Hau
37edd052ce Fixing client composition setup on non-SRGB color mode displays
Fixing client composition behavior to match SF - dataspace of client
composition is determined by the color mode of the display

Bug: 135045017
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I88371d173501875b59bf40092943cebff3d22b06
2019-07-12 09:14:39 -07:00
Felix
84af4f6e7e Merge "Add interface info to .rc files" am: 98d0f4d52c am: 37298a7616 am: 3531ec0183
am: bf481c99ed

Change-Id: Ie44e2aa87f7407a9820dc6f1ad6298b61bae34f3
2019-07-08 12:57:01 -07:00
Felix
37298a7616 Merge "Add interface info to .rc files"
am: 98d0f4d52c

Change-Id: Ie6cfbacd523c4b09f77bee3369ec8e88b3fa0419
2019-07-08 12:22:23 -07:00
Peiyong Lin
1b5692ea05 [Cleanup] Properly export lib headers.
Properly export lib headers to avoid copying everything when upgrade composer
version. Minor: Remove VTS team as OWNERS of non-VTS directory.

BUG: 135929065
Test: build and boot
Change-Id: I4c3544490fcf043ff6bda2312a00aed015d0d5fc
2019-07-02 18:23:14 -07:00
Adam Bodnar
5bf9dc69ac Validate Render Engine output in composer VTS 2.2
Bug: 133411821
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Ie95c197d702977738a75e29954c541fe1b7baa38
2019-07-02 12:18:18 -07:00
Valerie Hau
7c8eb68002 Add support for different color modes for readback
Bug: 135045017
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I07868d95120068bee1d98432888109313da33119
2019-06-26 15:21:04 -07:00
Adam Bodnar
a559b823fb Explicate SRGB in Composer VTS 2.2 Readback Tests
Bug: 136032929

Test: Build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Ic842e574e47baf231a4a41803dd2ee178ad2f6a4
2019-06-25 16:46:15 -07:00
Felix
551b8d15ce Add interface info to .rc files
Signed-off-by: Felix <google@ix5.org>
Change-Id: I6d70bbdb66c3dce280bf6908c3750316a6f6cf70
2019-06-25 20:00:07 +02:00
Valerie Hau
f87dcceb86 Merge "Wait until old ComposerClient is fully destroyed before recreating" into qt-dev am: d93c9f0c2d am: 5cb7cc40a7
am: 9c2e7c1cd2

Change-Id: I6251930043fbe98efb4c34735826d00719389655
2019-06-21 15:35:48 -07:00
Valerie Hau
5cb7cc40a7 Merge "Wait until old ComposerClient is fully destroyed before recreating" into qt-dev
am: d93c9f0c2d

Change-Id: I3bda1337b6c3fdea3c555f3887aa9a88dc04620c
2019-06-21 15:20:16 -07:00
Valerie Hau
bf967c9bdb Wait until old ComposerClient is fully destroyed before recreating
Possible race condition where EventCallbacks are registered before
old implementation deregisters on destruction.  Stems from fact that
strong pointer destruction does not mean the object has completely run
its destructor method

Bug: 135210708
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I0851f1197d8341854f5bdac5fbb08553fc32b710
2019-06-21 11:10:17 -07:00
Valerie Hau
624ce4b638 Merge "Adding support for different Mapper versions in IComposer VTS tests" into qt-dev
am: 29594d2d02

Change-Id: Icd7b79a0a737c2b90a79a140168c15eaf3f50457
2019-06-20 13:14:35 -07:00
Valerie Hau
dca469c180 Adding support for different Mapper versions in IComposer VTS tests
Bug: 135139498
Test: build, boot, VtsHalGraphicsComposerV2_<1,2,3>TargetTest,
Change-Id: I05e2832c64d4c06eb4afd64c3323d7edbd19a5f4
Merged-In: I05e2832c64d4c06eb4afd64c3323d7edbd19a5f4
2019-06-19 17:14:24 -07:00
Valerie Hau
5bb66a6948 Merge "Adding support for different Mapper versions in IComposer VTS tests" 2019-06-19 23:12:47 +00:00
Valerie Hau
c1dc31340e Adding support for different Mapper versions in IComposer VTS tests
Bug: 135139498
Test: build, boot, VtsHalGraphicsComposerV2_<1,2,3>TargetTest,
Change-Id: I05e2832c64d4c06eb4afd64c3323d7edbd19a5f4
2019-06-19 13:56:04 -07:00
Steven Moreland
8762ba49cc Merge "libhidltransport users user libhidlbase" into qt-dev am: a27c627f51 am: 8943ce08bd
am: a750e7e5f5

Change-Id: I38f5495d70066a31023c2eb53c3c02486ead1d17
2019-06-14 16:46:01 -07:00
Steven Moreland
a750e7e5f5 Merge "libhidltransport users user libhidlbase" into qt-dev am: a27c627f51
am: 8943ce08bd

Change-Id: I8b93ac6a8b410256855ce4041dc4b7a17016d4de
2019-06-14 16:30:22 -07:00
Steven Moreland
0dc5f389f9 Merge "libhidltransport users user libhidlbase" into qt-dev
am: a27c627f51

Change-Id: I379a04a52e60260e0a73dc7720d3e315038a52ff
2019-06-14 16:18:47 -07:00
Steven Moreland
085a82ecb1 libhidltransport users user libhidlbase
libhidltransport symbols are being moved into libhidlbase in order to
optimize linking/memory usage. libhidltransport will no longer be
required in the future (however removing references to it will come
separately).

Bug: 134961554
Test: boot
Change-Id: Ibcc2db32d3bec1a786b60e11d4820ecd0605f403
2019-06-12 13:49:19 -07:00
Elliott Hughes
99894942f2 Remove -Wno-user-defined-warnings. am: 18ea3d2d5e am: 25769c2d3d am: f62cfc207f
am: ae0d307b51

Change-Id: I6d16eafcac82e6fbba9c9b724bc65aa7c2dbab67
2019-06-07 12:47:41 -07:00
Elliott Hughes
f62cfc207f Remove -Wno-user-defined-warnings. am: 18ea3d2d5e
am: 25769c2d3d

Change-Id: I4d646381b0ba63f00d3259b20b02df0d34c68cd6
2019-06-07 12:33:28 -07:00
Elliott Hughes
18ea3d2d5e Remove -Wno-user-defined-warnings.
Doesn't seem to be necessary.

Bug: http://b/134716967
Test: treehugger
Change-Id: I9617cf82c816ef072005f7baf2fceee9628313f5
2019-06-07 08:46:26 -07:00
Valerie Hau
b019fd7a9a Clean up Readback test
Readback will be used in RenderEngine testing.  Clean up test files and
extract common classes

Bug: 133411821
Test: build, boot, VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I45b4666348ae0137dd2a7825b5cfd627a1e1aa58
2019-05-23 14:39:21 -07:00
Peiyong Lin
ccc1805cb5 Merge "Put composer 2.3 in the right cpuset." into qt-dev
am: 862a9fdf6e

Change-Id: I1171130711329874233540dfd7d394d1de7d2a66
2019-05-13 12:51:42 -07:00
Peiyong Lin
a83af2b6fd Put composer 2.3 in the right cpuset.
the composer HAL should be in the system-background cpuset, but hwc 2.3 is not
in any cpuset. This patch restricts it to system-background.

BUG: 132559090
Test: Build, flash and boot.
Change-Id: I1739a6c049e195f6cc79b81fcba7a6fcb55b546a
2019-05-13 09:34:10 -07:00
Peiyong Lin
2007f2d931 Merge "Return display capability if getDisplayBrightnessSupport is not registered." into qt-dev
am: 248f72a9a0

Change-Id: I105e29926e146e4d7e9c6924fcb4588e57e1400b
2019-05-08 11:28:09 -07:00
Peiyong Lin
248f72a9a0 Merge "Return display capability if getDisplayBrightnessSupport is not registered." into qt-dev 2019-05-08 17:59:55 +00:00
Valerie Hau
18af76ef9f Merge "Fix getDisplayCapabilitiesBasic VTS test" into qt-dev
am: 767a57fb19

Change-Id: I9477c6015409156e1d184ae70c15630e77f44025
2019-05-07 21:27:41 -07:00
TreeHugger Robot
767a57fb19 Merge "Fix getDisplayCapabilitiesBasic VTS test" into qt-dev 2019-05-08 03:17:43 +00:00
Valerie Hau
0db2322402 Merge "Fix setLayerCursorPosition test" into qt-dev
am: 34f36713bf

Change-Id: Ic4ebed51afcd11f766f82fa51658c0f871bca65a
2019-05-07 16:27:50 -07:00
TreeHugger Robot
34f36713bf Merge "Fix setLayerCursorPosition test" into qt-dev 2019-05-07 23:07:29 +00:00
Valerie Hau
66ea37f739 Merge "Fix setLayerCursorPosition Test" into qt-dev
am: 3da7baee06

Change-Id: I3a42c2d84d1cb76252ea808b6341b457d2f693c2
2019-05-07 13:11:46 -07:00
Valerie Hau
185d7a4b1f Fix setLayerCursorPosition test
Set composition type to Cursor

Bug: 132057336, 131181758
Test: VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I03ae799358abcdbd0a1c39a13d30d76aa7712004
2019-05-07 12:35:49 -07:00
Valerie Hau
3da7baee06 Merge "Fix setLayerCursorPosition Test" into qt-dev 2019-05-07 19:10:24 +00:00
Valerie Hau
804857176a Fix getDisplayCapabilitiesBasic VTS test
Old test checked error code when calling getBrightnessSupport in the
getDisplayCapabilitiesBasic test.  However, it is possible that the
function is not implemented (UNSUPPORTED).  We want to return normally
and use the returned supported boolean to check this instead.

Bug: 132043561, 132056857
Test: VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I94f8f39ba9129c4a8d939a5385538db3489c46b9
2019-05-07 11:52:27 -07:00
Valerie Hau
efe7621dac Fix setLayerCursorPosition Test
Bug: 131181758
Test: build, boot, VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I70f4f8f64c16ce45eba70c2e47d3fa2913034eba
2019-05-07 08:06:05 -07:00
Valerie Hau
86a6f6e805 Merge "Call into validateBufferSize and getTransportSize" into qt-dev
am: 85b557fd1a

Change-Id: I367da83cd2e912d623698e28a6bda09a931aa33a
2019-05-06 09:29:05 -07:00
Peiyong Lin
0686afa15a Return display capability if getDisplayBrightnessSupport is not registered.
If getDisplayBrightnessSupport is not registered, there are two possibilities,
one is it's not supported at all, the other is that the support is returned in
getDisplayCapabilities. And thus we need to check getDisplayCapabilities, and
we return UNSUPPORTED always in this case. This patch also allows
getPerFrameMetadataKeys to return UNSUPPORTED on non-HDR capable devices.

BUG: 131595097
Test: Build, boot.
Change-Id: Ied302b1ac702dd94e039f1081d5420395c1bfbf4
2019-05-01 16:58:13 -07:00
Valerie Hau
8e3fe149e1 Call into validateBufferSize and getTransportSize
After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented

This reverts commit 5e01b1411a.
Reason for revert: Merge once targets w/ gralloc0 dependency have been updated

Bug: 130669566
Test: build, boot
Change-Id: Ic20a62c5e73f517028a358548442d59c9cf91cdf
2019-04-24 21:46:01 +00:00
Valerie Hau
c04e71b89c Merge "Revert "Call into validateBufferSize and getTransportSize"" into qt-dev
am: a7904cd342

Change-Id: Ic407f3e433505dd9b6eb1024fd85e47e508b9a42
2019-04-23 16:24:51 -07:00
Valerie Hau
5e01b1411a Revert "Call into validateBufferSize and getTransportSize"
This reverts commit 69ee26a389.

Reason for revert: Break in Elfin

Bug: 130669566
Change-Id: Ia44fd087981770676a6887aa390c674c2855f4cb
2019-04-23 22:54:59 +00:00
Valerie Hau
95072f8c52 Merge "Call into validateBufferSize and getTransportSize" into qt-dev
am: 492399e5cd

Change-Id: I1d44634b47964a8ecb741b7e60c48de9025d2b9b
2019-04-23 15:22:18 -07:00
Valerie Hau
69ee26a389 Call into validateBufferSize and getTransportSize
After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented

Bug: 130669566
Test: build, boot
Change-Id: I445cb6122107a514bc0bf433a9e140dbe3122573
2019-04-22 17:50:02 -07:00
Steven Moreland
99712c08cc Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I53e5bf67a0d314e1b10c0ba0c7172a7af358ddcc
2019-04-18 18:13:05 -07:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Peiyong Lin
65c7b60c65 Deprecate getDisplayBrightnessSupport.
Brightness is already a per display capability, we don't need this API.

BUG: 130313275
Test: build
Change-Id: I0a669aca19a2873df41bee82bd0e5e2775af8101
2019-04-15 14:04:10 -07:00
TreeHugger Robot
16b5d8a94a Merge "Fix composer@2.3 VTS tests." into qt-dev 2019-04-11 21:02:19 +00:00
Peiyong Lin
f13b305530 Fix composer@2.3 VTS tests.
Some required APIs must be implemented, and thus passthrough will always assume
the function pointers exist.

BUG: 130195295
Test: atest VtsHalGraphicsComposerV2_3Target
Change-Id: Ic2790363fcb116e66438697b1a2e64e71ffc8ac6
2019-04-10 16:25:05 -07:00
Marissa Wall
6952ddf596 mapper: support new usage and format
Update IMapper to use usage and format from
android.hardware.graphics.common@1.2. This enables support for
the usage HW_IMAGE_ENCODER and the format HSV_888 which is
already being defined and used.

Test: IMapper VTS tests
Bug: 79465976
Change-Id: I680beb6e5b1cd246c28d17f855f5c76a5831ce06
2019-04-10 12:29:05 -07:00
TreeHugger Robot
52f5328bd3 Merge "IMapper: change an error message" into qt-dev 2019-04-05 03:29:22 +00:00
Valerie Hau
7ae8af54b3 Revert "Revert "Mark layers with color transform client composition if not implemented.""
This reverts commit 6f5a48f7af.

Reason for revert: Reinstating with fix
Below is the original commit message:
SET_LAYER_COLOR_TRANSFORM is an optional API, and thus when it's not
implemented. we want to make sure we follow the spec to mark those layers as
client composition and add them into changed layers list proactively.

BUG: 115554640
Test: Verify with setting color transform manually.
Change-Id: Ia2e8634b01ee1b5c99893e86ef451f90337ef90f
2019-04-04 16:17:27 -07:00
Marissa Wall
4de153cd21 IMapper: change an error message
Change the error message that prints when IMapper 3.0 isn't present.
The old warning was causing unnecessary concerns.

Bug: 128013727
Test: compile
Change-Id: I197cd953d08a8e9f3bdee92cede973bf1b97dfe2
(cherry picked from commit ccbd24f633)
2019-04-04 23:05:51 +00:00
Andrew Chant
6f5a48f7af Revert "Mark layers with color transform client composition if not implemented."
This reverts commit c53ea9f5f8.

Reason for revert: Breaks some display output
Bug: 129945273
Bug: 115554640

Merged-In: If70a148ae6ad673b5dd03143b3f1ed73eaa1290f
Change-Id: If70a148ae6ad673b5dd03143b3f1ed73eaa1290f
2019-04-04 18:55:08 +00:00
Peiyong Lin
c53ea9f5f8 Mark layers with color transform client composition if not implemented.
SET_LAYER_COLOR_TRANSFORM is an optional API, and thus when it's not
implemented. we want to make sure we follow the spec to mark those layers as
client composition and add them into changed layers list proactively.

BUG: 115554640
Test: Verify with setting color transform manually.
Change-Id: I53b4039eb63cccd1b174e3c6da3b6336b85e0321
2019-04-03 13:32:20 -07:00
Eino-Ville Talvala
7c51e8492e graphics.mapper@2.0: Document previously-implicit accessRegion behavior.
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
Change-Id: Id16831d3da4ec3dc74dbdca18447581a50ee1193
2019-03-28 16:51:39 -07:00
Valerie Hau
ef77263b2f Adding negative slot index check in ComposerResources
Bug: N/A
Test: build, boot
Change-Id: I8ab18ed8f7c322ee995abc534309b51e796276fe
2019-03-27 10:06:12 -07:00
Pawin Vongmasa
d80b5bb7dd Accompany HardwareBuffer with generation number
attachBuffer() should take a generation number and requestBuffer()
should return a generation number because AHardwareBuffer does not carry
the generation number.

Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 127778192
Change-Id: I201f84cf66f0e19b794a05c5ba88066360a37d96
2019-03-19 06:39:49 -07:00
Michael Wright
ff96aa8d47 Merge "Moved brightness from Lights to SF." 2019-03-12 21:16:25 +00:00
Steven Moreland
705fe94a47 Merge "bufferqueue@1.0: remove comment in function def" am: 5418f17004 am: 1b7da8b6bb
am: 095414578e

Change-Id: Ib83e63c4e21071c020de29b38c7898ac1a0e5cb7
2019-03-12 13:55:19 -07:00
Steven Moreland
62355801ca bufferqueue@1.0: remove comment in function def
Bug: 124382459
Test: manual
Change-Id: Ia99990d6ba3d50d81eb58735212142ec88a74293
2019-03-09 01:00:01 +00:00
Dan Gittik
3e83c4558a Moved brightness from Lights to SF.
Test: manual.
      Check that brightness works.
Fixes: 111435292

Change-Id: I3d19bc2fc4088bc9a956a5cf38c3b163fe35256f
2019-03-08 17:14:17 +00:00
Peiyong Lin
0a3c844398 Remove obsolete comments.
BUG: 127850729
Test: N/A
Change-Id: I6d45f30c129749a95050d3c046fbfe91d0a75f3e
2019-03-07 15:02:19 -08:00
Steven Moreland
87f43604b9 Merge "Update makefies: no 'types' internal" 2019-03-05 17:40:03 +00:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Peiyong Lin
3e7205d006 [composer] Remove implication. am: 849c980804 am: b48a6fa60a
am: d581ab1940

Change-Id: I5c38b7a6b15fbb52d11e27e334dd03c54784de35
2019-02-28 20:06:32 -08:00
Peiyong Lin
849c980804 [composer] Remove implication.
The spec of setLayerDataspace never specifies the types of layer it should be
call on, however, the spec has the implication that this method will only work
for layers with buffer, which is mis-leading. This patch changes the wording of
setLayerDataspace spec, removes the implication. Note that this change won't
break backward compatability.

BUG: 126713799
Test: N/A
Change-Id: I97f22469897cb687dcb64a3d419bcb48a3668e5a
2019-02-28 17:00:30 -08:00
Steven Moreland
f8a47b7f01 Update makefiles.
Bug: 123976090
Test: N/A
Change-Id: I5fb6c126a090a3fe0fa4829ea9224564133dc1ae
2019-02-11 21:14:16 -08:00
Shuzhen Wang
55386823a3 Camera: Add HAL interface change for HEIC
- Add new usage flag to indicate the consumer of the buffer is HEIC
encoder.
- Add new data space to indicate that the BLOB buffer is HEIC encoded.
- Add new BlobId to specify JPEG APPs segments.

Test: testHeic CTS test
Bug: 79465976
Change-Id: Iaa6a1d017223e84fc1c5dd0a9d90d9f09240e827
2019-02-04 16:44:16 -08:00
TreeHugger Robot
f5913f812a Merge "Camera: Add dynamic depth tags and dataspace" 2019-01-28 22:21:52 +00:00
Huihong Luo
1ca066eb55 Add interface tag
so other components can start the hal interface when needed.

Test: manual
Change-Id: I61a4d396e86ec8dbda2cbabcc7afca7be7628f26
(cherry picked from commit c4f493977b6315d3dfe8e05f0c2516e2b00feca4)
2019-01-28 17:55:01 +00:00
Emilian Peev
5f103998ff Camera: Add dynamic depth tags and dataspace
Add necessary metadata tags for supporting dynamic depth
streams.
Includes minor gfx fix which should help eliminate build
errors after HIDL header autogen.

Bug: 109735087
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
    --skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: Ia476b195095ae7a29bc740174331dfbfdaa6d320
2019-01-27 20:06:11 -08:00
Kevin DuBois
1ec0b52d17 graphics.common: add HSV format definition to 1.2
Adds HSV format used in some color sampling engines to the list
of pixel formats. Rev the sampling engine in composer to reference
the new format revision.

Test: built image, with new format reported in vendor code.
Test: VtsHalGraphicsComposerV2_3TargetTest
Fixes: 122943743

Roll-forward of build-breaking topic commit. No changes were
needed in this patch. see bug 123404649 for breakage details.
This reverts commit e2f69f2228.

Change-Id: I38ac5cafeb6a07e683352c8d297892a681e24702
2019-01-25 20:54:03 +00:00
Kevin DuBois
d32c733fb7 Merge "Revert "graphics.common: add HSV format definition to 1.2"" 2019-01-25 17:12:11 +00:00
Kevin DuBois
e2f69f2228 Revert "graphics.common: add HSV format definition to 1.2"
This reverts commit 97e1a932ec.

Reason for revert: broke build 

Change-Id: Ib264957e9a1de83c37e4129471b3c75522e21d08
2019-01-25 17:06:01 +00:00
Kevin DuBois
8d4e68ffa2 Merge "graphics.common: add HSV format definition to 1.2" 2019-01-25 16:14:01 +00:00
Kevin DuBois
97e1a932ec graphics.common: add HSV format definition to 1.2
Adds HSV format used in some color sampling engines to the list
of pixel formats. Rev the sampling engine in composer to reference
the new format revision.

Test: built image, with new format reported in vendor code.
Test: VtsHalGraphicsComposerV2_3TargetTest
Fixes: 122943743

Change-Id: I1b454a86f464f38e3c2cbeef5379a187ff38ab06
2019-01-24 10:05:28 -08:00
Sean Callanan
51c11c6936 Merge "mapper-passthrough: filter two usages for gralloc1" 2019-01-24 00:55:08 +00:00
Marissa Wall
2a1a695599 allocator: require optimal allocations
Add a clarification the documentation that all buffer allocations
should be optimized for the usage bits provided in the descriptor.
This was always assumed to be a requirement of buffer allocations
but it was not explicitly documented.

Bug: 120493579
Test: N/A
Change-Id: Id9e3e1df861d0f32c995f18cabe37d62e7e5ce5c
2019-01-22 22:10:22 +00:00
Marissa Wall
a6a30b1aec mapper: add isSupported
Add a function to the mapper hal that checks if a BufferDescriptorInfo
is ever supported on a device. This value can be cached by the client.
The client can use this information to make decisions on what type of
buffers should attempt to allocate.

Bug: 120493579
Test: vts
Change-Id: I6bd7909e40d6462524bf49cf0d4e7af721e701ed
2019-01-22 22:09:59 +00:00
Marissa Wall
69292faf0b mapper: update lock's return values
Require mapper to return more information when locking a buffer.
Opaque vendor formats make it difficult to manipulate a locked
buffer. The pointer to the buffer's data is always at the top
left hand corner of the buffer. It can be impossible to know
where the locked region begins.

The mapper now must return the bytes per pixel and bytes
per stride of a locked buffer when the values are consistent
and known.

Bug: 120493579
Test: vts
Change-Id: Id0921f191f1e388d4950ecef73acab6a34010dc4
2019-01-22 22:07:10 +00:00
Marissa Wall
2f43f46211 mapper: update documentation on locking
Update the locking documentation to require all 1D buffers
"lock in place". Previously, the framework was able to get 1D
buffers that locked in place via ion. The ion interface is no
longer directly accessible. Some framework use cases still need
1D buffers that lock in place so add the requirement to mapper.

Bug: 120493579
Test: N/A
Change-Id: Ib903efdbeeb8c44ed70c3c6022d6792d05df1a63
2019-01-22 22:03:58 +00:00
Sean Callanan
fecf455068 mapper-passthrough: filter two usages for gralloc1
GPU_CUBE_MAP and GPU_MIPMAP_COMPLETE both do not exist in gralloc1,
so don't try to allocate buffers that have those usages.  Report an
error instead.

Bug: 66876469
Test: CTSNativeHardwareTestCases on Taimen
Change-Id: I1a6bd209faf5ffad93dbac0ab887bb1447a44aac
2019-01-17 16:37:40 -08:00
TreeHugger Robot
1be67b368a Merge changes from topic "IA/IM-3.0"
* changes:
  graphics: change composer 2.1 to support allocator/mapper 3.0
  graphics: rev IAllocator and IMapper
2019-01-15 23:21:27 +00:00
Dan Albert
5ebf56d092 Fix comparator operator() definition. am: a6a529236e am: 3df110feae
am: b21cdfb866

Change-Id: Id0f1912c6b05481f5d720a490cb7044d7accfc26
2019-01-13 01:57:42 -08:00
Marissa Wall
e20b112787 graphics: change composer 2.1 to support allocator/mapper 3.0
Change composer 2.1's ComposerResources to support the new major versions
of IAllocator and IMapper.

Bug: 120493579
Test: vts
Change-Id: I888364d302ba8c7f7ad30070dcad3ed738b4c663
2019-01-12 15:40:04 -08:00
Marissa Wall
bd1ca51841 graphics: rev IAllocator and IMapper
Increase IAllocator and IMapper to 3.0. This patch does not add
any new features.

Bug: 120493579
Test: vts
Change-Id: I84d9887f94d91eca1cc5d845bb11ac1d8affbf62
2019-01-12 15:40:02 -08:00
Dan Albert
a6a529236e Fix comparator operator() definition.
Comparators should be const. The libc++ update checks for this and
rejects non-const comparators.

Test: m
Bug: None
Change-Id: If2f76c020943b5bcb55803f0742990c9965afd6e
2019-01-11 14:48:55 -08:00
Marissa Wall
889c94dabc graphics: update owners am: 104ecb9e60 am: af56d35175
am: 88d9ae03c4

Change-Id: I596f312798b61afe4a6f12d293e2de95b6e2d193
2019-01-11 10:51:25 -08:00
TreeHugger Robot
aa2c2714ee Merge "graphics: update owners" 2019-01-11 01:23:15 +00:00
Marissa Wall
104ecb9e60 graphics: update owners
With olv@ no longer on the graphics team we need to update the
owners file to remove him and add new owners.

For composer the new owners are: lpy@ and vhau@
For allocator/mapper the new owner is: marissaw@

Test: N/A
Change-Id: Ied297e9446d480629155e1d9a96575ee518c2135
2019-01-10 14:27:55 -08:00
Marissa Wall
5a12e9b268 graphics: update owners
With olv@ no longer on the graphics team we need to update the
owners file to remove him and add new owners.

For composer the new owners are: lpy@ and vhau@
For allocator/mapper the new owner is: marissaw@

Test: N/A
Change-Id: Icc8931966e13520526174752c56a21060c8054f8
2019-01-10 14:27:15 -08:00
TreeHugger Robot
4eba392a01 Merge "[Graphics] Add lpy@ and vhau@ to OWNER file." 2019-01-04 03:19:39 +00:00
Valerie Hau
7de0be5cd4 Adding/modifying tests for new 2.3 API
Adding new tests for getPerFrameMetadataKeys_2_3 and
getHdrCapabilities_2_3.  Modifying for optional API
to not error on UNSUPPORTED

Bug: 118343714
Test: ./VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I66e28cc1cb51b8c26d3e7777311a168086f938ca
2019-01-02 08:09:12 -08:00
Valerie Hau
c25748d22f Adding HDR10+ Dynamic Metadata Support
Bug: 118343714
Test: build, flash, boot
Test: VtsGraphicsComposerV2_3TargetTest should pass
Change-Id: Iee78818bc2704f4045b62251ea2cc75af72a0609
2018-12-20 13:15:37 -08:00
Chih-hung Hsieh
df66e3cb29 Merge "Fix performance-for-range-copy warnings" am: d01f7050ac am: 51e835ce22
am: 86fefab5e9

Change-Id: Ib139d710d47a7a51e24ba8ba582b252f5ff6e244
2018-12-17 14:09:52 -08:00
Chih-Hung Hsieh
65ab67312b Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I1b76a22eab100a31e77048626e48169fe7eeaf92
2018-12-17 19:57:21 +00:00
Treehugger Robot
001a2cc09e Merge "HWC2OnFbAdapter: don't claim present fences work" 2018-12-12 20:35:03 +00:00
Chris Forbes
bdf93d0e68 HWC2OnFbAdapter: don't claim present fences work
We never produce real present fences, so indicate this to the
compositor. This will prevent GOOGLE_display_timing & friends from being
exposed in the client APIs.

Similar to previous change in HWC2On1Adapter.

Bug: b/111505197
Change-Id: I601a7f5628d4b218431fc0f1abb4807c9941ce64
(cherry picked from commit 3fac35a98a)
2018-12-11 18:31:06 -08:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Peiyong Lin
e84a7ff235 [Graphics] Add lpy@ and vhau@ to OWNER file.
BUG: N/A
Test: N/A
Change-Id: Ifca0bb859d7f2b970638627321921e1c439678bb
2018-12-05 18:52:48 -08:00
TreeHugger Robot
55c3df3e70 Merge "[Graphics] Fix some wordings." 2018-12-05 23:54:23 +00:00
Peiyong Lin
02dd3d3ae0 [Graphics] Fix some wordings.
BUG: 111562338
Test: N/A
Change-Id: If7e7141dc033dcce493eca408b302d7c57036144
2018-12-05 06:59:39 -08:00
Valerie Hau
467d88e1d0 Merge "Setting PowerMode to ON after SetPowerModeVariations" 2018-12-04 21:13:07 +00:00
Valerie Hau
ab3195bf21 Setting PowerMode to ON after SetPowerModeVariations
SetVsyncEnabled failure after SetPowerModeVariations on
sailfish
Test: ./VtsHalGraphicsComposerV2_1TargetTest on sailfish

Change-Id: I118988c4ac2b70978267b7c08f20861f4728ff8f
2018-12-03 10:29:47 -08:00
Peiyong Lin
55d50d6b77 [Graphics] Introduce per display capability.
Previously, the capability of skipping client color transform is global that
will apply on all displays. However, some hardwares are not capable of managing
it for all displays. This patch introduced a per display capability.

BUG: 69911676
Test: Build with mmma hardware/interfaces
Change-Id: I4a143ea89d06bd30ad2bf3f5307c8af9b17f0890
2018-11-29 00:23:44 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Valerie Hau
01c541c93f Removing USES_DISPLAY_RENDER_INTENTS check in ComposerClient.h
Test: ./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Ibe5800c22927c16619db864193594f70dc2a4b7f
2018-11-19 10:50:02 -08:00
Kevin DuBois
e52f011f42 Merge "graphics: Add display color sampling interface." 2018-11-07 17:39:04 +00:00
Kevin DuBois
bf141483fa graphics: Add display color sampling interface.
Add a graphics.composer@2.3 interface that will expose
color sampling hardware present on some devices to the
framework. Adds:
  getDisplayedContentSamplingAttributes
  setDisplayedContentSamplingEnabled
  getDisplayedContentSample

Test: boot up pixel3
Test: VtsHalGraphicsComposerV2_3TargetTest on revved Pixel3 hwcomposer
Bug: 116028976
Change-Id: I88455f200590926f677c47efc39e9b6678e2318c
2018-11-05 14:32:49 -08:00
Lloyd Pique
79d6d0c1d0 graphics: Base resource classes need virtual dtor
ComposerResources allows a derived class to define specializations of
the ComposerDisplayResource and ComposerLayerResource classes, which are
returned by overrides of the createDisplayResources() and
createLayerResources() member functions. The pointers are wrapped using
a std::unique_ptr, which destroys the owned instance via the base class
destructor.

As the destructor was not virtual, this meant that only the base class
destructor functionality would be used. Any additional cleanup done by
the derived class destructor would not be run!

This impacts the composer-hal 2.2 utility code for example, which adds a
readback buffer cache as a display resource. Any readback buffers that
are imported there will not be released, effectively leaking graphic
buffer memory.

It also affected an ARC++ specialization where a similar per-layer buffer
resource cache was added, and where the leak was observable since layers
are created and destroyed much more often than displays.

Bug: 117877825
Test: No leaks for ARC++ devices
Change-Id: I6e604b415d3ed787c2e51729a77278594e41e7a9
2018-11-02 23:08:08 +00:00
TreeHugger Robot
c1d5e507e6 Merge "remove USES_DISPLAY_RENDER_INTENTS from vts2.3" 2018-10-25 21:59:24 +00:00
Kevin DuBois
e4d3d5466d remove USES_DISPLAY_RENDER_INTENTS from vts2.3
Removes the USES_DISPLAY_RENDER_INTENTS macro from the 2.3 vts
suite.

Test: ./VtsHalGraphicsComposerV2_3TargetTest (passes same # of tests
Test: before and after)
Bug: 118434553

Change-Id: I32fbbf4f09d5ead1143af56f39bdf9e8dc2bfc4c
2018-10-25 09:48:59 -07:00
Pawin Vongmasa
95674af0c2 HAL interface for IGraphicBufferProducer V2
Test: Builds

Bug: 112508112

Change-Id: Ic3afaa1e27116d4ff9e5035dfce5c20de3d876e5
2018-10-23 17:33:22 -07:00
Valerie Hau
ec98306549 Adding Dataspace BT2020_SRGB and ColorMode BT2020_SRGB
BT2020_SRGB is BT2020 with SRGB transfer function.  Adding to types V1.2
and upgrading methods that utilize Dataspace and ColorMode

Bug: 115335239
Test: ./libsurfaceflinger_unittest --gtest_filter=GetBestColorMode.*
Change-Id: Ic807183ae2bd0212cd8c5d7a24c93db0a1bc28fb
2018-10-22 11:19:52 -07:00
Bill Yi
5989a2f631 Merge pi-dr1-dev to aosp-master
Change-Id: Ida0bc98526f4fc7a1c20f5bbd3210b2f6156d459
2018-10-19 12:20:42 -07:00
Chia-I Wu
7d49f30d3e graphics: composer@2.2 does not require mapper@2.1
am: 0eafa742c6

Change-Id: I6f045113a3c0218a4b8f2c8e794892a21c1fc306
2018-10-19 11:48:36 -07:00
Chia-I Wu
0eafa742c6 graphics: composer@2.2 does not require mapper@2.1
Fix composer@2.2 VTS to not require mapper@2.1.  We will need a
better test infra before things get too complex.

Bug: 112248843
Test: manual
Change-Id: Ia71a102742fd26f14e8edf3f43f3351786350ccd
Merged-In: Ia71a102742fd26f14e8edf3f43f3351786350ccd
2018-10-18 11:22:09 -07:00
Valerie Hau
babe4eb0de Fixing Readback Test failures related to auto-succeed
Prior implementation failed to clear command reader, causing test to
fail in TearDown.  Transform Readback Tests failed to return if readback
was not supported, moved GTEST_SUCCEED into test body from SetUp

Bug: 111563608
Test: ./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I4647f94efa216b219d0ef345df1ec3aa81dab4c0
2018-10-05 11:29:06 -07:00
Valerie Hau
55b73312d7 Merge "Adding more Readback tests and refactoring" 2018-10-03 23:37:07 +00:00
Valerie Hau
cfb29a4e7b Adding more Readback tests and refactoring
Bug: 111563608
Test: ./VtsHalGraphicsComposerV2_2TargetTest
--gtest_filter=GraphicsComposerReadbackTest.*

Change-Id: I0e4a8212bf08c2890747f99d5754f92821c2e2f4
2018-10-02 15:39:34 -07:00
Valerie Hau
f3440b34dd Merge "Adding command tests for VTS V2_1 HWC" 2018-09-20 22:59:08 +00:00
Valerie Hau
b50428170e Adding command tests for VTS V2_1 HWC
Bug: 111563608
Test: ./VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I0ea1a26aa296a989f8b18fe8a95ec11e29a194c8
2018-09-18 15:13:23 -07:00
Peiyong Lin
729e6a109d Merge "[Graphics] Add setLayerColorTransform." 2018-09-18 00:10:44 +00:00
Peiyong Lin
830137fc08 [Graphics] Add setLayerColorTransform.
This patch adds HAL API to set per-layer color transformation with a 4x4
matrix. Given a 4x4 matrix, the matrix will be applied on the current layer
before composition.

BUG: 111562338
Test: Build, flash and boot, run VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I673cfc2745d35947107dcab19f383ba5a8067605
2018-09-17 15:37:50 -07:00
Valerie Hau
cbe8e9ab03 Clearing reader and writer queues in executeCommands for HWC VTS Tests
Test: ./VtsHalGraphicsComposerV2_1TargetTest,
./VtsHalGraphicsComposerV2_2TargetTest

Change-Id: Ie47e486d191da30be47cde47d768d3cdde8e04e9
2018-09-17 10:58:03 -07:00
Peiyong Lin
8a7dc8e57b Merge "[Graphics] Only validate display in PresentOrValidateDisplay."
am: 0a0fa7209e

Change-Id: I174b127b17f6e9c2198da681f8272b26b110139d
2018-09-06 23:40:55 -07:00
Valerie Hau
8d782cbd8f Adding unit tests for IComposerClient V2_2 VTS tests
Bug: 111563608
Test: ./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I081cb065e8a574e667e0f49fb7caac24c34c5535
2018-09-06 09:50:02 -07:00
Valerie Hau
3a32a2b066 Fixing file descriptor close bug and display refresh bug
Test: ./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: Ib3de65ab33496bb89c708d0b98966b0084f0bd10
2018-09-04 14:31:27 -07:00
TreeHugger Robot
1eda2be769 Merge "Fixing execute bug in VTS tests for hardware composer" 2018-08-31 23:12:14 +00:00
Valerie Hau
e6683e2b06 Fixing execute bug in VTS tests for hardware composer
Bug: 113532117
Test: ./VtsHalGraphicsComposerV2_1TargetTest &&
./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I5c3485d45c798c40377e4567ab14cce667dd17ea
2018-08-31 10:47:50 -07:00
Peiyong Lin
5b42b97ec5 [Graphics] Only validate display in PresentOrValidateDisplay.
Previously we require display to be validated in onRefresh, however, onRefresh
can be called while validateDisplay is executing, results in next
presentDisplay being skipped. This patch makes sure we don't check validation
state when presentDisplay is called.

BUG: 80063800
Test: build, flash, boot and play Youtube videos.
Change-Id: I3d8686db3274436afb6605812641768296f1af0e
Merged-In: I3d8686db3274436afb6605812641768296f1af0e
2018-08-29 14:45:15 -07:00
Peiyong Lin
c64f5f53af [Graphics] Only validate display in PresentOrValidateDisplay.
Previously we require display to be validated in onRefresh, however, onRefresh
can be called while validateDisplay is executing, results in next
presentDisplay being skipped. This patch makes sure we don't check validation
state when presentDisplay is called.

BUG: 80063800
Test: build, flash, boot and play Youtube videos.
Change-Id: I3d8686db3274436afb6605812641768296f1af0e
2018-08-28 15:29:22 -07:00
Valerie Hau
defbad198a Adding more unit tests for hwc VTS
Bug: 111563608
Test: ./VtsHalGraphicsComposerV2_1TargetTest
Change-Id: I41a815c3716db9059572a2dbbbc36a90b7e08289
2018-08-23 16:36:27 -07:00
Valerie Hau
b8485526c4 Merge "Hardware composer VTS test harness" 2018-08-21 01:28:23 +00:00
Valerie Hau
667f11ab3a Hardware composer VTS test harness
Bug: 111563608
Test: VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I965efe8811e45a114978a9c8dd7a440c759787ec
2018-08-20 13:48:22 -07:00
TreeHugger Robot
0a6b9d9ea4 Merge "graphics: composer@2.2 does not require mapper@2.1" 2018-08-20 20:34:58 +00:00
Steven Moreland
fec4521e83 Merge "Update makefiles after native handle in Java." am: 1847a2f2e7 am: fb6a66b3f7
am: 9dc1ccc852

Change-Id: I30fda77e5c5657c00f57a85b959dfd853d535366
2018-08-14 19:38:07 -07:00
Steven Moreland
9dc1ccc852 Merge "Update makefiles after native handle in Java." am: 1847a2f2e7
am: fb6a66b3f7

Change-Id: Iee88bb1f9816230a1ea2373cca6a3f3bb5db2d6e
2018-08-14 15:59:59 -07:00
Steven Moreland
fb6a66b3f7 Merge "Update makefiles after native handle in Java."
am: 1847a2f2e7

Change-Id: I0f981009b2129436872e1e05a06c381c47701fdb
2018-08-14 15:53:31 -07:00
Steven Moreland
f5e4d7fb59 Update makefiles after native handle in Java.
Bug: 35098567
Test: N/A
Change-Id: I54b8d804e480cda09806f8028b966f28c4bd706e
2018-08-14 20:29:42 +00:00
Chia-I Wu
1c2621bf00 graphics: composer@2.2 does not require mapper@2.1
Fix composer@2.2 VTS to not require mapper@2.1.  We will need a
better test infra before things get too complex.

Bug: 112248843
Test: manual
Change-Id: Ia71a102742fd26f14e8edf3f43f3351786350ccd
2018-08-09 10:23:29 -07:00
Chia-I Wu
2209bcb186 graphics: test buffer allocation for thread safety
Bug: 111604912
Test: VTS
Change-Id: I1b6cacc8d6ff5e1c145425ff6f32001090b07b06
2018-08-01 10:01:38 -07:00
Chris Forbes
7df1440086 Merge "HWC2OnFbAdapter: don't claim present fences work" into pi-dev am: 1298fdb186
am: 243babadd0

Change-Id: I7a12386f7566896f18bfab51df97477c4e286b5d
2018-07-23 19:05:08 -07:00
Chris Forbes
243babadd0 Merge "HWC2OnFbAdapter: don't claim present fences work" into pi-dev
am: 1298fdb186

Change-Id: Id379641d2cf3c41ed242b8ed04c368449ef008e3
2018-07-23 14:44:32 -07:00
Chris Forbes
3fac35a98a HWC2OnFbAdapter: don't claim present fences work
We never produce real present fences, so indicate this to the
compositor. This will prevent GOOGLE_display_timing & friends from being
exposed in the client APIs.

Similar to previous change in HWC2On1Adapter.

Bug: b/111505197
Change-Id: I601a7f5628d4b218431fc0f1abb4807c9941ce64
2018-07-16 18:19:05 +00:00
Daniel Solomon
6594d34e55 Revert "graphics: restart HWC when SurfaceFlinger stops" am: a6f6fd7400
am: 8c7038045a

Change-Id: Ie2bc5069e9535880f3262e17f9773e8a202ee0ee
2018-06-22 14:55:02 -07:00
Daniel Solomon
8c7038045a Revert "graphics: restart HWC when SurfaceFlinger stops"
am: a6f6fd7400

Change-Id: I5a241ea6ee77ee18b865ae150c7abe05c6a19061
2018-06-22 14:51:59 -07:00
Daniel Solomon
a6f6fd7400 Revert "graphics: restart HWC when SurfaceFlinger stops"
This reverts commit 399a5b8d60dd845b86c43cf4de55dda4d47384c6; this
change is no longer needed and is causing instability on some devices.

Bug: 74199279
Change-Id: Ia8ee7ae0958df029beac9eb1d343995c54fa8798
2018-06-22 17:57:45 +00:00
Carmen Jackson
c9f27d00e5 Merge "Add hwcomposer to the system-background cpuset for hal v2.2" into pi-dev am: f053b3de23
am: db4740805a

Change-Id: Ie87f06f6689921ed1afaaaca168e19f8e5838232
2018-06-19 17:18:42 -07:00
Carmen Jackson
db4740805a Merge "Add hwcomposer to the system-background cpuset for hal v2.2" into pi-dev
am: f053b3de23

Change-Id: Iab3ceb5c8d33786c851a162716fd9fffdc13f215
2018-06-19 17:14:17 -07:00