summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brian Lindahl <blindahl@google.com> 2024-05-24 14:46:29 +0000
committer Brian Lindahl <blindahl@google.com> 2024-05-24 14:46:29 +0000
commit8a96ef91b59f3fb422f035fca831cc4515fbba6d (patch)
tree1e1b3612850a6832eb57458cab3d7c5559c2183b
parentdbecfa8c6e89fe56d323be583f73b620976ee12f (diff)
Differentiate between empty and unrecognizable display identification
data Test: system boots with no display identification error logs Bug: 220045335 Change-Id: I6efa1daf523b17ea56f4a4b9e842d663804e1c15
-rw-r--r--libs/ui/DisplayIdentification.cpp5
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp9
2 files changed, 12 insertions, 2 deletions
diff --git a/libs/ui/DisplayIdentification.cpp b/libs/ui/DisplayIdentification.cpp
index 82e5427317..ed7f1930aa 100644
--- a/libs/ui/DisplayIdentification.cpp
+++ b/libs/ui/DisplayIdentification.cpp
@@ -374,6 +374,11 @@ std::optional<PnpId> getPnpId(PhysicalDisplayId displayId) {
std::optional<DisplayIdentificationInfo> parseDisplayIdentificationData(
uint8_t port, const DisplayIdentificationData& data) {
+ if (data.empty()) {
+ ALOGI("Display identification data is empty.");
+ return {};
+ }
+
if (!isEdid(data)) {
ALOGE("Display identification data has unknown format.");
return {};
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index b980a65255..ab0598d90b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -6270,12 +6270,17 @@ void SurfaceFlinger::dumpDisplayIdentificationData(std::string& result) const {
uint8_t port;
DisplayIdentificationData data;
if (!getHwComposer().getDisplayIdentificationData(*hwcDisplayId, &port, &data)) {
- result.append("no identification data\n");
+ result.append("no display identification data\n");
+ continue;
+ }
+
+ if (data.empty()) {
+ result.append("empty display identification data\n");
continue;
}
if (!isEdid(data)) {
- result.append("unknown identification data\n");
+ result.append("unknown format for display identification data\n");
continue;
}