1 /* 2 * Copyright (C) 2012 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 #ifndef ANDROID_EXYNOS_IHWC_H_ 18 #define ANDROID_EXYNOS_IHWC_H_ 19 20 #include <stdint.h> 21 #include <sys/types.h> 22 #include <vector> 23 24 #include <utils/Errors.h> 25 #include <utils/RefBase.h> 26 #include <binder/IInterface.h> 27 28 namespace android { 29 30 class IExynosHWCService : public IInterface { 31 public: 32 33 DECLARE_META_INTERFACE(ExynosHWCService); 34 35 virtual int addVirtualDisplayDevice() = 0; 36 virtual int destroyVirtualDisplayDevice() = 0; 37 38 /* 39 * setWFDMode() function sets the WFD operation Mode. 40 * It enables / disables the WFD. 41 */ 42 virtual int setWFDMode(unsigned int mode) = 0; 43 virtual int getWFDMode() = 0; 44 virtual int sendWFDCommand(int32_t cmd, int32_t ext1, int32_t ext2) = 0; 45 virtual int setSecureVDSMode(unsigned int mode) = 0; 46 virtual int setWFDOutputResolution(unsigned int width, unsigned int height) = 0; 47 virtual void getWFDOutputResolution(unsigned int *width, unsigned int *height) = 0; 48 virtual void setPresentationMode(bool use) = 0; 49 virtual int getPresentationMode(void) = 0; 50 virtual int setVDSGlesFormat(int format) = 0; 51 virtual int getExternalDisplayConfigs() = 0; 52 virtual int setExternalDisplayConfig(unsigned int index) = 0; 53 virtual int setExternalVsyncEnabled(unsigned int index) = 0; 54 virtual int getExternalHdrCapabilities() = 0; 55 virtual void setBootFinished(void) = 0; 56 virtual void enableMPP(uint32_t physicalType, uint32_t physicalIndex, uint32_t logicalIndex, uint32_t enable) = 0; 57 virtual void setScaleDownRatio(uint32_t physicalType, uint32_t physicalIndex, 58 uint32_t logicalIndex, uint32_t scaleDownRatio) = 0; 59 virtual void setHWCDebug(int debug) = 0; 60 virtual uint32_t getHWCDebug() = 0; 61 virtual void setHWCFenceDebug(uint32_t ipNum, uint32_t fenceNum, uint32_t mode) = 0; 62 virtual void getHWCFenceDebug() = 0; 63 virtual int setHWCCtl(uint32_t display, uint32_t ctrl, int32_t val) = 0; 64 65 virtual int setDDIScaler(uint32_t width, uint32_t height) = 0; 66 67 virtual int32_t setDisplayDeviceMode(int32_t display_id, int32_t mode) = 0; 68 virtual int32_t setPanelGammaTableSource(int32_t display_id, int32_t type, int32_t source) = 0; 69 virtual void setLbeCtrl(uint32_t display_id, uint32_t state, uint32_t lux) = 0; 70 /* 71 virtual void notifyPSRExit() = 0; 72 */ 73 virtual int32_t setDisplayBrightness(int32_t display_id, float brightness) = 0; 74 virtual int32_t setDisplayLhbm(int32_t display_id, uint32_t on) = 0; 75 virtual int32_t setMinIdleRefreshRate(uint32_t display_id, int32_t refresh_rate) = 0; 76 virtual int32_t setRefreshRateThrottle(uint32_t display_id, int32_t throttle) = 0; 77 }; 78 79 /* Native Interface */ 80 class BnExynosHWCService : public BnInterface<IExynosHWCService> { 81 public: 82 virtual status_t onTransact( uint32_t code, 83 const Parcel& data, 84 Parcel* reply, 85 uint32_t flags = 0); 86 87 }; 88 } 89 #endif 90