• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <gtest/gtest.h>
18 
19 #include <cstdlib>
20 
21 #include "include/igt_test_helper.h"
22 
23 namespace igt {
24 namespace {
25 
26 /**
27  * TEST: kms plane lowres
28  * Category: Display
29  * Description: Test atomic mode setting with a plane by switching between high
30  *              and low resolutions
31  * Functionality: plane, tiling
32  * Mega feature: General Display Features
33  * Test category: functionality test
34  */
35 
36 class KmsPlaneLowresTests : public ::testing::TestWithParam<IgtSubtestParams>,
37                             public IgtTestHelper {
38 public:
KmsPlaneLowresTests()39   KmsPlaneLowresTests() : IgtTestHelper("kms_plane_lowres") {}
40 };
41 
42 constexpr std::string_view kDescription =
43     "Tests the visibility of the planes when switching between high and low "
44     "resolution";
45 constexpr std::string_view kRationale =
46     "revealing issues with memory management or the interaction between "
47     "scaling and tiling";
48 
49 IgtSubtestParams subtests[] = {
50     // Fundamental Validation tests.
51     {.name = "tiling-none", .desc = kDescription, .rationale = kRationale},
52     {.name = "tiling-x", .desc = kDescription, .rationale = kRationale},
53     {.name = "tiling-y", .desc = kDescription, .rationale = kRationale},
54     {.name = "tiling-4", .desc = kDescription, .rationale = kRationale},
55 
56 };
57 
TEST_P(KmsPlaneLowresTests,RunSubTests)58 TEST_P(KmsPlaneLowresTests, RunSubTests) { runSubTest(GetParam()); }
59 
60 INSTANTIATE_TEST_SUITE_P(KmsPlaneLowresTests, KmsPlaneLowresTests,
61                          ::testing::ValuesIn(subtests),
62                          IgtTestHelper::generateGTestName);
63 
64 } // namespace
65 } // namespace igt
66