Commit Graph

237 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Carmen Jackson
76fa88e7a0 Add hwcomposer to the system-background cpuset for hal v2.2
This change was made for hal v2.1 but not cross-ported to 2.2.

Bug: 110167043
Test: $ adb shell ps -A | grep composer
system  630 ...  android.hardware.graphics.composer@2.2-service
$ adb shell cat /proc/630/cpuset
/system-background

Change-Id: I40b8a0386a7cf67fe64b1e0e40d81b78891faaca
2018-06-18 17:32:28 -07:00
huans
1be9461f7a Merge "SetColorMode is not available for vendor hwc less than 1.4" into pi-dev am: 308d390720
am: 715a9092b0

Change-Id: I24dd9cf4e36dc305fb3572e1f9abf353df67c5a4
2018-06-05 22:00:46 -07:00
huans
715a9092b0 Merge "SetColorMode is not available for vendor hwc less than 1.4" into pi-dev
am: 308d390720

Change-Id: I912853f863d6bf18c09f7385b099e2a7d0d7030b
2018-06-05 21:56:46 -07:00
TreeHugger Robot
308d390720 Merge "SetColorMode is not available for vendor hwc less than 1.4" into pi-dev 2018-06-06 04:48:34 +00:00
huans
f579ea47aa SetColorMode is not available for vendor hwc less than 1.4
Bug: 90510785
Test: VTS VtsHalGraphicsComposerV2_1Target SetColorMode(default) pass
Change-Id: Ia295b3ef2f0f433a7e1b5179eb230b8f7c649400
2018-06-01 14:33:30 -07:00
Chia-I Wu
479085d913 graphics: replace hidl_enum_iterator by hidl_enum_range
Change-Id: I012aa2bcbb81105ea1a1ec05a577f3bb8136b0da
Merged-In: I2180f18e8742850f728491887475f16b1cad4791
2018-05-31 08:40:24 -07:00
Chia-I Wu
dcb3ba075f Merge "graphics: COLORIMETRIC is optional for HDR modes" into pi-dev
am: 739c3177ea

Change-Id: Ida893aaf12b8750e5a96060c6edece486b4f9ad9
2018-05-30 17:09:13 -07:00
Chia-I Wu
8f5a17d1e8 graphics: COLORIMETRIC is optional for HDR modes
Bug: 80030364
Test: VTS
Change-Id: I2180f18e8742850f728491887475f16b1cad4791
Merged-In: I2180f18e8742850f728491887475f16b1cad4791
2018-05-30 11:52:57 -07:00
Chia-I Wu
513e4e1008 graphics: COLORIMETRIC is optional for HDR modes
Bug: 80030364
Test: VTS
Change-Id: I2180f18e8742850f728491887475f16b1cad4791
2018-05-30 11:52:48 -07:00
Chia-I Wu
d0d50652fb graphics: fix readback buffer tests
am: 09782444e3

Change-Id: I15b2eb478edcef44169005c51611e1fcb4210453
2018-05-23 13:25:57 -07:00
Chia-I Wu
09782444e3 graphics: fix readback buffer tests
Make readback buffer support optional.  Fix incorrect use of
setReadbackBuffer and getReadbackBufferFence.

Bug:  80030364
Test: VTS
Change-Id: I278a031c3c086ac38c460b7076a2952db57a91a4
Merged-In: I278a031c3c086ac38c460b7076a2952db57a91a4
2018-05-22 15:17:50 -07:00
Chia-I Wu
76630c6567 graphics: fix readback buffer tests
Make readback buffer support optional.  Fix incorrect use of
setReadbackBuffer and getReadbackBufferFence.

Bug:  80030364
Test: VTS
Change-Id: I278a031c3c086ac38c460b7076a2952db57a91a4
2018-05-22 13:05:26 -07:00
Steven Moreland
39faf7e2ed Merge "Update comments for doc comments." into pi-dev am: cce4c95c1c
am: cbc30e1f58

Change-Id: I9f7d33cdd3c40e28c0341df2e8a8bd298ec52b79
2018-05-18 18:55:50 -07:00
Steven Moreland
cbc30e1f58 Merge "Update comments for doc comments." into pi-dev
am: cce4c95c1c

Change-Id: Id691cf973a214ee1d2f62297c13c8c030fc7a8bb
2018-05-18 18:43:45 -07:00
Steven Moreland
4ee4582230 Update comments for doc comments.
Doc comments look like "/** ... */" and they
can only be in certain places.

Bug: 79865343
Test: m
Change-Id: Ic15c08ff7dc6e4f9827c1dbe7f7236c11a572ec1
2018-05-18 10:10:32 -07:00
Dan Stoza
aaa8dfb47d Merge "Composer 2.2: Fix readback docs" into pi-dev am: 066288295e
am: cdf9c58712

Change-Id: I697e84dbd3fa257791293028e039b2ff4a261d54
2018-05-16 16:22:54 -07:00
Dan Stoza
cdf9c58712 Merge "Composer 2.2: Fix readback docs" into pi-dev
am: 066288295e

Change-Id: I6721a52dbdb7141b84dde0516be6923b4016d7fa
2018-05-16 15:52:52 -07:00
Dan Stoza
e7bd22299a Composer 2.2: Fix readback docs
Fixes a couple of problems with the return codes in the readback
documentation and adds a paragraph of clarification about when
getReadbackBufferAttributes will be called.

Bug: 67048889
Test: N/A, doc fix only
Change-Id: Ic91b8db207c1b4b1f18777bd316279747506149b
2018-05-16 14:18:08 -07:00