diff options
Diffstat (limited to 'sdm/libs/hwc2/hwc_session.h')
-rw-r--r-- | sdm/libs/hwc2/hwc_session.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/sdm/libs/hwc2/hwc_session.h b/sdm/libs/hwc2/hwc_session.h index 725e9836..b34f0aa4 100644 --- a/sdm/libs/hwc2/hwc_session.h +++ b/sdm/libs/hwc2/hwc_session.h @@ -20,7 +20,11 @@ #ifndef __HWC_SESSION_H__ #define __HWC_SESSION_H__ -#ifdef DISPLAY_CONFIG_1_1 +#ifdef DISPLAY_CONFIG_1_3 +#include <vendor/display/config/1.3/IDisplayConfig.h> +#elif DISPLAY_CONFIG_1_2 +#include <vendor/display/config/1.2/IDisplayConfig.h> +#elif DISPLAY_CONFIG_1_1 #include <vendor/display/config/1.1/IDisplayConfig.h> #else #include <vendor/display/config/1.0/IDisplayConfig.h> @@ -40,7 +44,11 @@ namespace sdm { -#ifdef DISPLAY_CONFIG_1_1 +#ifdef DISPLAY_CONFIG_1_3 +using vendor::display::config::V1_3::IDisplayConfig; +#elif DISPLAY_CONFIG_1_2 +using vendor::display::config::V1_2::IDisplayConfig; +#elif DISPLAY_CONFIG_1_1 using vendor::display::config::V1_1::IDisplayConfig; #else using ::vendor::display::config::V1_0::IDisplayConfig; @@ -169,12 +177,14 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli const native_handle_t *buffer, int32_t acquire_fence); static int32_t GetReadbackBufferFence(hwc2_device_t *device, hwc2_display_t display, int32_t *release_fence); + static int32_t GetDozeSupport(hwc2_device_t *device, hwc2_display_t display, + int32_t *out_support); static Locker locker_[HWC_NUM_DISPLAY_TYPES]; private: static const int kExternalConnectionTimeoutMs = 500; - static const int kPartialUpdateControlTimeoutMs = 100; + static const int kCommitDoneTimeoutMs = 100; // hwc methods static int Open(const hw_module_t *module, const char *name, hw_device_t **device); @@ -232,11 +242,17 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli getHDRCapabilities_cb _hidl_cb) override; Return<int32_t> setCameraLaunchStatus(uint32_t on) override; Return<void> displayBWTransactionPending(displayBWTransactionPending_cb _hidl_cb) override; - - // Methods from ::android::hardware::display::config::V1_1::IDisplayConfig follow. #ifdef DISPLAY_CONFIG_1_1 Return<int32_t> setDisplayAnimating(uint64_t display_id, bool animating) override; #endif + // Methods from ::android::hardware::display::config::V1_2::IDisplayConfig follow. +#ifdef DISPLAY_CONFIG_1_2 + Return<int32_t> setDisplayIndex(IDisplayConfig::DisplayTypeExt disp_type, + uint32_t base, uint32_t count) { return 0; } +#endif +#ifdef DISPLAY_CONFIG_1_3 + Return<int32_t> controlIdlePowerCollapse(bool enable, bool synchronous) override; +#endif // QClient methods virtual android::status_t notifyCallback(uint32_t command, const android::Parcel *input_parcel, @@ -258,6 +274,9 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli android::status_t SetColorModeById(const android::Parcel *input_parcel); android::status_t getComposerStatus(); + android::status_t SetIdlePC(const android::Parcel *input_parcel); + + android::status_t setColorSamplingEnabled(const android::Parcel *input_parcel); void Refresh(hwc2_display_t display); void HotPlug(hwc2_display_t display, HWC2::Connection state); @@ -284,6 +303,7 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli Locker callbacks_lock_; int hpd_bpp_ = 0; int hpd_pattern_ = 0; + uint32_t idle_pc_ref_cnt_ = 0; }; } // namespace sdm |