diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 00:38:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 00:38:11 +0000 |
commit | bb64e2d06cc13d5ed69d7f28f394e6e5b7b4ac75 (patch) | |
tree | 236386922e299269c1278c69128f2d32b09abc33 | |
parent | aa193659e44c6fb541e21fcd6834488fb9700d22 (diff) | |
parent | ae93d90141e5552af8bd94936c333213062d6def (diff) | |
download | common-bb64e2d06cc13d5ed69d7f28f394e6e5b7b4ac75.tar.gz |
Snap for 11220357 from ae93d90141e5552af8bd94936c333213062d6def to 24Q1-release
Change-Id: Iac982ad309263517070bda8d23455e990654e5b9
-rw-r--r-- | hwc3/ComposerClient.cpp | 9 | ||||
-rw-r--r-- | hwc3/impl/HalImpl.cpp | 11 | ||||
-rw-r--r-- | libhwc2.1/libdevice/ExynosDisplay.h | 5 | ||||
-rw-r--r-- | libhwc2.1/libhwchelper/ExynosHWCHelper.h | 2 | ||||
-rw-r--r-- | libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp | 7 | ||||
-rw-r--r-- | libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.h | 2 |
6 files changed, 30 insertions, 6 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp index dcba5b7..104bac6 100644 --- a/hwc3/ComposerClient.cpp +++ b/hwc3/ComposerClient.cpp @@ -84,9 +84,12 @@ ndk::ScopedAStatus ComposerClient::getDisplayConfigurations( return TO_BINDER_STATUS(err); } -ndk::ScopedAStatus ComposerClient::notifyExpectedPresent(int64_t, const ClockMonotonicTimestamp&, - int32_t) { - return TO_BINDER_STATUS(HWC2_ERROR_UNSUPPORTED); +ndk::ScopedAStatus ComposerClient::notifyExpectedPresent( + int64_t display, const ClockMonotonicTimestamp& expectedPresentTime, + int32_t frameIntervalNs) { + DEBUG_DISPLAY_FUNC(display); + auto err = mHal->notifyExpectedPresent(display, expectedPresentTime, frameIntervalNs); + return TO_BINDER_STATUS(err); } ndk::ScopedAStatus ComposerClient::destroyLayer(int64_t display, int64_t layer) { diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp index 259b779..37e7d9f 100644 --- a/hwc3/impl/HalImpl.cpp +++ b/hwc3/impl/HalImpl.cpp @@ -431,8 +431,15 @@ int32_t HalImpl::getDisplayConfigurations(int64_t display, int32_t, return HWC2_ERROR_NONE; } -int32_t HalImpl::notifyExpectedPresent(int64_t, const ClockMonotonicTimestamp&, int32_t) { - return HWC2_ERROR_UNSUPPORTED; +int32_t HalImpl::notifyExpectedPresent(int64_t display, + const ClockMonotonicTimestamp& expectedPresentTime, + int32_t frameIntervalNs) { + ExynosDisplay* halDisplay; + RET_IF_ERR(getHalDisplay(display, halDisplay)); + + RET_IF_ERR( + halDisplay->notifyExpectedPresent(expectedPresentTime.timestampNanos, frameIntervalNs)); + return HWC2_ERROR_NONE; } int32_t HalImpl::getDisplayConnectionType(int64_t display, DisplayConnectionType* outType) { diff --git a/libhwc2.1/libdevice/ExynosDisplay.h b/libhwc2.1/libdevice/ExynosDisplay.h index cdb62d6..b329f11 100644 --- a/libhwc2.1/libdevice/ExynosDisplay.h +++ b/libhwc2.1/libdevice/ExynosDisplay.h @@ -1322,6 +1322,11 @@ class ExynosDisplay { displaycolor::DisplayType getDcDisplayType() const; + virtual int32_t notifyExpectedPresent(int64_t __unused timestamp, + int32_t __unused frameIntervalNs) { + return HWC2_ERROR_UNSUPPORTED; + }; + protected: virtual bool getHDRException(ExynosLayer *layer); virtual int32_t getActiveConfigInternal(hwc2_config_t* outConfig); diff --git a/libhwc2.1/libhwchelper/ExynosHWCHelper.h b/libhwc2.1/libhwchelper/ExynosHWCHelper.h index 5dbd76e..de99b99 100644 --- a/libhwc2.1/libhwchelper/ExynosHWCHelper.h +++ b/libhwc2.1/libhwchelper/ExynosHWCHelper.h @@ -163,7 +163,7 @@ const format_description_t exynos_format_desc[] = { 1, 1, 32, RGB | BIT10 | COMP_TYPE_NONE | COMP_TYPE_AFBC, true, String8("RGBA_1010102"), 0}, {HAL_PIXEL_FORMAT_EXYNOS_ARGB_8888, DECON_PIXEL_FORMAT_MAX, DRM_FORMAT_ARGB8888, 1, 1, 32, RGB | BIT8 | COMP_TYPE_NONE | COMP_TYPE_AFBC, true, String8("EXYNOS_ARGB_8888"), 0}, - {HAL_PIXEL_FORMAT_RGBA_FP16, DECON_PIXEL_FORMAT_MAX, DRM_FORMAT_ARGB16161616F, + {HAL_PIXEL_FORMAT_RGBA_FP16, DECON_PIXEL_FORMAT_MAX, DRM_FORMAT_ABGR16161616F, 1, 1, 64, RGB | BIT16 | COMP_TYPE_NONE | COMP_TYPE_AFBC, true, String8("RGBA_FP16"), 0}, /* YUV 420 */ diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp index d15c4fe..d440ac2 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp @@ -708,6 +708,13 @@ void ExynosPrimaryDisplay::onVsync(int64_t timestamp) { } } +int32_t ExynosPrimaryDisplay::notifyExpectedPresent(int64_t timestamp, int32_t frameIntervalNs) { + if (mVariableRefreshRateController) { + mVariableRefreshRateController->notifyExpectedPresent(timestamp, frameIntervalNs); + } + return NO_ERROR; +} + int32_t ExynosPrimaryDisplay::setLhbmDisplayConfigLocked(uint32_t peakRate) { auto hwConfig = mDisplayInterface->getActiveModeId(); auto config = getConfigId(peakRate, mDisplayConfigs[hwConfig].width, diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.h b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.h index 2d5b657..f3b412d 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.h +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.h @@ -80,6 +80,8 @@ class ExynosPrimaryDisplay : public ExynosDisplay { virtual void onVsync(int64_t timestamp) override; + int32_t notifyExpectedPresent(int64_t timestamp, int32_t frameIntervalNs) override; + protected: /* setPowerMode(int32_t mode) * Descriptor: HWC2_FUNCTION_SET_POWER_MODE |