composer: vts: update getClientTargetSupport tests

Ensure the primary display to set power on before running
getClientTargetSupport tests for VTS 2.1 - 2.3.

Bug: 308252481
Test: atest VtsHalGraphicsComposerV2_1TargetTest
Test: atest VtsHalGraphicsComposerV2_2TargetTest
Test: atest VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I6b793537ee42c87f37c4c1d7141364541f448134
This commit is contained in:
Wiwit Rifa'i 2024-01-04 17:51:34 +08:00
parent ead40c477c
commit c67c887c5a
3 changed files with 6 additions and 0 deletions

View file

@ -315,6 +315,8 @@ TEST_P(GraphicsComposerHidlTest, GetDisplayType) {
* required client targets.
*/
TEST_P(GraphicsComposerHidlTest, GetClientTargetSupport) {
ASSERT_NO_FATAL_FAILURE(
mComposerClient->setPowerMode(mPrimaryDisplay, IComposerClient::PowerMode::ON));
std::vector<Config> configs = mComposerClient->getDisplayConfigs(mPrimaryDisplay);
for (auto config : configs) {
int32_t width = mComposerClient->getDisplayAttribute(mPrimaryDisplay, config,

View file

@ -256,6 +256,8 @@ TEST_P(GraphicsComposerHidlTest, CreateVirtualDisplay_2_2) {
* required client targets.
*/
TEST_P(GraphicsComposerHidlTest, GetClientTargetSupport_2_2) {
ASSERT_NO_FATAL_FAILURE(
mComposerClient->setPowerMode_2_2(mPrimaryDisplay, IComposerClient::PowerMode::ON));
std::vector<Config> configs = mComposerClient->getDisplayConfigs(mPrimaryDisplay);
for (auto config : configs) {
int32_t width = mComposerClient->getDisplayAttribute(mPrimaryDisplay, config,

View file

@ -274,6 +274,8 @@ TEST_P(GraphicsComposerHidlTest, GetReadbackBufferAttributes_2_3) {
* Test IComposerClient::getClientTargetSupport_2_3
*/
TEST_P(GraphicsComposerHidlTest, GetClientTargetSupport_2_3) {
ASSERT_NO_FATAL_FAILURE(
mComposerClient->setPowerMode_2_2(mPrimaryDisplay, IComposerClient::PowerMode::ON));
std::vector<V2_1::Config> configs = mComposerClient->getDisplayConfigs(mPrimaryDisplay);
for (auto config : configs) {
int32_t width = mComposerClient->getDisplayAttribute(mPrimaryDisplay, config,