| /* |
| * Copyright (c) 2017 The Linux Foundation. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are |
| * met: |
| * * Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * * Redistributions in binary form must reproduce the above |
| * copyright notice, this list of conditions and the following |
| * disclaimer in the documentation and/or other materials provided |
| * with the distribution. |
| * * Neither the name of The Linux Foundation. nor the names of its |
| * contributors may be used to endorse or promote products derived |
| * from this software without specific prior written permission. |
| * |
| * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| package vendor.display.config@1.0; |
| |
| interface IDisplayConfig { |
| enum DisplayType : int32_t { |
| INVALID = -1, |
| |
| DISPLAY_PRIMARY = 0, |
| DISPLAY_EXTERNAL = 1, |
| DISPLAY_VIRTUAL = 2, |
| }; |
| |
| enum DisplayExternalStatus : int32_t { |
| INVALID = -1, |
| |
| EXTERNAL_OFFLINE = 0, |
| EXTERNAL_ONLINE = 1, |
| EXTERNAL_PAUSE = 2, |
| EXTERNAL_RESUME = 3, |
| }; |
| |
| enum DisplayDynRefreshRateOp : int32_t { |
| INVALID = -1, |
| |
| DISABLE_METADATA_DYN_REFRESH_RATE = 0, |
| ENABLE_METADATA_DYN_REFRESH_RATE = 1, |
| SET_BINDER_DYN_REFRESH_RATE = 2, |
| }; |
| |
| enum DisplayPortType : int32_t { |
| INVALID = -1, |
| |
| DISPLAY_PORT_DEFAULT = 0, |
| DISPLAY_PORT_DSI = 1, |
| DISPLAY_PORT_DTV = 2, |
| DISPLAY_PORT_WRITEBACK = 3, |
| DISPLAY_PORT_LVDS = 4, |
| DISPLAY_PORT_EDP = 5, |
| DISPLAY_PORT_DP = 6, |
| }; |
| |
| struct DisplayAttributes { |
| uint32_t vsyncPeriod; |
| uint32_t xRes; |
| uint32_t yRes; |
| float xDpi; |
| float yDpi; |
| DisplayPortType panelType; |
| bool isYuv; |
| }; |
| |
| struct DisplayHDRCapabilities { |
| vec<int32_t> supportedHdrTypes; |
| float maxLuminance; |
| float maxAvgLuminance; |
| float minLuminance; |
| }; |
| |
| /* |
| * Returns connection status of an external display. |
| * |
| * @return true when connected, false when disconnected. |
| */ |
| @callflow(next="*") |
| isDisplayConnected(DisplayType dpy) generates (int32_t error, bool status); |
| |
| /* |
| * Sets the secondary display status (pause/resume/offline) etc. |
| * |
| * @param dpy display type. |
| * @param status next status to be set. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| setSecondayDisplayStatus(DisplayType dpy, |
| DisplayExternalStatus status) |
| generates (int32_t error); |
| |
| /* |
| * Enable/Disable/Set refresh rate dynamically |
| * |
| * @param op operation code defined in DisplayDynRefreshRateOp. |
| * @param refreshRate refresh rate value. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| configureDynRefeshRate(DisplayDynRefreshRateOp op, |
| uint32_t refreshRate) |
| generates (int32_t error); |
| |
| /* |
| * Returns the number of configuration given display can support. |
| * |
| * @param dpy display type. |
| * |
| * @return error is NONE upon success. |
| * |
| * @param count number of configurations. |
| */ |
| @callflow(next="*") |
| getConfigCount(DisplayType dpy) generates (int32_t error, uint32_t count); |
| |
| /* |
| * Returns the index of config that is current set for the display. |
| * |
| * @param dpy display type. |
| * |
| * @return error is NONE upon success. |
| * |
| * @param config config index. |
| */ |
| @callflow(next="*") |
| getActiveConfig(DisplayType dpy) generates (int32_t error, uint32_t config); |
| |
| /* |
| * Set a new display configuration pointed by the index. |
| * |
| * @param dpy display type. |
| * @param config config index. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| setActiveConfig(DisplayType dpy, uint32_t config) generates (int32_t error); |
| |
| /* |
| * Returns the attributes for the specified config for the display. |
| * |
| * @param configIndex config index. |
| * @param dpy display type. |
| * |
| * @return error is NONE upon success. |
| * |
| * @param attributes display attributes. |
| */ |
| @callflow(next="*") |
| getDisplayAttributes(uint32_t configIndex, |
| DisplayType dpy) |
| generates (int32_t error, |
| DisplayAttributes attributes); |
| |
| /* |
| * Sets the panel brightness of the primary display. |
| * |
| * @param level brightness level. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| setPanelBrightness(uint32_t level) generates (int32_t error); |
| |
| /* |
| * Sets the panel brightness of the primary display. |
| * |
| * @return level brightness level. |
| */ |
| @callflow(next="*") |
| getPanelBrightness() generates (int32_t error, uint32_t level); |
| |
| /* |
| * Indicates display about a change in minimum encryption level. |
| * |
| * @param dpy display type. |
| * @param min_enc_level encryption level. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| minHdcpEncryptionLevelChanged(DisplayType dpy, |
| uint32_t min_enc_level) |
| generates (int32_t error); |
| |
| /* |
| * Requests display to recompose and invalidate the display pipeline. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| refreshScreen() generates (int32_t error); |
| |
| /* |
| * Enable/Disable partial update. |
| * |
| * @param dpy display type. |
| * @param enable enable/disable. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| controlPartialUpdate(DisplayType dpy, |
| bool enable) |
| generates (int32_t error); |
| |
| /* |
| * Toggle screen update. |
| * |
| * @param on Pause display and drop incoming draw cycles if true. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| toggleScreenUpdate(bool on) generates (int32_t error); |
| |
| /* |
| * Set idle timeout value for video mode panels. |
| * |
| * @param value Idle timeout value. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| setIdleTimeout(uint32_t value) generates (int32_t error); |
| |
| /* |
| * Returns HDR capabilities for the specified display. |
| * |
| * @param dpy display type. |
| * |
| * @return error is NONE upon success. |
| * |
| * @param caps HDR capabilities. |
| */ |
| @callflow(next="*") |
| getHDRCapabilities(DisplayType dpy) |
| generates (int32_t error, |
| DisplayHDRCapabilities caps); |
| |
| /* |
| * Sets camera application start/stop status. |
| * |
| * @param on Camera is started if true. |
| * |
| * @return error is NONE upon success. |
| */ |
| @callflow(next="*") |
| setCameraLaunchStatus(uint32_t on) generates (int32_t error); |
| |
| /* |
| * Check bandwidth transaction status. |
| * |
| * @return status true if transaction is still pending. |
| */ |
| @callflow(next="*") |
| displayBWTransactionPending() generates (int32_t error, bool status); |
| }; |