diff options
author | Tommy Chiu <tommychiu@google.com> | 2018-12-24 18:12:06 +0800 |
---|---|---|
committer | Tommy Chiu <tommychiu@google.com> | 2018-12-25 15:32:18 +0800 |
commit | 6ab7f067c31adbf1300add2e3c1a949917589d7d (patch) | |
tree | 335d69511dfe5c0d321649116dfa2327b942ac82 | |
parent | 6239b02b0c0b24267566926ed62b8723a3b69d5f (diff) | |
download | display-6ab7f067c31adbf1300add2e3c1a949917589d7d.tar.gz |
hwc2: Ignore Notify to non-existance file nodepie-b4s4-dev
Secure display will try to signal both wled and labibb. However
the display function did not use WLED to drive backlight, nor use
LAB/IBB of the PMIC to provide the LCD bias on B4S4.
So just bypass the file node writing if it's invalid.
Bug: 111504659
Test: Manually tested with keystore_cli_v2
Change-Id: Ia7ea7c13a7635a7f81ae6d76dd1627791c7e49bf
-rw-r--r-- | sdm/libs/hwc2/hwc_display_primary.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp index b1eeecdf..6eaf11db 100644 --- a/sdm/libs/hwc2/hwc_display_primary.cpp +++ b/sdm/libs/hwc2/hwc_display_primary.cpp @@ -73,6 +73,10 @@ void HWCDisplayPrimary::PMICInterface::Deinit() { DisplayError HWCDisplayPrimary::PMICInterface::Notify(bool secure_display_start) { std::string str_sd_start = secure_display_start ? std::to_string(1) : std::to_string(0); + if (fd_lcd_bias_ < 0 || fd_wled_ < 0) { + DLOGI("Ignore notify because fd_lcd_bias_ or fd_wled_ open failed"); + return kErrorNotSupported; + } ssize_t err = ::pwrite(fd_lcd_bias_, str_sd_start.c_str(), str_sd_start.length(), 0); if (err <= 0) { DLOGE("Write failed for lcd_bias, Error = %s", strerror(errno)); |