2 // Copyright (c) 2017 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef OS_ANDROID_HWC_ICONTROLS_H_
18 #define OS_ANDROID_HWC_ICONTROLS_H_
20 #include "hwcserviceapi.h"
21 #include <binder/IInterface.h>
22 #include <binder/Parcel.h>
24 namespace hwcomposer {
26 class IControls : public android::IInterface {
28 DECLARE_META_INTERFACE(Controls);
30 virtual status_t DisplaySetOverscan(uint32_t display, int32_t xoverscan,
31 int32_t yoverscan) = 0;
32 virtual status_t DisplayGetOverscan(uint32_t display, int32_t *xoverscan,
33 int32_t *yoverscan) = 0;
34 virtual status_t DisplaySetScaling(uint32_t display,
35 EHwcsScalingMode eScalingMode) = 0;
36 virtual status_t DisplayGetScaling(uint32_t display,
37 EHwcsScalingMode *eScalingMode) = 0;
38 virtual status_t DisplayEnableBlank(uint32_t display, bool blank) = 0;
39 virtual status_t DisplayRestoreDefaultColorParam(uint32_t display,
40 EHwcsColorControl color) = 0;
41 virtual status_t DisplayGetColorParam(uint32_t display,
42 EHwcsColorControl color, float *value,
43 float *startvalue, float *endvalue) = 0;
44 virtual status_t DisplaySetColorParam(uint32_t display,
45 EHwcsColorControl color,
48 virtual std::vector<HwcsDisplayModeInfo> DisplayModeGetAvailableModes(
49 uint32_t display) = 0;
50 virtual status_t DisplayModeGetMode(uint32_t display,
51 HwcsDisplayModeInfo *pMode) = 0;
52 virtual status_t DisplayModeSetMode(uint32_t display,
53 const uint32_t config) = 0;
55 virtual status_t VideoEnableEncryptedSession(uint32_t sessionID,
56 uint32_t instanceID) = 0;
57 virtual status_t VideoDisableAllEncryptedSessions(uint32_t sessionID) = 0;
58 virtual status_t VideoDisableAllEncryptedSessions() = 0;
59 virtual bool VideoIsEncryptedSessionEnabled(uint32_t sessionID,
60 uint32_t instanceID) = 0;
61 virtual status_t VideoSetOptimizationMode(EHwcsOptimizationMode mode) = 0;
63 virtual status_t MdsUpdateVideoState(int64_t videoSessionID,
65 virtual status_t MdsUpdateVideoFPS(int64_t videoSessionID, int32_t fps) = 0;
66 virtual status_t MdsUpdateInputState(bool state) = 0;
68 virtual status_t WidiGetSingleDisplay(bool *pEnabled) = 0;
69 virtual status_t WidiSetSingleDisplay(bool enable) = 0;
72 class BnControls : public android::BnInterface<IControls> {
74 status_t onTransact(uint32_t, const android::Parcel &, android::Parcel *,
78 } // namespace hwcomposer
80 #endif // OS_ANDROID_HWC_ICONTROLS_H_