Skip to content

Commit 0d18823

Browse files
author
Lucas Berthou
committed
SF: passing link training failure up to DM
This decouples the link_training_error case from all the other case while using existing code to handle the error. Flag: com.android.graphics.surfaceflinger.flags.display_config_error_hal Bug: 374185760 Test: manual Change-Id: Iaa6ec4501d3200a956f31ec5a76bfd337e3b5fa6
1 parent 12d98fe commit 0d18823

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,6 +2248,19 @@ void SurfaceFlinger::onComposerHalHotplugEvent(hal::HWDisplayId hwcDisplayId,
22482248
return;
22492249
}
22502250

2251+
if (event < DisplayHotplugEvent::ERROR_LINK_UNSTABLE) {
2252+
// This needs to be kept in sync with DisplayHotplugEvent to prevent passing new errors.
2253+
const auto errorCode = static_cast<int32_t>(event);
2254+
ALOGW("%s: Unknown hotplug error %d for hwcDisplayId %" PRIu64, __func__, errorCode,
2255+
hwcDisplayId);
2256+
return;
2257+
}
2258+
2259+
if (event == DisplayHotplugEvent::ERROR_LINK_UNSTABLE &&
2260+
!FlagManager::getInstance().display_config_error_hal()) {
2261+
return;
2262+
}
2263+
22512264
// TODO(b/311403559): use enum type instead of int
22522265
const auto errorCode = static_cast<int32_t>(event);
22532266
ALOGD("%s: Hotplug error %d for hwcDisplayId %" PRIu64, __func__, errorCode, hwcDisplayId);

0 commit comments

Comments
 (0)