blob: 60445f53276b238e6e4c453c2a349c71eb9b0570 [file] [log] [blame]
Peiyong Lin781d0bb2019-07-03 10:57:02 -07001/*
2 * Copyright 2019 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
17package android.hardware.graphics.composer@2.4;
18
19import @2.1::Display;
20import @2.1::Error;
21import @2.3::IComposerClient;
22
23interface IComposerClient extends @2.3::IComposerClient {
Peiyong Lin781d0bb2019-07-03 10:57:02 -070024 /**
25 * Required capabilities which are supported by the display. The
26 * particular set of supported capabilities for a given display may be
27 * retrieved using getDisplayCapabilities.
28 */
Dominik Laskowskice44a4b2019-09-19 15:50:09 -070029 enum DisplayCapability : @2.3::IComposerClient.DisplayCapability {
Peiyong Lin781d0bb2019-07-03 10:57:02 -070030 /**
31 * Indicates that the display supports protected contents.
32 * When returned, hardware composer must be able to accept client target
33 * with protected buffers.
34 */
35 PROTECTED_CONTENTS = 4,
36 };
37
38 /**
Dominik Laskowskice44a4b2019-09-19 15:50:09 -070039 * Supersedes {@link @2.1::IComposerClient.DisplayType}.
40 */
41 enum DisplayConnectionType : uint32_t {
42 /**
43 * Display is connected through internal port, e.g. DSI, eDP.
44 */
45 INTERNAL = 0,
46 /**
47 * Display is connected through external port, e.g. HDMI, DisplayPort.
48 */
49 EXTERNAL = 1,
50 };
51
52 /**
Peiyong Lin781d0bb2019-07-03 10:57:02 -070053 * Provides a list of supported capabilities (as described in the
54 * definition of DisplayCapability above). This list must not change after
55 * initialization.
56 *
57 * @return error is NONE upon success. Otherwise,
58 * BAD_DISPLAY when an invalid display handle was passed in.
59 * @return capabilities is a list of supported capabilities.
60 */
61 getDisplayCapabilities_2_4(Display display)
Dominik Laskowskice44a4b2019-09-19 15:50:09 -070062 generates (Error error, vec<DisplayCapability> capabilities);
63
64 /**
65 * Returns whether the given physical display is internal or external.
66 *
67 * @return error is NONE upon success. Otherwise,
68 * BAD_DISPLAY when the given display is invalid or virtual.
69 * @return type is the connection type of the display.
70 */
71 getDisplayConnectionType(Display display) generates (Error error, DisplayConnectionType type);
Peiyong Lin781d0bb2019-07-03 10:57:02 -070072};