Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d18823b authored by Lucas Berthou's avatar Lucas Berthou
Browse files

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
parent 12d98fef
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2248,6 +2248,19 @@ void SurfaceFlinger::onComposerHalHotplugEvent(hal::HWDisplayId hwcDisplayId,
        return;
    }

    if (event < DisplayHotplugEvent::ERROR_LINK_UNSTABLE) {
        // This needs to be kept in sync with DisplayHotplugEvent to prevent passing new errors.
        const auto errorCode = static_cast<int32_t>(event);
        ALOGW("%s: Unknown hotplug error %d for hwcDisplayId %" PRIu64, __func__, errorCode,
              hwcDisplayId);
        return;
    }

    if (event == DisplayHotplugEvent::ERROR_LINK_UNSTABLE &&
        !FlagManager::getInstance().display_config_error_hal()) {
        return;
    }

    // TODO(b/311403559): use enum type instead of int
    const auto errorCode = static_cast<int32_t>(event);
    ALOGD("%s: Hotplug error %d for hwcDisplayId %" PRIu64, __func__, errorCode, hwcDisplayId);