commonsys-intf: services: upgrade IDC for backward compatible.

The IDC libs in vendor and system images are not compatible due
to diverged changes. E.g., in legacy vendor kGetDisplayTileCount
op code is 50, while in new system images op code 50 stands for
kDummyOpCode. This breaks the backward compatibility. So upgrade
IDC interface in system image to fix the backward compatible
issues for vendor freeze targets.

Change-Id: I170c279f958e33e143677c9888aca462a9d2874f
This commit is contained in:
Ray Zhang
2021-09-10 17:45:02 +08:00
committed by Gerrit - the friendly Code Review server
parent f5ba1034e7
commit 9b26ac05a7

View File

@@ -27,11 +27,48 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Changes from Qualcomm Innovation Center are provided under the following license:
*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of it
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
*/
#ifndef __CONFIG_DEFS_H__
#define __CONFIG_DEFS_H__
#include <vector>
#include <string>
#include <errno.h>
#include <cutils/native_handle.h>
@@ -44,6 +81,9 @@
#define DISPLAY_CONFIG_API_LEVEL_1
#define DISPLAY_CONFIG_API_LEVEL_2
#define DISPLAY_CONFIG_CAMERA_SMOOTH_APIs_1_0
#define DISPLAY_CONFIG_TILE_DISPLAY_APIS_1_0
namespace DisplayConfig {
// enum definitions
@@ -102,6 +142,11 @@ enum class TUIEventType : int {
kEndTUITransition,
};
enum class CameraSmoothOp : int {
kOff,
kOn,
};
// Input and Output Params structures
struct Attributes {
uint32_t vsync_period = 0;
@@ -241,6 +286,36 @@ struct SupportedModesParams {
uint32_t mode = 0;
};
struct PowerModeTiledParams {
uint64_t physical_disp_id = 0;
PowerMode power_mode = PowerMode::kOn;
uint32_t tile_h_loc = 0;
uint32_t tile_v_loc = 0;
};
struct PanelBrightnessTiledParams {
uint64_t physical_disp_id = 0;
uint32_t level = 255;
uint32_t tile_h_loc = 0;
uint32_t tile_v_loc = 0;
};
enum class WiderModePref : int {
kNoPreference,
kWiderAsyncMode,
kWiderSyncMode
};
struct WiderModePrefParams {
uint64_t physical_disp_id = 0;
WiderModePref mode_pref = WiderModePref::kNoPreference;
};
struct CameraSmoothInfo {
CameraSmoothOp op = CameraSmoothOp::kOff;
uint32_t fps = 0;
};
/* Callback Interface */
class ConfigCallback {
public:
@@ -248,6 +323,7 @@ class ConfigCallback {
virtual void NotifyQsyncChange(bool /* qsync_enabled */ , int /* refresh_rate */,
int /* qsync_refresh_rate */) { }
virtual void NotifyIdleStatus(bool /* is_idle */) { }
virtual void NotifyCameraSmoothInfo(CameraSmoothOp /* op */, uint32_t /* fps */) { }
protected:
virtual ~ConfigCallback() { }
@@ -277,6 +353,7 @@ class ConfigInterface {
virtual int SetIdleTimeout(uint32_t /* value */) DEFAULT_RET
virtual int GetHDRCapabilities(DisplayType /* dpy */, HDRCapsParams* /* caps */) DEFAULT_RET
virtual int SetCameraLaunchStatus(uint32_t /* on */) DEFAULT_RET
virtual int SetCameraSmoothInfo(CameraSmoothOp /* op */, uint32_t /* fps */) DEFAULT_RET
virtual int DisplayBWTransactionPending(bool* /* status */) DEFAULT_RET
virtual int SetDisplayAnimating(uint64_t /* display_id */, bool /* animating */) DEFAULT_RET
virtual int ControlIdlePowerCollapse(bool /* enable */, bool /* synchronous */) DEFAULT_RET
@@ -326,6 +403,18 @@ class ConfigInterface {
virtual int GetDisplayType(uint64_t /* physical_disp_id */,
DisplayType* /* disp_type */) DEFAULT_RET
virtual int AllowIdleFallback() DEFAULT_RET
virtual int GetDisplayTileCount(uint64_t /* physical_disp_id */,
uint32_t* /* Display h tiles count (Min. 1 tile) */,
uint32_t* /* Display v tiles count (Min. 1 tile) */) DEFAULT_RET
virtual int SetPowerModeTiled(uint64_t /* physical_disp_id */, PowerMode /* power_mode */,
uint32_t /* Display tile h location */,
uint32_t /* Display tile v location */) DEFAULT_RET
virtual int SetPanelBrightnessTiled(uint64_t /* physical_disp_id */, uint32_t /* level */,
uint32_t /* Display tile h location */,
uint32_t /* Display tile v location */) DEFAULT_RET
virtual int SetWiderModePreference(uint64_t /* physical_disp_id */,
WiderModePref /* mode_pref */) DEFAULT_RET
virtual int ControlCameraSmoothCallback(bool /* enable */) DEFAULT_RET
virtual int DummyDisplayConfigAPI() DEFAULT_RET
// deprecated APIs