Skip to content

Commit 90a7572

Browse files
Huihong LuoAndroid (Google) Code Review
authored andcommitted
Merge "SF: Remove the vsync method of communicating hotplug errors and enable the hal api path" into main
2 parents a4190b7 + 4ec5b29 commit 90a7572

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,6 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
532532
mIgnoreHdrCameraLayers = ignore_hdr_camera_layers(false);
533533

534534
// These are set by the HWC implementation to indicate that they will use the workarounds.
535-
mIsHotplugErrViaNegVsync =
536-
base::GetBoolProperty("debug.sf.hwc_hotplug_error_via_neg_vsync"s, false);
537-
538535
mIsHdcpViaNegVsync = base::GetBoolProperty("debug.sf.hwc_hdcp_via_neg_vsync"s, false);
539536
}
540537

@@ -2172,15 +2169,6 @@ void SurfaceFlinger::onComposerHalVsync(hal::HWDisplayId hwcDisplayId, int64_t t
21722169
std::optional<hal::VsyncPeriodNanos> vsyncPeriod) {
21732170
if (FlagManager::getInstance().connected_display() && timestamp < 0 &&
21742171
vsyncPeriod.has_value()) {
2175-
// use ~0 instead of -1 as AidlComposerHal.cpp passes the param as unsigned int32
2176-
if (mIsHotplugErrViaNegVsync && vsyncPeriod.value() == ~0) {
2177-
const auto errorCode = static_cast<int32_t>(-timestamp);
2178-
ALOGD("%s: Hotplug error %d for hwcDisplayId %" PRIu64, __func__, errorCode,
2179-
hwcDisplayId);
2180-
mScheduler->dispatchHotplugError(errorCode);
2181-
return;
2182-
}
2183-
21842172
if (mIsHdcpViaNegVsync && vsyncPeriod.value() == ~1) {
21852173
const int32_t value = static_cast<int32_t>(-timestamp);
21862174
// one byte is good enough to encode android.hardware.drm.HdcpLevel

services/surfaceflinger/SurfaceFlinger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,6 @@ class SurfaceFlinger : public BnSurfaceComposer,
12611261
};
12621262

12631263
bool mIsHdcpViaNegVsync = false;
1264-
bool mIsHotplugErrViaNegVsync = false;
12651264

12661265
std::mutex mHotplugMutex;
12671266
std::vector<HotplugEvent> mPendingHotplugEvents GUARDED_BY(mHotplugMutex);

0 commit comments

Comments
 (0)