xref: /aosp_15_r20/external/drm_hwcomposer/compositor/DisplayInfo.h (revision 0a9764fe0a15e71ebbeb85e87e10990c23aab47f)
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 #pragma once
18 
19 #include <cstdint>
20 
21 enum class Colorspace : int32_t {
22   kDefault,
23   kSmpte170MYcc,
24   kBt709Ycc,
25   kXvycc601,
26   kXvycc709,
27   kSycc601,
28   kOpycc601,
29   kOprgb,
30   kBt2020Cycc,
31   kBt2020Rgb,
32   kBt2020Ycc,
33   kDciP3RgbD65,
34   kDciP3RgbTheater,
35   kRgbWideFixed,
36   kRgbWideFloat,
37   kBt601Ycc,
38 };
39 
40 /**
41  * Display panel orientation property values.
42  */
43 enum PanelOrientation {
44   kModePanelOrientationNormal = 0,
45   kModePanelOrientationBottomUp,
46   kModePanelOrientationLeftUp,
47   kModePanelOrientationRightUp
48 };
49 
50 struct QueuedConfigTiming {
51   // In order for the new config to be applied, the client must send a new frame
52   // at this time.
53   int64_t refresh_time_ns;
54 
55   // The time when the display will start to refresh at the new vsync period.
56   int64_t new_vsync_time_ns;
57 };
58