runtime_probe: add protobuf fields for edid

This CL adds protobuf fields for edid, and also introduces categories
display_panel.

BUG=b:159197877
TEST=run hardware_verifier with generated payloads on DUT

Change-Id: I8dad83b12f605cfc4a0c60f6d8e0a09c58604d42
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2251538
Tested-by: Kevin Lin <kevinptt@chromium.org>
Auto-Submit: Kevin Lin <kevinptt@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Clark Chung <ckclark@chromium.org>
Commit-Queue: Kevin Lin <kevinptt@chromium.org>
diff --git a/hardware_verifier/proto/hardware_verifier.proto b/hardware_verifier/proto/hardware_verifier.proto
index c8e2b0c..8bedd79 100644
--- a/hardware_verifier/proto/hardware_verifier.proto
+++ b/hardware_verifier/proto/hardware_verifier.proto
@@ -74,6 +74,7 @@
     repeated runtime_probe.InputDevice.Fields touchpad = 7;
     repeated runtime_probe.InputDevice.Fields touchscreen = 8;
     repeated runtime_probe.Memory.Fields dram = 9;
+    repeated runtime_probe.Edid.Fields display_panel = 10;
   }
 
   // Records the overall device matrics.
diff --git a/runtime_probe/functions/edid.cc b/runtime_probe/functions/edid.cc
index fb30b37..64084bf 100644
--- a/runtime_probe/functions/edid.cc
+++ b/runtime_probe/functions/edid.cc
@@ -131,7 +131,7 @@
              base::Value(base::StringPrintf("%04x", edid->product_id)));
   res.SetKey("width", base::Value(edid->width));
   res.SetKey("height", base::Value(edid->height));
-  res.SetKey("sys_path", base::Value(edid_path.value()));
+  res.SetKey("path", base::Value(edid_path.value()));
   return res;
 }
 
diff --git a/system_api/dbus/runtime_probe/runtime_probe.proto b/system_api/dbus/runtime_probe/runtime_probe.proto
index c2c2dba..3523ec3 100644
--- a/system_api/dbus/runtime_probe/runtime_probe.proto
+++ b/system_api/dbus/runtime_probe/runtime_probe.proto
@@ -39,6 +39,7 @@
     touchpad = 7;
     touchscreen = 8;
     dram = 9;
+    display_panel = 10;
   }
   repeated SupportCategory categories = 1;
   // This option allows clients to retrieve data with privacy implication from
@@ -323,6 +324,27 @@
   Information information = 3;
 }
 
+message Edid {
+  message Fields {
+    // The absolute path to the Edid file of the device.
+    string path = 1;
+    // The vendor code, 3 letters.
+    string vendor = 2;
+    // The product code, 16 bits.
+    uint32 product = 3;
+    // The height of the device.
+    uint32 height = 4;
+    // The width of the device.
+    uint32 width = 5;
+  }
+  // Component alias.
+  string name = 1;
+  // Component's details.
+  Fields values = 2;
+  // Component probe info.
+  Information information = 3;
+}
+
 // A ProbeResult contains all potential probe results. For category not
 // existed or not requested for probing, field is expected to be empty.
 message ProbeResult {
@@ -343,4 +365,5 @@
   repeated InputDevice touchpad = 10;
   repeated InputDevice touchscreen = 11;
   repeated Memory dram = 12;
+  repeated Edid display_panel = 13;
 }