xref: /aosp_15_r20/external/drm_hwcomposer/compositor/DisplayInfo.h (revision 0a9764fe0a15e71ebbeb85e87e10990c23aab47f)
1*0a9764feSAndroid Build Coastguard Worker /*
2*0a9764feSAndroid Build Coastguard Worker  * Copyright (C) 2024 The Android Open Source Project
3*0a9764feSAndroid Build Coastguard Worker  *
4*0a9764feSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*0a9764feSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*0a9764feSAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*0a9764feSAndroid Build Coastguard Worker  *
8*0a9764feSAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
9*0a9764feSAndroid Build Coastguard Worker  *
10*0a9764feSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*0a9764feSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*0a9764feSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*0a9764feSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*0a9764feSAndroid Build Coastguard Worker  * limitations under the License.
15*0a9764feSAndroid Build Coastguard Worker  */
16*0a9764feSAndroid Build Coastguard Worker 
17*0a9764feSAndroid Build Coastguard Worker #pragma once
18*0a9764feSAndroid Build Coastguard Worker 
19*0a9764feSAndroid Build Coastguard Worker #include <cstdint>
20*0a9764feSAndroid Build Coastguard Worker 
21*0a9764feSAndroid Build Coastguard Worker enum class Colorspace : int32_t {
22*0a9764feSAndroid Build Coastguard Worker   kDefault,
23*0a9764feSAndroid Build Coastguard Worker   kSmpte170MYcc,
24*0a9764feSAndroid Build Coastguard Worker   kBt709Ycc,
25*0a9764feSAndroid Build Coastguard Worker   kXvycc601,
26*0a9764feSAndroid Build Coastguard Worker   kXvycc709,
27*0a9764feSAndroid Build Coastguard Worker   kSycc601,
28*0a9764feSAndroid Build Coastguard Worker   kOpycc601,
29*0a9764feSAndroid Build Coastguard Worker   kOprgb,
30*0a9764feSAndroid Build Coastguard Worker   kBt2020Cycc,
31*0a9764feSAndroid Build Coastguard Worker   kBt2020Rgb,
32*0a9764feSAndroid Build Coastguard Worker   kBt2020Ycc,
33*0a9764feSAndroid Build Coastguard Worker   kDciP3RgbD65,
34*0a9764feSAndroid Build Coastguard Worker   kDciP3RgbTheater,
35*0a9764feSAndroid Build Coastguard Worker   kRgbWideFixed,
36*0a9764feSAndroid Build Coastguard Worker   kRgbWideFloat,
37*0a9764feSAndroid Build Coastguard Worker   kBt601Ycc,
38*0a9764feSAndroid Build Coastguard Worker };
39*0a9764feSAndroid Build Coastguard Worker 
40*0a9764feSAndroid Build Coastguard Worker /**
41*0a9764feSAndroid Build Coastguard Worker  * Display panel orientation property values.
42*0a9764feSAndroid Build Coastguard Worker  */
43*0a9764feSAndroid Build Coastguard Worker enum PanelOrientation {
44*0a9764feSAndroid Build Coastguard Worker   kModePanelOrientationNormal = 0,
45*0a9764feSAndroid Build Coastguard Worker   kModePanelOrientationBottomUp,
46*0a9764feSAndroid Build Coastguard Worker   kModePanelOrientationLeftUp,
47*0a9764feSAndroid Build Coastguard Worker   kModePanelOrientationRightUp
48*0a9764feSAndroid Build Coastguard Worker };
49*0a9764feSAndroid Build Coastguard Worker 
50*0a9764feSAndroid Build Coastguard Worker struct QueuedConfigTiming {
51*0a9764feSAndroid Build Coastguard Worker   // In order for the new config to be applied, the client must send a new frame
52*0a9764feSAndroid Build Coastguard Worker   // at this time.
53*0a9764feSAndroid Build Coastguard Worker   int64_t refresh_time_ns;
54*0a9764feSAndroid Build Coastguard Worker 
55*0a9764feSAndroid Build Coastguard Worker   // The time when the display will start to refresh at the new vsync period.
56*0a9764feSAndroid Build Coastguard Worker   int64_t new_vsync_time_ns;
57*0a9764feSAndroid Build Coastguard Worker };
58