SF: Parse HDMI Physical Address from EDID.
This CL parses HDMI Physical Address from the HDMI Vendor
Specific Data Block in the EDID of the connected display.
This information will be later added to the DeviceProductInfo
structure.
Bug: 147994746
Test: atest DisplayIdentificationTest
Change-Id: I5098f488b3cbf0b40896c837d24d2d29aa985431
diff --git a/services/surfaceflinger/DisplayHardware/DisplayIdentification.h b/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
index d91b957..fc2f72e 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayIdentification.h
@@ -57,6 +57,26 @@
std::optional<DeviceProductInfo> deviceProductInfo;
};
+struct ExtensionBlock {
+ uint8_t tag;
+ uint8_t revisionNumber;
+};
+
+struct HdmiPhysicalAddress {
+ // The address describes the path from the display sink in the network of connected HDMI
+ // devices. The format of the address is "a.b.c.d". For example, address 2.1.0.0 means we are
+ // connected to port 1 of a device which is connected to port 2 of the sink.
+ uint8_t a, b, c, d;
+};
+
+struct HdmiVendorDataBlock {
+ std::optional<HdmiPhysicalAddress> physicalAddress;
+};
+
+struct Cea861ExtensionBlock : ExtensionBlock {
+ std::optional<HdmiVendorDataBlock> hdmiVendorDataBlock;
+};
+
struct Edid {
uint16_t manufacturerId;
uint16_t productId;
@@ -65,6 +85,7 @@
std::string_view displayName;
uint8_t manufactureOrModelYear;
uint8_t manufactureWeek;
+ std::optional<Cea861ExtensionBlock> cea861Block;
};
bool isEdid(const DisplayIdentificationData&);