diff options
author | Ray Zhang <rayz@codeaurora.org> | 2021-09-10 17:45:02 +0800 |
---|---|---|
committer | Ray Zhang <rayz@codeaurora.org> | 2021-10-25 11:26:39 +0800 |
commit | ac26cc78fd0f3b7cb5f61a14bc29bcbddada4cec (patch) | |
tree | 8ca3be4659d4eba9b4ac849edc38b71c46c6871d | |
parent | 6383d0eeaad06c658b6ca78cbe1c5f71c4b37bb3 (diff) |
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
-rw-r--r-- | services/config/config_defs.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/services/config/config_defs.h b/services/config/config_defs.h index 56434c01..5572d632 100644 --- a/services/config/config_defs.h +++ b/services/config/config_defs.h @@ -32,6 +32,7 @@ #include <vector> #include <string> + #include <errno.h> #include <cutils/native_handle.h> @@ -44,6 +45,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 +106,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 +250,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 +287,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 +317,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 +367,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 |